Skip to main content

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

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

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_TOKEN and push a tag like v0.1.0. The workflow at .github/workflows/publish.yml builds and publishes with uv on v* 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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

codex_python-0.1.0.tar.gz (8.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

codex_python-0.1.0-py3-none-any.whl (5.8 kB view details)

Uploaded Python 3

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

Hashes for codex_python-0.1.0.tar.gz
Algorithm Hash digest
SHA256 fda0e8212b38384450fb75ca423e8c61f44c58bf89b3746a88ea5d3ae988b3a7
MD5 f79aac7cdf579da58b3fef9c790fc852
BLAKE2b-256 a9d3c4ae3cd82a3818d048c31d47846eb077da322b13934b9255df29c2c731d4

See more details on using hashes here.

File details

Details for the file codex_python-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for codex_python-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 0715dfb0bc07e5f58d97e7259aba818f7411b2fb08a30873f502cfb6094c97fb
MD5 22e173dfde39dc9640637df2ebabf871
BLAKE2b-256 e5b6778130199f46dd90bb9e3d3e0cffe91cc8d4e1c9cdd7eb2d9b4d1e44351f

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page