🦆 ReqScan — Auto-generate requirements.txt in one command
"I got tired of manually tracking every import across every project. So I automated the suffering away."
😤 The Problem
You know the drill. You've been smacking away on your keyboard for weeks. It's beautiful. It works. You're proud. Then someone says:
"Hey, can you send me the requirements?"
And suddenly you're doing archaeology on your own code. Scrolling through 30 files. Squinting at imports. Trying to remember if you actually used requests or just thought about it. Manually checking versions. Forgetting one. Breaking their environment. Apologizing.
No more. Just cd in and run reqscan. Done.
🚀 Install
pip install reqscan
⚡ Usage
Navigate to your project and run:
reqscan
That's it. It scans the current directory, figures out what you actually imported, and writes a clean versioned requirements.txt right there.
You can also point it at a specific folder:
reqscan /path/to/my/project
And if you want to blow away an existing requirements.txt without being asked:
reqscan --overwrite
📋 Example Output
requirements.txt
────────────────
fastapi==0.111.0
httpx==0.27.0
pydantic==2.7.1
rich==13.7.1
uvicorn==0.29.0
Clean. Sorted. Versioned. Done.
✨ What It Does
- 🔍 Recursively scans your entire project tree for
.pyfiles - 🧠 Classifies imports — filters out stdlib modules and local files so you don't end up with
os==3.11in your requirements - ⚡ Parallel parsing — uses multiprocessing to chew through large projects fast, with a live progress bar
- 🔄 Non-destructive by default — merges with your existing
requirements.txtinstead of nuking it - 🚫 Skips the junk — ignores
venv,.venv,node_modules,__pycache__,build,dist, and all the other folders we don't talk about - 🪟 Windows compatible — ANSI colors work there too
🛠 Requirements
- Python 3.10+
- No third-party dependencies — reqscan is pure stdlib all the way down
⚠️ Caveats & Known Quirks
- Dynamic imports (
importlib.import_module(...),__import__) won't be detected — reqscan uses static AST analysis - Version detection only works for packages installed in your current Python environment — run it from inside your virtualenv for best results
- Some packages import under a different name than their PyPI name (e.g.,
import cv2→opencv-python). reqscan resolves most of these via package metadata, but the occasional oddball may slip through
🤝 Contributing
Found a bug? Have a wild idea? PRs welcome. This started as a personal itch-scratcher, so there's plenty of room to grow.
📜 License
Do whatever you want with it. Just don't manually maintain a requirements.txt ever again. That's the only rule.
Also available as a full interactive CLI — see ReqScan Github for the complete experience.
Metadata
Release files for ReqScan 1.0.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| reqscan-1.0.2.tar.gz | 5.2 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| reqscan-1.0.2-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 10.8 kB
Release files / reqscan-1.0.2.tar.gz
| Download URL | reqscan-1.0.2.tar.gz |
|---|---|
| Size | 5.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
dbb9aeca1e23c350043a945c76c21ec1b72f3aa21fad9e060cbaa10dac7b8575
|
|
BLAKE2b-256 checksum How to use checksums |
76bd0878dabe728076810f252e6fb063062e752930a6403053af833256ed6409
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.14.3
|
Release files / reqscan-1.0.2-py3-none-any.whl
| Download URL | reqscan-1.0.2-py3-none-any.whl |
|---|---|
| Size | 5.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
aecdb03152b9ede4c017014c160ffd63206cbb724884f6d94848c180b5bca157
|
|
BLAKE2b-256 checksum How to use checksums |
ca40c493ce54119aad22a6150186480ebbd869345852d8f0c2dda6a3741445e5
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.14.3
|