···2233## Before contributing
4455-Welcome to pygetpackages! Before contributing to the project,
55+Welcome to pygetimportables! Before contributing to the project,
66make sure that you **read our code of conduct** (`CODE_OF_CONDUCT.md`).
7788## Contributing code
+13-13
README.md
···11-# pygetpackages
11+# pygetimportables
2233-[](https://pygetpackages.readthedocs.io/en/latest/?badge=latest)
33+[](https://pygetimportables.readthedocs.io/en/latest/?badge=latest)
44[](https://github.com/astral-sh/ruff)
55-[](https://pypi.org/project/pygetpackages)
55+[](https://pypi.org/project/pygetimportables)
6677-Python functions to get packages from a source tree and an already built wheel.
77+Python functions to get top-level importable names from a source tree or an already built wheel.
8899See https://discuss.python.org/t/script-to-get-top-level-packages-from-source-tree/40232?u=astrojuanlu
1010···1313To install, run
14141515```
1616-(.venv) $ pip install pygetpackages
1616+(.venv) $ pip install pygetimportables
1717```
18181919## Usage
20202121-To get the packages directly from a source tree:
2121+To get the top-level importable names directly from a source tree:
22222323```
2424->>> from pygetpackages import get_packages
2525->>> get_packages(".") # Wait a few seconds, requires working `pip install`
2626-{'pygetpackages'}
2424+>>> from pygetimportables import get_top_importables
2525+>>> get_top_importables(".") # Wait a few seconds, requires working `pip install`
2626+{'pygetimportables'}
2727```
28282929-To get packages from an already built wheel:
2929+To get the top-level importable names from an already built wheel:
30303131```
3232(.venv) $ python -m build
3333...
3434(.venv) $ python -q
3535->>> from pygetpackages import get_packages_from_wheel
3636->>> get_packages_from_wheel("dist/pygetpackages-0.1.0+d20231204-py3-none-any.whl") # Fast
3737-{'pygetpackages'}
3535+>>> from pygetimportables import get_top_importables_from_wheel
3636+>>> get_top_importables_from_wheel("dist/pygetimportables-0.1.0+d20231204-py3-none-any.whl") # Fast
3737+{'pygetimportables'}
3838```
39394040## Development