{"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,"last_verified":"2026-05-01T00:00:00.000Z","next_check":"2026-07-30T00:00:00.000Z","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,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}