Skip to content

impresso/impresso-content-auth

Repository files navigation

Impresso Content Authorization

A service for authorizing access to Impresso content.

Development

This project uses Poetry for dependency management and mypy for static type checking.

Setup

# Install dependencies
poetry install

# Activate the virtual environment
poetry shell

Running the server

You can run the server using one of these methods:

  1. Using the CLI:
poetry run impresso-auth --server
  1. Running the server module directly:
poetry run python -m impresso_content_auth.server
  1. Using VS Code's launch configurations (press F5)

API Endpoints

  • Health Check: GET /health

Type Checking

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

Pre-commit Hooks

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.

Code generation

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

Docker configuration examples

See the docker/auth_proxy folder for an example of how to run the service in a Docker container and configure it with Nginx.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published