{"id":24508,"library":"read-version","title":"read-version","description":"Extract your project's __version__ variable by parsing Python source code without importing. Version 0.3.2, project is inactive and no longer supported.","status":"deprecated","version":"0.3.2","language":"python","source_language":"en","source_url":"https://github.com/jwodder/read_version","tags":["version","meta","build","deprecated"],"install":[{"cmd":"pip install read-version","lang":"bash","label":"Install from PyPI"}],"dependencies":[{"reason":"Required to avoid distutils import warnings","package":"setuptools","optional":false}],"imports":[{"note":"correct import path","symbol":"read_version","correct":"from read_version import read_version"}],"quickstart":{"code":"from read_version import read_version\nversion = read_version('mypackage')\nprint(version)","lang":"python","description":"Read __version__ from a Python package without importing it."},"warnings":[{"fix":"Switch to importlib.metadata.version('your_package') or from importlib.metadata import version","message":"Project is inactive and no longer supported. Use alternatives like importlib.metadata or pkg_resources.","severity":"deprecated","affected_versions":">=0.3.2"},{"fix":"Upgrade to v0.3.1+ or explicitly import setuptools before read_version: import setuptools; from read_version import read_version","message":"Before v0.3.1, importing read_version could trigger a deprecation warning about distutils if setuptools was not imported first.","severity":"gotcha","affected_versions":"<0.3.1"}],"env_vars":null,"search_vec":"'0.3.2':18 'build':28 'code':14 'deprec':29 'extract':4 'import':16 'inact':21 'longer':24 'meta':27 'pars':11 'project':6,19 'python':12 'read':2 'read-vers':1 'sourc':13 'support':25 'variabl':9 'version':3,8,17,26 'without':15","created_at":"2026-05-01T08:13:27.334875+00:00","updated_at":"2026-05-01T08:13:27.334875+00:00","problems":[{"fix":"Install with: pip install read-version","cause":"Library not installed or misspelled.","error":"ModuleNotFoundError: No module named 'read_version'"},{"fix":"Use 'from read_version import read_version' instead of 'import read_version'","cause":"Wrong import pattern.","error":"AttributeError: module 'read_version' has no attribute 'read_version'"}],"ecosystem":"pypi","meta_description":null,"install_score":null,"quickstart_score":null,"quickstart_tag":null,"pypi_latest":"0.3.2","cli_name":"","cli_version":null,"type":"library","homepage":null,"github":"https://github.com/jwodder/read_version","docs":null,"changelog":null,"pypi":"https://pypi.org/project/read-version/","npm":null,"openapi_spec":null,"status_page":null,"smithery":null,"categories":["devops"],"base_url":null,"auth_type":null,"provenance":{"verified_status":"passing","verified_at":"2026-06-29","last_verified":"2026-06-29","next_check":"2026-07-29","install_tag":null}}