alata.
Getting Started

Installation

Scaffold a new Alata project, install dependencies, and boot the development server.

Alata projects are generated by the alata-new scaffolder, which copies a complete, runnable project template — application code, configuration, migrations, and tooling — into a new directory. This page takes you from an empty folder to a responding /health endpoint.

Prerequisites

  • Python 3.12 or newer — the framework requires python >= 3.12.
  • uv — the package manager used by ./alata setup.
  • Database — PostgreSQL, MySQL 8.0+, or SQLite 3.35+. MySQL and SQLite drivers install as optional extras (alata[mysql], alata[sqlite]). See database configuration to choose your connection.
  • Redis — needed when using Redis queues or caching. The default cache uses local files.

Creating a project

Run the scaffolder

The alata-new console script ships with the alata package. The easiest way to run it without installing anything permanently is uvx:

Terminal
uvx --from alata alata-new my-app

If you already have alata installed in an environment, just run:

alata-new my-app

Use a new or empty directory. Pass . instead of a name to scaffold into an empty current directory.

The scaffolder copies the project template and stamps your project name into pyproject.toml and README.md.

Look at what was generated

The scaffolder produces a complete application skeleton:

my-app/
├── alata                 # console entry point (./alata <command>)
├── main.py               # uvicorn entry point (main:app)
├── pyproject.toml
├── .env.example
├── app/                  # your application code
├── bootstrap/            # the application kernel
├── config/               # configuration modules
├── database/migrations/  # starter database migrations
├── routes/               # route definitions
├── storage/              # logs and framework runtime files
└── tests/                # a passing starter test

The directory structure page walks through every directory in detail.

Install dependencies

cd my-app
./alata setup

This creates the project's virtual environment and installs Alata from PyPI, along with the server and development tools. The generated pyproject.toml already declares the framework dependency.

Activate it before running the remaining commands:

source .venv/bin/activate

Alternatively, run commands with uv run ./alata, for example uv run ./alata migrate, without activating the environment.

All ./alata examples also work with python alata, such as python alata migrate. Run them from your application's root directory using the project's Python environment. See running commands for examples.

Configure your environment

cp .env.example .env

Open .env and configure your chosen database with DB_CONNECTION and its connection settings. The generated settings default to PostgreSQL; MySQL uses server credentials, and SQLite uses a database file path. Set REDIS_URL if you use Redis for caching or queues. The file also sets APP_ENV=local, which the kernel reads to resolve the environment at boot.

Run the starter migrations

./alata migrate

The starter migrations create tables for users, caching, queued jobs, job batches, failed jobs, and job results. Check the result with:

./alata migrate:status

Boot the development server

./alata serve

./alata serve starts a uvicorn server on 127.0.0.1:8000 with hot reload enabled — pass --host, --port, --workers, or --no-reload to tune it.

You can also start uvicorn yourself against the ASGI entry point:

uvicorn bootstrap.app:app --reload
# or: python main.py

All of these load the same application kernel.

Verify it works

The framework mounts health endpoints automatically — no route registration needed:

curl http://127.0.0.1:8000/health
# {"status": "ok"}

curl http://127.0.0.1:8000/health/db
# {"status": "ok", "connections": {"default": "ok"}}

And the template's welcome route:

curl http://127.0.0.1:8000/api/v1/
# {"message": "Welcome to Alata Framework!"}

Finally, run the starter test suite:

./alata test

Next steps

Explore the CLI — ./alata list shows every registered command, including the migrate family, queue:work, schedule:run, and the make:* generators. Then read about the directory structure and the application lifecycle to understand what you just booted.

On this page