pipfile-freeze
English | 简体中文
CLI tool to convert Pipfile/Pipfile.lock to requirments.txt
Required Python version
>=2.7, >=3.4
What does it do?
The tool is built on top of requirementslib to provide a simple CLI to convert the Pipenv-managed files to requirements.txt.
Pipenv is a great tool for managing virtualenv and dependencies, but it may be not that useful in deployment. Pip installation is much faster than Pipenv manipulation, since the latter needs extra requests to PyPI for hash checking. Installing a Pipenv in deployment may be overkilled, especially using docker to deploy. We just need a requirements.txt to tell CI or production server which packages and versions should be installed.
Installation
$ pip install pipfile-freeze
An executable named pipfile will be ready for use in the bin path.
Examples:
Output requirements directly to the console:
$ pipfile freeze
Output requirements to the file, default './requirements.txt' with -o:
$ pipfile freeze -o
$ pipfile freeze -o /path/requirements.txt
Specify a project root path
$ pipfile freeze -p myproject
Complex example
$ pipfile freeze -p myproject --hashes -d -o /path/requirements.txt
If your Pipfile like this:
[[source]]
name = "tuna"
url = "http://pypi.tuna.tsinghua.edu.cn/simple"
verify_ssl = true
[[source]]
name = "pypi"
url = "https://pypi.org/simple"
verify_ssl = true
[dev-packages]
[packages]
requests = "*"
ilogger = "==0.1"
apscheduler = "*"
pywinusb = {version = "1.1", sys_platform = "== 'win32'"}
[requires]
python_version = "3.7"
Here is the output (requirements.txt):
--index-url http://pypi.tuna.tsinghua.edu.cn/simple
--trusted-host pypi.tuna.tsinghua.edu.cn
--extra-index-url https://pypi.org/simple
apscheduler
ilogger==0.1
pywinusb; sys_platform == 'win32'
requests
Usage:
$ pipfile freeze --help
usage: pipfile freeze [-h] [-p PROJECT] [--hashes] [-d] [-o [file]] [file]
positional arguments:
file The file path to convert, support both Pipfile and
Pipfile.lock. If it isn't given, will try Pipfile.lock
first then Pipfile.
optional arguments:
-h, --help show this help message and exit
-p PROJECT, --project PROJECT
Specify another project root
--hashes whether to include the hashes
-d, --dev whether to choose both develop and default packages
-o [file], --outfile [file]
Output requirements to the file
License
This tool is improved based on the pipfile-requirements tool, thanks to @frostming for his contribution.
Metadata
Release files for pipfile-freeze 0.1.4
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| pipfile-freeze-0.1.4.tar.gz | 4.6 kB | Without provenance | Details for pipfile-freeze-0.1.4.tar.gz |
Release files / pipfile-freeze-0.1.4.tar.gz
| Download URL | pipfile-freeze-0.1.4.tar.gz |
|---|---|
| Size | 4.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
46d79b1ddf6a540163de04417ef7e7aa3965bece8f886adf685f14aabf52fb86
|
|
BLAKE2b-256 checksum How to use checksums |
8b72ae964e77fcee771c98eed42efbdecd0f310f6c7de6e2386515e8d7625cc2
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.3.0 pkginfo/1.7.0 requests/2.24.0 setuptools/50.3.1.post20201107 requests-toolbelt/0.9.1 tqdm/4.51.0 CPython/3.7.9
|
Security for pipfile-freeze 0.1.4
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.