Installation¶
This guide will walk you through installing Artanis and setting up your development environment.
Requirements¶
Before installing Artanis, ensure you have:
- Python 3.8+ - Artanis supports Python 3.8, 3.9, 3.10, 3.11, and 3.13
- pip - Python package manager (usually comes with Python)
- venv (recommended) - For creating isolated Python environments
Install from PyPI¶
The easiest way to install Artanis is using pip:
This installs the latest stable version of Artanis with zero runtime dependencies.
Development Installation¶
If you want to contribute to Artanis or need the latest development features:
Clone the Repository¶
Create Virtual Environment¶
Install in Development Mode¶
# Install with all development dependencies
pip install -e ".[dev]"
# Or install specific dependency groups
pip install -e ".[test]" # Testing dependencies only
pip install -e ".[all]" # All optional dependencies
Verify Installation¶
Create a simple test to verify Artanis is installed correctly:
from artanis import App
import artanis
print(f"Artanis version: {artanis.__version__}")
app = App()
async def hello():
return {"message": "Artanis is working!"}
app.get("/", hello)
print("✅ Artanis installed successfully!")
Run the test:
You should see output like:
Optional Dependencies¶
Artanis has zero runtime dependencies, but you may want to install additional packages for development:
ASGI Server (Required for Running Apps)¶
Development Tools¶
# Code quality tools (included in [dev] group)
pip install ruff mypy pre-commit
# Testing tools (included in [test] group)
pip install pytest pytest-asyncio pytest-cov
# Documentation tools
pip install mkdocs mkdocs-material mkdocstrings[python]
Database Drivers (for tutorials and examples)¶
# For SQLite (built into Python)
# No additional installation needed
# For PostgreSQL
pip install asyncpg
# For MySQL
pip install aiomysql
Available Dependency Groups¶
When installing in development mode, you can use these dependency groups:
Group | Description | Installation |
---|---|---|
dev |
Development tools (ruff, mypy, pre-commit, pytest) | pip install -e ".[dev]" |
test |
Testing and coverage tools | pip install -e ".[test]" |
all |
All optional dependencies | pip install -e ".[all]" |
Installation Troubleshooting¶
Common Issues¶
Python Version
Make sure you're using Python 3.8 or higher:
If you see Python 2.x, try usingpython3
instead of python
.
Virtual Environment
Always use a virtual environment to avoid dependency conflicts:
Permission Errors
If you get permission errors, avoid using sudo
. Instead:
- Use a virtual environment (recommended)
- Use the --user
flag: pip install --user artanis
Platform-Specific Notes¶
- Download Python from python.org
- Make sure to check "Add Python to PATH" during installation
- Open Command Prompt or PowerShell:
Next Steps¶
Now that you have Artanis installed, you're ready to:
- Create your first application - Build a simple "Hello World" app
- Follow the tutorial - Build a complete blog API step-by-step
- Explore examples - See working code for common patterns
Getting Help¶
If you encounter issues during installation:
- Check the GitHub Issues for common problems
- Search existing issues on GitHub
- Create a new issue with:
- Your operating system and version
- Python version (
python --version
) - Full error message
- Steps to reproduce the problem