Skip to main content

codex-services

PyPI version Python CI License

Pure-Python business logic engines for booking, scheduling, and CRM workflows. No ORM, no framework dependencies — drop into any Python project or use as a building block inside the Codex ecosystem.


Install

pip install codex-services

# With holiday calendar support
pip install "codex-services[calendar]"

Requires Python 3.12 or newer.

Development

uv sync --extra dev
uv run pytest
uv run mypy src/
uv run pre-commit run --all-files
uv build --no-sources

Local code graph

For source-checkout navigation, install Graphify separately and run from this repository root:

graphify update .

This builds an AST-only code graph in graphify-out/, using .graphifyignore to exclude environments, caches, and generated outputs. It does not use the parent workspace graph or an LLM API. Read documentation and skills directly for explanations beyond the code structure; this command does not perform semantic documentation extraction or generate a wiki.

The graph is generated local data and is not committed or shipped in releases. Commit only .graphifyignore and the build instructions. See .agents/rules/graphify.md for navigation and refresh rules.

Quick Start

from codex_services.booking.slot_master import find_slots

result = find_slots(
    request_data={
        "booking_date": "2026-10-12",
        "service_requests": [
            {"service_id": "haircut", "duration_minutes": 60, "possible_resource_ids": ["m1"]},
        ],
    },
    resources_availability=[
        {"resource_id": "m1", "free_windows": [["2026-10-12T09:00:00", "2026-10-12T11:00:00"]]},
    ],
)
for chain in result["solutions"]:
    print(chain["items"][0]["start_time"])

Optional agent skill

Starting with 0.1.4, the package includes an optional skill that helps coding agents use its booking, slot arithmetic, and calendar APIs. The skill is bundled with the library; no separate plugin or download is needed.

From the root of a consuming project, using the Python environment where codex-services is installed:

python -m codex_services.agent_skills install --project .
python -m codex_services.agent_skills status --project .

install copies the versioned guide to .agents/skills/codex-services and adds a scoped instruction to the project's AGENTS.md. The installer stores file hashes in .manifest.json; update and delete refuse to replace locally edited managed files. Put local rules in a separate project-owned skill. The installer preserves unrelated files and AGENTS.md content, and no skill is installed as part of importing or installing the package.

After upgrading the Python package, refresh the project's skill with python -m codex_services.agent_skills update --project .. To remove the managed skill, use python -m codex_services.agent_skills delete --project ..

See the agent skill guide for paths with spaces, status checks, updates, and local-edit recovery.

Modules

Module Extra Description
codex_services.booking.slot_master — Recursive chain-finder for multi-service bookings with scoring and waitlist
codex_services.booking._shared — Low-level slot arithmetic — windows, gaps, busy interval merging
codex_services.calendar [calendar] Calendar grid generator for UI rendering with holiday awareness

Documentation

Full docs with architecture, API reference, and data flow diagrams:

https://codexdlc.github.io/codex-services/

Part of the Codex ecosystem

Package Role
codex-core Foundation — immutable DTOs, PII masking, env settings
codex-platform Infrastructure — Redis, Streams, ARQ workers, Notifications
codex-ai LLM layer — unified async interface for OpenAI, Gemini, Anthropic
codex-services Business logic — Booking engine, CRM, Calendar

Each library is fully standalone — install only what your project needs. Together they form the backbone of codex-bot (Telegram AI-agent infrastructure built on aiogram) and codex-django (Django integration layer).

Metadata

Release files for codex-services 0.1.4

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for codex-services 0.1.4
File Size Uploaded
codex_services-0.1.4.tar.gz 149.4 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for codex-services 0.1.4
File Interpreter ABI Platform
codex_services-0.1.4-py3-none-any.whl Python 3 none any Details

Total release size: 194.1 kB

Release files / codex_services-0.1.4.tar.gz

Download URL codex_services-0.1.4.tar.gz
Size 149.4 kB
Tags Source
SHA-256 checksum
How to use checksums
61e9ea002ee4642e97136a14194a35a93471e4485ecbcaa39949f453afc2e629
BLAKE2b-256 checksum
How to use checksums
d57e21713ccd76d4708be0dbb3526e20625c371820e59f3da046024385a7a8f5
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 9, 2026.

Transparency log

Release files / codex_services-0.1.4-py3-none-any.whl

Download URL codex_services-0.1.4-py3-none-any.whl
Size 44.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
1fbd173c7746265ab3e18a53867d6bbc527315b87130eba9b9903b341969985c
BLAKE2b-256 checksum
How to use checksums
30796bde7dc0f8ac86cc50e0ee55de855e46686b1c081d42e9519ed9aba760b6
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 9, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

0.1.4 This release

2 release files

0.1.3

2 release files

0.1.2

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page