Listreqs is a simple requirements.txt generator. It's an alternative to pipreqs.
Project description
⚡Listreqs
Listreqs is a simple requirements.txt generator. It's an alternative to pipreqs. Where in Pipreqs, it helps you to Generate requirements.txt file for any project based on imports, but in Listreqs you need to create a virtual environment first, and do your required installations there. And when you need to create your requirements.txt use Listreqs.
| Using shell script | Using python script |
|---|---|
How to use:
Use the only python script:
- Create your virtual env,
- pip install virtualenv - mkdir TextGenEnv - virtualenv TextGenEnv - activate the env: + for cmd -> TextGenEnv\Scripts\activate + (for git bash, source ./Scripts/activate) + (for linux terminal, source TextGenEnv/bin/activate) - do your required installations there
- And when you need to create your requirements.txt do these steps,
- activate the environment using above command
pip list > requirements.txt-> it will put the output of thepip listcommand inside therequirements.txtpython listreqs.pyand give the path of the previously createdrequirements.txt
- Boom!!!
Use only shell script:
- Create your virtual env,
- pip install virtualenv - mkdir TextGenEnv - virtualenv TextGenEnv - activate the env: + TextGenEnv\Scripts\activate + (for bash source ./Scripts/activate) - do your required installations there
- And when you need to create your requirements.txt do these steps,
sh listreqs.shand pass the file namerequirements.txt.- Boom!!!
- heads up while using the shell script,
-
Usage:
- Can pass in as a positional(command line) argument:
bash listreqs.sh reqs.txt- Can input the file name from the prompt after running the shell script
bash listreqs.sh Enter the requirements file name : reqs.txt- Not passing any input will lead to the creation of a default file called
requirements.txt.
bash listreqs.sh Enter the requirements file name :
-
Know more about How to create virtual environment:
todos:
- Create a single shell script to get the job done.
- Use the python script to create a python library:
It should be like a shell command,like doing
Listreqs requirements.txtafter activating the virtual environment should create arequirements.txtwith all the installed package name and verison inside the current directory. - Create
requirements.txtfrom a public repo whererequirements.txtis not given. Usepython poetryfor this. - Create
requirements.txtfrom base environment, using basic regex
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Listreqs-0.0.5.tar.gz
(3.3 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file Listreqs-0.0.5.tar.gz.
File metadata
- Download URL: Listreqs-0.0.5.tar.gz
- Upload date:
- Size: 3.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.7.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f0d8d4826e5d05b2b1368210debda3faeef20af881ade9409b26d4e3d722ab3d
|
|
| MD5 |
9cdd4808ced788eb1025cbc225c2251b
|
|
| BLAKE2b-256 |
b7a44616ca6bdc55fcd018b850cae952200a43a9e05377c85b23768e6a94f7a3
|
File details
Details for the file Listreqs-0.0.5-py3-none-any.whl.
File metadata
- Download URL: Listreqs-0.0.5-py3-none-any.whl
- Upload date:
- Size: 4.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.7.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
eb804742557866a73bde5f29fbd0a8175f8b385d9d4d4fb0d60fe663a23c563e
|
|
| MD5 |
b405dc4bb31357382e30840dfac1fba5
|
|
| BLAKE2b-256 |
1b7ce09a788d153e7a0e8a6dce3181c1e2026708791db796832d49f61ab9e818
|