pip freeze for pyproject.toml
Project description
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
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file pyproject_freeze-0.1.1.tar.gz
.
File metadata
- Download URL: pyproject_freeze-0.1.1.tar.gz
- Upload date:
- Size: 3.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5ccde42ec3840f66dbd3e2a636f59985a5412bd66b80938c7ad82aab971edb6f |
|
MD5 | 2fb72dbe0cdd5617e07aa74460953cdf |
|
BLAKE2b-256 | 39ebdd8a4a5764501c946b9e992e6e20bdbda2ddeaf431c36b2ce5541b48c448 |
File details
Details for the file pyproject_freeze-0.1.1-py3-none-any.whl
.
File metadata
- Download URL: pyproject_freeze-0.1.1-py3-none-any.whl
- Upload date:
- Size: 4.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | b9658acbfa3bb4db2eef91574812b3f03fe24b4db49c4e5eef0f6ae91136ec99 |
|
MD5 | 7f1fa3022173641989398f77483e9065 |
|
BLAKE2b-256 | 32e5b3ccee059e7dfa913bc9675ef3644966cd220baa193137540a244f1d3d7a |