Skip to main content

Alata

A Python framework for APIs, databases, and background jobs, built on FastAPI and SQLAlchemy.

Alata brings routing, dependency injection, data access, queues, and scheduling into one application with a consistent project structure and command line.

Quick Start

Requires Python 3.12 or later and uv. Alata is available on PyPI.

uvx --from alata alata-new my-project
cd my-project
cp .env.example .env
./alata setup
source .venv/bin/activate
./alata serve

Configure your database in .env and run ./alata migrate before using it. The installation guide covers PostgreSQL, MySQL, and SQLite setup.

The scaffolder requires a new or empty destination directory. Use alata-new . to scaffold into an empty current directory.

Without activating the environment, use uv run ./alata <command>, for example uv run ./alata serve.

Every ./alata command also works with python alata, for example python alata serve, using your environment's Python from the project root.

Use ./alata test, ./alata lint, and ./alata format for everyday development. Pass pytest or Ruff arguments directly, for example ./alata test -k signup -q or ./alata format --check. Run ./alata list for all commands.

Features

  • Service Container — Dependency injection with factory and singleton bindings
  • ORM — Chainable queries, relationships, eager loading, and soft deletes
  • Service Providers — Modular boot lifecycle (register → boot → boot_http)
  • Config Repository — Centralized config() helper with dot-notation access
  • Queue System — Job classes and decorated tasks with Redis, database, and SQS queues
  • Schema Builder — Versioned migrations for PostgreSQL, MySQL, and SQLite
  • Event Dispatcher — Pub/Sub event system with listeners and subscribers
  • Cache — File, Redis, database, and memory stores with sync and async APIs
  • Logging — Multi-channel logging (console, file, Slack, Sentry)
  • Console — Scaffolding, migrations, workers, and scheduled tasks through ./alata
  • Horizon — Optional queue dashboard and worker manager

SQLAlchemy at the core

Alata's models and fluent query builder use SQLAlchemy 2.0. Use the query builder for common operations, including relationships, JSON predicates, and full-text search. For specialized queries, use SQLAlchemy expressions and sessions directly through alata.db.get_session() or get_async_session(). Global scopes and soft-delete filters apply through Alata's query builder; include those conditions explicitly when using raw SQLAlchemy queries.

PostgreSQL, MySQL, and SQLite share the database API. Queries, models, and migrations use SQLAlchemy and database-specific schema grammars. PostgreSQL is the scaffold's default connection. MySQL and SQLite drivers are available through alata[mysql] and alata[sqlite].

Migration commands are serialized on all three databases. PostgreSQL and SQLite apply each migration transactionally; MySQL DDL implicitly commits, so failure recovery uses the migration's down() method. SQLite rebuilds tables automatically for column and constraint changes.

Architecture

app/
├── http/controllers/    # Request handlers
├── models/              # Database models and relationships
├── services/            # Business logic
├── jobs/                # ShouldQueue job classes
├── tasks/               # Decorated queue tasks
├── providers/           # Application service providers
├── events/              # Event payload classes
├── exceptions/          # Exception handler
└── console/             # CLI commands & scheduler
config/                  # Declarative configuration (plain dicts)
routes/                  # API route definitions
bootstrap/               # App factory & provider registration
database/migrations/     # Schema migrations

Documentation

Read the Alata documentation for configuration, API development, database access, queues, and deployment.

Significant design decisions are recorded in architecture decision records.

License

MIT

Metadata

Release files for alata 0.12.0.2

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

Source distribution (sdist)

Source distribution for alata 0.12.0.2
File Size Uploaded Provenance Actions
alata-0.12.0.2.tar.gz 784.1 kB With provenance Details for alata-0.12.0.2.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for alata 0.12.0.2
File Interpreter ABI Platform Actions
alata-0.12.0.2-py3-none-any.whl Python 3 none any Details for alata-0.12.0.2-py3-none-any.whl

Total release size: 1.2 MB

Release files / alata-0.12.0.2.tar.gz

Download URL alata-0.12.0.2.tar.gz
Size 784.1 kB
Tags Source
SHA-256 checksum
How to use checksums
74963e443fd46d42f87cf8e831d92650f41e24b290d39db9f68d992b9d6af2dd
BLAKE2b-256 checksum
How to use checksums
484943aae402d226134859f8b26199b6d8b5944a326911eab3522ff93b02720c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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 30, 2026.

Transparency log

Release files / alata-0.12.0.2-py3-none-any.whl

Download URL alata-0.12.0.2-py3-none-any.whl
Size 425.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
23fd8d2db8b4842dbd7c35d5f77046d1c819b5c687cbce6d5d85204a0697252c
BLAKE2b-256 checksum
How to use checksums
d5767d957861c213ff8df0c37d37ae2dbf7d33e2715ebc729f7a7c81c2e56682
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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 30, 2026.

Transparency log

Security for alata 0.12.0.2

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.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for alata-0.12.0.2.tar.gz

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 30, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.12.0.2 This release

2 release files Full provenance

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