Thank you for considering contributing to altissimo-auth! This guide will help you get started.
- Python 3.11+
- Poetry 2.0+
# Clone the repository
git clone https://github.com/altissimo-hq/auth-providers-python.git
cd auth-providers-python
# Install all dependencies (including dev and all optional extras)
poetry sync
# Install pre-commit hooks
poetry run pre-commit install
# Verify everything works
poetry run pytest
poetry run ruff check .
poetry run ruff format --check .# Run all tests
poetry run pytest
# Run with coverage
poetry run pytest --cov=altissimo --cov-report=term-missing
# Run a specific test file
poetry run pytest tests/test_models.py
# Run a specific test
poetry run pytest tests/test_models.py::TestGoogleUser::test_email_lowercased# Check for lint errors
poetry run ruff check .
# Auto-fix lint errors
poetry run ruff check --fix .
# Check formatting
poetry run ruff format --check .
# Auto-format
poetry run ruff format .Pre-commit hooks run automatically on git commit. To run them manually:
poetry run pre-commit run --all-files- Type hints: All public APIs must have complete type annotations
- Docstrings: All public classes and methods must have docstrings
- Tests: All new features must include tests; aim for >90% coverage
- Linting: Code must pass
ruff checkandruff formatwith the project's configuration
altissimo.auth
├── core/ # Framework-agnostic models, exceptions, policies
├── providers/ # Token/key verification (stateless, no framework deps)
├── service.py # AuthService orchestration layer
├── fastapi/ # FastAPI Depends() wrappers
└── ninja/ # Django Ninja auth classes
- Providers are framework-agnostic and contain the actual auth logic
- AuthService wires providers + policies together
- Adapters (FastAPI, Ninja) are thin wrappers that delegate to AuthService
- Protocols (e.g.,
APIKeyBackend,WebhookVerifier) allow pluggable backends
- Create
src/altissimo/auth/providers/your_provider.py - Add methods to
AuthServiceinservice.py - Add adapter methods in
fastapi/__init__.pyand/orninja/__init__.py - Add tests in
tests/providers/test_your_provider.py - Export from
providers/__init__.py
- Fork the repository
- Create a feature branch (
git checkout -b feature/my-feature) - Make your changes with tests
- Ensure all checks pass (
poetry run pytest && poetry run ruff check .) - Commit with a descriptive message
- Push to your fork and open a Pull Request
By contributing, you agree that your contributions will be licensed under the Apache License 2.0.