pk3
Build utilities for pykit3 packages.
Installation
pip install pk3
CLI Usage
Show version from pyproject.toml
pk3 version
# 0.1.1
pk3 version --path /path/to/pyproject.toml
Create git tag from version
pk3 tag
# Created tag: v0.1.1
# Run 'git push --tags' to push the tag
pk3 tag --prefix release-
# Created tag: release-0.1.1
pk3 tag --prefix ""
# Created tag: 0.1.1
Publish to PyPI
TWINE_PASSWORD=pypi-xxx pk3 publish
# Published successfully
# Publish to TestPyPI first
TWINE_PASSWORD=pypi-xxx pk3 publish --test
Python API
from pk3 import get_version, create_tag, publish
# Get version from pyproject.toml
version = get_version() # reads ./pyproject.toml
version = get_version("/path/to/pyproject.toml")
# Create git tag
tag = create_tag() # creates "v0.1.1"
tag = create_tag(prefix="release-") # creates "release-0.1.1"
tag = create_tag(prefix="") # creates "0.1.1"
# Publish to PyPI (requires TWINE_PASSWORD env var)
publish() # publish to PyPI
publish(test=True) # publish to TestPyPI
Metadata
Release files for pk3 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 | |
|---|---|---|---|
| pk3-0.1.4.tar.gz | 11.2 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| pk3-0.1.4-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 19.3 kB
Release files / pk3-0.1.4.tar.gz
| Download URL | pk3-0.1.4.tar.gz |
|---|---|
| Size | 11.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
140f5e80d8c92e61f024040b8b6d415b9fe0442cc4b4f2e6d9b542721e9b9fc0
|
|
BLAKE2b-256 checksum How to use checksums |
c599038c98b9235e03b266e6f82091807bc08777715230758145d1780eb88c86
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.12.8
|
Release files / pk3-0.1.4-py3-none-any.whl
| Download URL | pk3-0.1.4-py3-none-any.whl |
|---|---|
| Size | 8.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
a9395d5a785393345f921396deca9c1265fc9a2ceaed21e9fb4685cc0216a150
|
|
BLAKE2b-256 checksum How to use checksums |
cd8119254e621b4ef79e4e1c67535135edc9cae687ff37cb9ad4db41db174638
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.12.8
|