A service for authorizing access to Impresso content.
This project uses Poetry for dependency management and mypy for static type checking.
# Install dependencies
poetry install
# Activate the virtual environment
poetry shell
You can run the server using one of these methods:
- Using the CLI:
poetry run impresso-auth --server
- Running the server module directly:
poetry run python -m impresso_content_auth.server
- Using VS Code's launch configurations (press F5)
- Health Check:
GET /health
This project uses mypy for static type checking. To run mypy:
poetry run mypy impresso_content_auth
Or use the VS Code task: Terminal > Run Task > Run mypy
This project uses pre-commit hooks to ensure code quality. To install the pre-commit hooks:
poetry run pre-commit install
This will run mypy automatically before committing code.
poetry run datamodel-codegen \
--input impresso_content_auth/models/resources/schemas/ \
--output impresso_content_auth/models/generated \
--input-file-type jsonschema \
--output-model-type dataclasses.dataclass \
--use-field-description \
--use-schema-description
See the docker/auth_proxy folder for an example of how to run the service in a Docker container and configure it with Nginx.