A minimal Python library scaffold for codex-python
Project description
codex-python
A minimal Python library scaffold using uv with Python 3.13+.
Quickstart
- Requires Python 3.13+.
- Package import name:
codex. - Distribution name (PyPI):
codex-python.
Repo
- Git:
git@github.com:gersmann/codex-python.git - URL: https://github.com/gersmann/codex-python
Usage
Basic non-interactive execution via Codex CLI:
from codex import run_exec
out = run_exec("explain this repo")
print(out)
Options:
- Choose model:
run_exec("...", model="gpt-4.1") - Full auto:
run_exec("scaffold a cli", full_auto=True) - Run in another dir:
run_exec("...", cd="/path/to/project")
Using a client with defaults:
from codex import CodexClient
client = CodexClient(model="gpt-4.1", full_auto=True)
print(client.run("explain this repo"))
Install uv
- macOS (Homebrew):
brew install uv - Or via install script:
- Unix/macOS:
curl -LsSf https://astral.sh/uv/install.sh | sh - Windows (PowerShell):
iwr https://astral.sh/uv/install.ps1 -UseBasicParsing | iex
- Unix/macOS:
See: https://docs.astral.sh/uv/
Create a virtual env (optional)
uv python install 3.13
uv venv --python 3.13
. .venv/bin/activate # or .venv\Scripts\activate on Windows
Build
uv build
Artifacts appear in dist/ (.whl and .tar.gz).
Publish to PyPI
- Manual:
export PYPI_API_TOKEN="pypi-XXXX" # create at https://pypi.org/manage/account/token/
uv publish --token "$PYPI_API_TOKEN"
- GitHub Actions: add a repository secret
PYPI_API_TOKENand push a tag likev0.1.0. The workflow at.github/workflows/publish.ymlbuilds and publishes withuvonv*tags.
Dev tooling
- Lint:
make lint(ruff + mypy) - Tests:
make test(pytest) - Format:
make fmt(ruff formatter) - Pre-commit:
uvx pre-commit install && uvx pre-commit run --all-files
Project Layout
.
├── codex/ # package root (import name: codex)
│ └── __init__.py # version lives here
├── pyproject.toml # PEP 621 metadata, hatchling build backend
├── README.md
└── .gitignore
Versioning
Version is managed via codex/__init__.py and exposed as __version__. The build uses Hatch’s version source.
Python Compatibility
- Requires Python
>=3.13.
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 codex_python-0.1.0.tar.gz.
File metadata
- Download URL: codex_python-0.1.0.tar.gz
- Upload date:
- Size: 8.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.7.19
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
fda0e8212b38384450fb75ca423e8c61f44c58bf89b3746a88ea5d3ae988b3a7
|
|
| MD5 |
f79aac7cdf579da58b3fef9c790fc852
|
|
| BLAKE2b-256 |
a9d3c4ae3cd82a3818d048c31d47846eb077da322b13934b9255df29c2c731d4
|
File details
Details for the file codex_python-0.1.0-py3-none-any.whl.
File metadata
- Download URL: codex_python-0.1.0-py3-none-any.whl
- Upload date:
- Size: 5.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.7.19
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0715dfb0bc07e5f58d97e7259aba818f7411b2fb08a30873f502cfb6094c97fb
|
|
| MD5 |
22e173dfde39dc9640637df2ebabf871
|
|
| BLAKE2b-256 |
e5b6778130199f46dd90bb9e3d3e0cffe91cc8d4e1c9cdd7eb2d9b4d1e44351f
|