Installation
Meet Almasix
Section titled “Meet Almasix”Almasix is a Python web framework with expressive structure and first-class
async/await for ASGI. Create applications with almasix new, then drive them
with Smith — Almasix’s in-app CLI:
almasix new blogcd blogpip install -e .smith serveTemplates, routing, validation, localization, and the ORM all live behind the
almasix.* package. You write application code; Almasix boots the container,
compiles your routes, and serves them over ASGI.
Requirements
Section titled “Requirements”- Python 3.11 or higher
pipand a virtual environment- Node.js 18+ (optional but recommended) for the default Vite + Tailwind toolchain
Creating an Almasix project
Section titled “Creating an Almasix project”-
Install Almasix (from PyPI, or from a local checkout while developing against main):
Terminal window pip install almasix# or, from a local clone of the framework:pip install -e /path/to/almasix -
Create a new application:
Terminal window almasix new blogcd blog -
Create a virtual environment and install dependencies:
Terminal window python -m venv .venvsource .venv/bin/activatepip install -e . # your apppip install almasix # or -e /path/to/almasix during local development -
Install frontend dependencies (Vite + Tailwind):
Terminal window npm install -
Start the development server:
Terminal window smith serveVisit the URL Smith prints (typically
http://127.0.0.1:3000). In another terminal, runnpm run devwhile iterating on CSS/JS.
Directory structure at a glance
Section titled “Directory structure at a glance”A fresh application looks like this:
blog/ app/ http/controllers/ models/ providers/ bootstrap/app.py config/ database/migrations/ database/seeders/ resources/css/ resources/js/ routes/web.py routes/api.py package.json vite.config.js smithRead more in Directory Structure and Asset Bundling.
Database drivers
Section titled “Database drivers”SQLite works out of the box. For other engines, install the matching optional extra:
pip install almasix[pgsql] # PostgreSQLpip install almasix[mysql] # MySQL / MariaDBpip install almasix[sqlsrv] # SQL Serverpip install almasix[oracle] # Oracle (optional)pip install almasix[db] # all of the aboveConfigure connections in config/database.py — see Database: Getting Started.