pj-py
Spawn and ship Python projects from templates.
pip install pj-py
pj-py init my-lib # create
# ... code, commit, push ...
pj-py ship # release
Commands
init — create a project
pj-py init my-lib -d "Does one thing well"
Spawns a new GitHub repo from 1iis/py (the reference Python template),
clones it locally, renames my_package to your project name, installs dependencies, and makes the
initial commit.
from pj_py import init
p = init("my-lib")
# → Project(owner="1iis", repo="my-lib", path=Path("my-lib"))
| Param | Default | Description |
|---|---|---|
name |
(required) | Repo name and local directory |
desc |
"" |
Short project description |
template |
"py" |
Alias → 1iis/py. Full owner/repo also accepted |
org |
"1iis" |
GitHub owner for the new repo |
private |
True |
Whether the repo is private |
path |
cwd |
Parent directory for the clone |
token |
$GITHUB_TOKEN |
GitHub PAT |
ship — release a new version
pj-py ship "### Added\n\n- Feature X"
pj-py ship # auto-generates boilerplate
Non-interactive, one-call release: bumps the version via fastship, writes the changelog entry,
commits and pushes, creates a GitHub release, and uploads to PyPI.
from pj_py import ship
v = ship() # patch bump
v = ship("minor") # minor bump
v = ship("major") # major bump
# → "0.0.3"
| Param | Default | Description |
|---|---|---|
msg |
"" |
Changelog entry. Empty → boilerplate |
bump |
"patch" |
Version part to bump |
path |
cwd |
Project root |
token |
$GITHUB_TOKEN / $FASTSHIP_TOKEN |
For GitHub releases (optional, falls back to no GH release) |
Requires .pypirc configured for PyPI uploads.
Prerequisites
- Python 3.10+
- uv (install)
- git
- GitHub token with repo scope for
init— setGITHUB_TOKEN .pypircwith PyPI token forship- fastship
What you get
my-lib/
├── src/
│ └── my_lib/ # renamed from my_package
│ ├── __init__.py # version + main entry point
│ ├── __main__.py # python -m support
│ └── py.typed # typed marker
├── tests/
│ └── test_main.py # smoke test
├── pyproject.toml # hatchling, ruff, fastship
├── .python-version # 3.12
├── CHANGELOG.md # fastship-ready
├── .github/workflows/ci.yml
└── LICENSE # Apache 2.0
Architecture
1iis/py — Language template (hatchling, ruff, uv, fastship)
↓
pj-py — init() + ship() from templates
↓
pj — (future) Language-agnostic wrapper
Design
- Pure library — all UX (colors, progress bars, interactive prompts) lives in a higher-level wrapper
- Raise, don't print — errors are exceptions (
PjPyError,AuthError,ShipError) - Blocking —
init()andship()return only when the project is fully ready - Single responsibility — knows Python templates and Python packaging. That's it.
- Lean — delegates to
fastshipfor version bumping and PyPI upload, toghapifor GitHub API, touvfor dependency management
Metadata
Release files for pj-py 0.0.5
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| pj_py-0.0.5.tar.gz | 54.7 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| pj_py-0.0.5-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 64.9 kB
Release files / pj_py-0.0.5.tar.gz
| Download URL | pj_py-0.0.5.tar.gz |
|---|---|
| Size | 54.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
e4f9a02f0234de413a42f1ce2ed7a9eac0f01edbffaacd9ef293b07a3407c86a
|
|
BLAKE2b-256 checksum How to use checksums |
854d65da83f1001a12fe767acdea4c61b1743b58074aae8bc7f800043f5ce5ba
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.12.3
|
Release files / pj_py-0.0.5-py3-none-any.whl
| Download URL | pj_py-0.0.5-py3-none-any.whl |
|---|---|
| Size | 10.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
1aae7a51b7db7a0bf0e5b13979f65301c73b18cd1c8357060e6de87d91b96742
|
|
BLAKE2b-256 checksum How to use checksums |
46a27d2f4cb2b48ae28b4122a6484ea367c8a01142c3c9ef5e88ee5ee7868942
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.12.3
|