[tool.isort] profile = "black" [[tool.mypy.overrides]] module = "motor.*" ignore_missing_imports = true [[tool.mypy.overrides]] module = "passlib.*" ignore_missing_imports = true [[tool.mypy.overrides]] module = "fastapi_users_db_beanie.*" ignore_missing_imports = true [[tool.mypy.overrides]] module = "fastapi_users_db_sqlalchemy.*" ignore_missing_imports = true [tool.pytest.ini_options] asyncio_mode = "auto" addopts = "--ignore=test_build.py" asyncio_default_fixture_loop_scope = "session" markers = [ "authentication", "db", "fastapi_users", "jwt", "manager", "oauth", "openapi", "router", ] [tool.ruff] target-version = "py310" [tool.ruff.lint] extend-select = ["UP", "TRY"] [tool.hatch] [tool.hatch.metadata] allow-direct-references = true [tool.hatch.version] source = "regex_commit" commit_extra_args = ["-e"] path = "fastapi_users/__init__.py" [tool.hatch.envs.default] installer = "uv" features = [ "sqlalchemy", "beanie", "oauth", "redis", ] dependencies = [ "pytest", "isort", "pytest-asyncio", "mike", "mkdocs", "mkdocs-material", "mkdocs-mermaid2-plugin", "mypy", "pytest-cov", "pytest-mock", "markdown-include", "pygments", "pymdown-extensions", "httpx-oauth", "httpx", "asgi_lifespan", "uvicorn", "types-redis", "ruff", ] [tool.hatch.envs.default.scripts] lint = [ "isort ./fastapi_users ./tests", "isort ./docs/src -o fastapi_users", "isort ./examples -o fastapi_users -p app", "ruff format .", "ruff check --fix .", "mypy fastapi_users/", ] lint-check = [ "isort --check-only ./fastapi_users ./tests", "isort --check-only ./docs/src -o fastapi_users", "isort --check-only ./examples -o fastapi_users -p app", "ruff format .", "ruff check .", "mypy fastapi_users/", ] docs = "mkdocs serve" test = "pytest --cov=fastapi_users/ --cov-report=term-missing --cov-fail-under=100" test-cov-xml = "pytest --cov=fastapi_users/ --cov-report=xml --cov-fail-under=100" [tool.hatch.build.targets.sdist] support-legacy = true # Create setup.py [build-system] requires = ["hatchling", "hatch-regex-commit"] build-backend = "hatchling.build" [project] name = "fastapi-users" authors = [ { name = "François Voron", email = "fvoron@gmail.com" } ] description = "Ready-to-use and customizable users management for FastAPI" readme = "README.md" dynamic = ["version"] classifiers = [ "License :: OSI Approved :: MIT License", "Development Status :: 5 - Production/Stable", "Framework :: FastAPI", "Framework :: AsyncIO", "Intended Audience :: Developers", "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", "Programming Language :: Python :: 3.12", "Programming Language :: Python :: 3.13", "Programming Language :: Python :: 3.14", "Programming Language :: Python :: 3 :: Only", "Topic :: Internet :: WWW/HTTP :: Session", ] requires-python = ">=3.10" dependencies = [ "fastapi >=0.65.2", "pwdlib[argon2,bcrypt] ==0.2.1", "email-validator >=1.1.0,<2.4", "pyjwt[crypto] ==2.10.1", "python-multipart ==0.0.20", "makefun >=1.11.2,<2.0.0", ] [project.optional-dependencies] sqlalchemy = [ "fastapi-users-db-sqlalchemy >=7.0.0", ] beanie = [ "fastapi-users-db-beanie >=4.0.0", ] oauth = [ "httpx-oauth >=0.13" ] redis = [ "redis >=4.3.3,<8.0.0", ] [project.urls] Documentation = "https://fastapi-users.github.io/fastapi-users/" Source = "https://github.com/fastapi-users/fastapi-users"