Spawn Python projects from templates.
Project description
pj-py
Spawn Python projects from templates — one command, zero manual setup.
What it does
Create a new Python project ready for uv run pytest:
pip install pj-py
pj-py init my-lib
This spawns a new GitHub repo from 1iis/py (the reference Python template), clones it locally, renames everything to match your project, installs deps, and makes the initial commit. You start coding immediately — no scaffolding, no boilerplate.
Prerequisites
- Python 3.10+
- uv (install)
- GitHub token with repo scope — set
GITHUB_TOKENin your environment or passtoken=... - git
Usage
from pj_py import init
p = init("my-lib")
# → Project(owner="1iis", repo="my-lib", path=Path("my-lib"))
CLI (for testing)
pj-py init my-lib -d "Does one thing well"
The full CLI experience lives in the higher-level pj wrapper (coming soon).
Options
| Param | Default | Description |
|---|---|---|
name |
(required) | Repo name and local directory |
desc |
"" |
Short project description |
template |
"py" |
Alias resolves to 1iis/py. Full owner/repo also accepted |
org |
"1iis" |
GitHub org/owner for the new repo |
private |
True |
Whether the new repo is private |
path |
cwd |
Parent directory for the local clone |
token |
$GITHUB_TOKEN |
GitHub personal access token |
What you get
A project following the 1iis/py template conventions:
my-lib/
├── src/
│ └── my_lib/ # package directory, renamed from my_package
│ ├── __init__.py # version + main entry point
│ ├── __main__.py # python -m support
│ └── py.typed # typed package marker
├── tests/
│ └── test_main.py # smoke test, imports from your package
├── pyproject.toml # hatchling build, ruff linting, fastship deploy
├── .python-version # pinned to 3.12
├── CHANGELOG.md # fastship-ready
├── .github/workflows/ci.yml
└── LICENSE # Apache 2.0
Why not just use gh repo create --template?
That command creates the repo but leaves you with:
pyproject.tomlstill saysmy-packagesrc/my_package/hasn't been renamed- Tests import from
my_package - No
uv synchas run - No initial commit
pj-py automates all of that.
Architecture
1iis/py — Language template (hatchling, ruff, uv, fastship)
↓
pj-py — Spawns + renames + syncs + commits from templates
↓
pj — Language-agnostic wrapper routing to pj-py, pj-js, etc.
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) for programmatic consumption - Blocking —
init()returns only when the project is fully ready - Single responsibility — knows Python templates. That's it.
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
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file pj_py-0.0.3.tar.gz.
File metadata
- Download URL: pj_py-0.0.3.tar.gz
- Upload date:
- Size: 52.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3e2cf50e4e5b01c347d51b86946f044b57cf622715992bf156a0014184509d68
|
|
| MD5 |
3a78b837884f2000274db3374ec59a55
|
|
| BLAKE2b-256 |
60edfb45dc032fdc84d09a035f575aa21d7f2ac8ba8a8ff3fe1977c01d8eb328
|
File details
Details for the file pj_py-0.0.3-py3-none-any.whl.
File metadata
- Download URL: pj_py-0.0.3-py3-none-any.whl
- Upload date:
- Size: 10.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9ceb01de9a03c28b86fa6e661c8ca97e8fb47ad9aa682fbe1c83e80bc04d7c88
|
|
| MD5 |
54b2a670289ca051c04c88080af8a814
|
|
| BLAKE2b-256 |
088812885373e69860cab1ec57101c2c711275900e32cb6c187627f9ee11a331
|