Skip to main content

Reusable business logic engines for Codex platform (CRM, finance, HR, inventory)

Project description

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

Quick Start

from codex_services.booking.slot_master import find_slots, BookingEngineRequest, ServiceRequest, BookingMode
from datetime import date

request = BookingEngineRequest(
    service_requests=[
        ServiceRequest(service_id="haircut", duration_minutes=60, possible_master_ids=["m1", "m2"]),
    ],
    booking_date=date.today(),
    mode=BookingMode.SINGLE_DAY,
)

result = find_slots(request, masters_availability=[...])
if result.has_solutions:
    print(result.best.starts_at)

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).

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_services-0.1.2.tar.gz (128.0 kB view details)

Uploaded Source

Built Distribution

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

codex_services-0.1.2-py3-none-any.whl (32.3 kB view details)

Uploaded Python 3

File details

Details for the file codex_services-0.1.2.tar.gz.

File metadata

  • Download URL: codex_services-0.1.2.tar.gz
  • Upload date:
  • Size: 128.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for codex_services-0.1.2.tar.gz
Algorithm Hash digest
SHA256 09f804db0942162171a95ab88769c294e2abc6deefb1eb233af854e88a01bad6
MD5 504478bd33fe8af5186368184a675049
BLAKE2b-256 9eefa90207773ea37512c26ba1644d68c37baead3effa2a96e625ba23eca3134

See more details on using hashes here.

Provenance

The following attestation bundles were made for codex_services-0.1.2.tar.gz:

Publisher: publish.yml on CodexDLC/codex-services

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file codex_services-0.1.2-py3-none-any.whl.

File metadata

  • Download URL: codex_services-0.1.2-py3-none-any.whl
  • Upload date:
  • Size: 32.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for codex_services-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 20138450c2fbe1c879a2f152737ace2d5e7399769288137be63a10c97e9dbfa7
MD5 02b6547a9f2e3f3b840d9425b0ffba2d
BLAKE2b-256 356e6f5ea4756fede0376d581b6cf1b0b4aa145cff0349f7dd3d8613dcee0294

See more details on using hashes here.

Provenance

The following attestation bundles were made for codex_services-0.1.2-py3-none-any.whl:

Publisher: publish.yml on CodexDLC/codex-services

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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