[project] name = "authentik" version = "2025.2.4" description = "" authors = [{ name = "authentik Team", email = "hello@goauthentik.io" }] requires-python = "==3.12.*" dependencies = [ "argon2-cffi", "celery", "channels", "channels-redis", "cryptography", "dacite", "deepmerge", "defusedxml", "django", "django-countries", "django-cte", "django-filter", "django-guardian", "django-model-utils", "django-pglock", "django-prometheus", "django-redis", "django-storages[s3]", "django-tenants", "djangorestframework", "djangorestframework-guardian", "docker", "drf-orjson-renderer", "drf-spectacular", "dumb-init", "duo-client", "fido2", "flower", "geoip2", "geopy", "google-api-python-client", "gssapi", "gunicorn", "jsonpatch", "jwcrypto", "kubernetes", "ldap3", "lxml", "msgraph-sdk", "opencontainers", "packaging", "paramiko", "psycopg[c, pool]", "pydantic", "pydantic-scim", "pyjwt", "pyrad", "python-kadmin-rs ==0.6.0", "pyyaml", "requests-oauthlib", "scim2-filter-parser", "sentry-sdk", "service_identity", "setproctitle", "structlog", "swagger-spec-validator", "tenant-schemas-celery", "twilio", "ua-parser", "unidecode", "urllib3 <3", "uvicorn[standard]", "watchdog", "webauthn", "wsproto", "xmlsec <= 1.3.14", "zxcvbn", ] [dependency-groups] dev = [ "aws-cdk-lib", "bandit", "black", "bump2version", "channels[daphne]", "codespell", "colorama", "constructs", "coverage[toml]", "debugpy", "drf-jsonschema-serializer", "freezegun", "importlib-metadata", "k5test", "pdoc", "pytest", "pytest-django", "pytest-github-actions-annotate-failures", "pytest-randomly", "pytest-timeout", "requests-mock", "ruff", "selenium", ] [tool.uv.sources] django-tenants = { git = "https://github.com/rissson/django-tenants.git", branch = "authentik-fixes" } opencontainers = { git = "https://github.com/BeryJu/oci-python", rev = "c791b19056769cd67957322806809ab70f5bead8" } djangorestframework = { git = "https://github.com/authentik-community/django-rest-framework", rev = "896722bab969fabc74a08b827da59409cf9f1a4e" } [project.scripts] ak = "lifecycle.ak:main" [build-system] requires = ["hatchling"] build-backend = "hatchling.build" [tool.bandit] exclude_dirs = ["**/node_modules/**"] [tool.codespell] skip = [ "**/node_modules", "**/package-lock.json", "schema.yml", "unittest.xml", "./blueprints/schema.json", "go.sum", "locale", "**/dist", "**/storybook-static", "**/web/src/locales", "**/web/xliff", "./web/storybook-static", "./web/custom-elements.json", "./website/build", "./gen-ts-api", "./gen-py-api", "./gen-go-api", "*.api.mdx", "./htmlcov", ] dictionary = ".github/codespell-dictionary.txt,-" ignore-words = ".github/codespell-words.txt" [tool.black] line-length = 100 target-version = ['py312'] exclude = 'node_modules' [tool.ruff] line-length = 100 target-version = "py312" exclude = ["**/migrations/**", "**/node_modules/**"] [tool.ruff.lint] select = [ # pycodestyle "E", # Pyflakes "F", # isort "I", # pyupgrade "UP", # flake8-bugbear "B", # django "DJ", # pylint "PL", ] ignore = [ "DJ001", # Avoid using `null=True` on string-based fields, ] [tool.ruff.lint.pylint] max-args = 7 max-branches = 18 max-returns = 10 [tool.coverage.run] source = ["authentik"] relative_files = true omit = [ "*/asgi.py", "manage.py", "*/migrations/*", "*/management/commands/*", "*/apps.py", "website/", ] [tool.coverage.report] sort = "Cover" skip_covered = true precision = 2 exclude_lines = [ "pragma: no cover", # Don't complain about missing debug-only code: "def __unicode__", "def __str__", "def __repr__", "if self.debug", "if TYPE_CHECKING", # Don't complain if tests don't hit defensive assertion code: "raise AssertionError", "raise NotImplementedError", # Don't complain if non-runnable code isn't run: "if 0:", "if __name__ == .__main__.:", ] show_missing = true [tool.pytest.ini_options] DJANGO_SETTINGS_MODULE = "authentik.root.settings" python_files = ["tests.py", "test_*.py", "*_tests.py"] junit_family = "xunit2" addopts = "-p no:celery -p authentik.root.test_plugin --junitxml=unittest.xml -vv --full-trace --doctest-modules --import-mode=importlib" filterwarnings = [ "ignore:defusedxml.lxml is no longer supported and will be removed in a future release.:DeprecationWarning", "ignore:SelectableGroups dict interface is deprecated. Use select.:DeprecationWarning", ]