pyre_tools
pyre_tools is a Python dependency analysis tool that works both as a CLI and as an importable module.
Install
pip install pyre_tools
CLI
Analyze a project:
pyre_tools path/to/project
Analyze and install missing dependencies:
pyre_tools path/to/project --install
Generate requirements.txt and pyproject.toml:
pyre_tools path/to/project --write-files
The legacy pyre command is still available as a compatibility alias.
pyre_tools -h also shows how to call the package as a module from other Python code.
If you hit Ubuntu/Debian user-site pip environment issues, run:
pyre --repair-hints
The CLI defaults to English for terminal compatibility. You can switch languages with:
pyre --lang zh path/to/project
pyre --lang en path/to/project
Python API
import pyre_tools; pyre_tools.shield()
Put that line at the top of your entry script. pyre_tools will infer the current project, install missing dependencies, and restart the process once if it had to patch the environment.
shield() now does a fast preflight on the current script first:
- local project modules like
utils.pyorutils/are treated as already satisfied - already importable dependencies are accepted immediately
- only real missing modules fall back to full project analysis and installation
- in REPL /
python -cmode, it falls back to the current working directory instead of trying to parse<stdin>or<string>
Public API
analyze_path(path, include_stdlib=False)bootstrap(path=".", auto_install=True, output_dir=None, write_files=False, include_stdlib=False, upgrade=False)check_and_install_dependencies(path=".", auto_install=True, output_dir=None, write_files=False, include_stdlib=False, upgrade=False)shield(path=None, auto_install=True, output_dir=None, write_files=False, include_stdlib=False, upgrade=False, restart_on_install=True)find_missing_requirements(report_or_requirements)install_requirements(requirements, python_executable=None, upgrade=False)export_requirements(requirements, output_path)export_pyproject_toml(requirements, output_path, project_name)get_install_hint(package_name="pyre_tools")format_module_not_found_hint(module_name="pyre_tools", package_name="pyre_tools")
Notes
- The importable module name is
pyre_tools. - The primary console command is also
pyre_tools. - This makes missing-module guidance straightforward: if users see
ModuleNotFoundError: No module named 'pyre_tools', the install command ispip install pyre_tools. - The shortest module integration is
import pyre_tools; pyre_tools.shield().
Release files for pyre-tools 1.6.6
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| pyre_tools-1.6.6.tar.gz | 15.7 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| pyre_tools-1.6.6-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 30.4 kB
Release files / pyre_tools-1.6.6.tar.gz
| Download URL | pyre_tools-1.6.6.tar.gz |
|---|---|
| Size | 15.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
07e8811a80a3291852a41d694768ed22878fdbdc4e134caf3764276b0e0d5285
|
|
BLAKE2b-256 checksum How to use checksums |
22187221ddfd2fa249fa9de321b82496db922c107da002d783b8c82609ffbe55
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.13.2
|
Release files / pyre_tools-1.6.6-py3-none-any.whl
| Download URL | pyre_tools-1.6.6-py3-none-any.whl |
|---|---|
| Size | 14.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
eda3065884863847ac61c0f9b9bbf518c965552417811816e42e4eff43c7aae3
|
|
BLAKE2b-256 checksum How to use checksums |
2b6635dd4023d9bd77ff58b0cb73b819cf1cd63bf4506038d431d93eefe5c3c4
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.13.2
|