pip freeze for pyproject.toml
Install something with a requirements.txt? Have stuff you've installed with pip, but haven't saved the dependencies yet?
Need it to be in a versioned pyproject.toml instead?
Well, you're in luck, sort of.
This cli does the bare minimum in locking your packages and versions into starter pyproject.toml similar to pip freeze but for pyproject.toml
install
pip install pyproject-freeze==0.1.0
Usage
pyenv local 3.12.6
python -m venv venv_3126
source venv_3126/bin/activate
pip install tomlkit
# now we "freeze" into a pyproject.toml
pypfreeze
Enter the path for pyproject.toml (default: pyproject.toml):
Choose package manager (p)ip, (po)etry, (u)v, or (r)ye (default: p): p
Enter project name (default: your-project-name): pyproject-freeze
Enter project version (default: 0.1.0):
Enter project description (default: Your project description): pip freeze for pyproject.toml
Enter author name and email (format: Name <email@example.com>) (default: ): James Munsch <james.a.munsch@gmail.com>
<enter> if there are no more authors
Enter author name and email (format: Name <email@example.com>) (default: ):
<enter> if there are no more authors
Enter readme file name (default: README.md):
Enter required Python version (default: >=3.12):
Include all installed packages as dependencies? (y/n) (default: y): y
Updated pyproject.toml with user-provided information and selected packages.
Output
11:21:03 (venv_3126) jm@pop-os pyproject-freeze ±|main ✗|→ cat pyproject.toml
[project]
name = "pyproject-freeze"
version = "0.1.0"
description = "pip freeze for pyproject.toml"
authors = [
{name = "James Munsch", email = "james.a.munsch@gmail.com"},
]
readme = "README.md"
requires-python = ">=3.12"
dependencies = [
"pip==24.2",
"tomlkit==0.13.2",
]
[build-system]
requires = ["setuptools>=61.0"]
build-backend = "setuptools.build_meta"
Related info
Metadata
Release files for pyproject-freeze 0.1.1
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 | |
|---|---|---|---|---|
| pyproject_freeze-0.1.1.tar.gz | 3.3 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| pyproject_freeze-0.1.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 7.4 kB
Release files / pyproject_freeze-0.1.1.tar.gz
| Download URL | pyproject_freeze-0.1.1.tar.gz |
|---|---|
| Size | 3.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
5ccde42ec3840f66dbd3e2a636f59985a5412bd66b80938c7ad82aab971edb6f
|
|
BLAKE2b-256 checksum How to use checksums |
39ebdd8a4a5764501c946b9e992e6e20bdbda2ddeaf431c36b2ce5541b48c448
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.1.1 CPython/3.12.6
|
Release files / pyproject_freeze-0.1.1-py3-none-any.whl
| Download URL | pyproject_freeze-0.1.1-py3-none-any.whl |
|---|---|
| Size | 4.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
b9658acbfa3bb4db2eef91574812b3f03fe24b4db49c4e5eef0f6ae91136ec99
|
|
BLAKE2b-256 checksum How to use checksums |
32e5b3ccee059e7dfa913bc9675ef3644966cd220baa193137540a244f1d3d7a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.1.1 CPython/3.12.6
|
Security for pyproject-freeze 0.1.1
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.