{"id":25426730,"url":"https://github.com/seapagan/fastapi-users-example","last_synced_at":"2026-05-01T04:38:34.072Z","repository":{"id":277814376,"uuid":"933572000","full_name":"seapagan/fastapi-users-example","owner":"seapagan","description":"Example FastAPI app using 'fastapi-users' for Authentication","archived":false,"fork":false,"pushed_at":"2025-02-16T10:27:22.000Z","size":0,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-16T10:28:44.690Z","etag":null,"topics":["async","fastapi","fastapi-users","python","python3","sqlalchemy"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/seapagan.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2025-02-16T09:43:59.000Z","updated_at":"2025-02-16T10:27:26.000Z","dependencies_parsed_at":"2025-02-16T10:38:53.458Z","dependency_job_id":null,"html_url":"https://github.com/seapagan/fastapi-users-example","commit_stats":null,"previous_names":["seapagan/fastapi-users-example"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/seapagan%2Ffastapi-users-example","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/seapagan%2Ffastapi-users-example/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/seapagan%2Ffastapi-users-example/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/seapagan%2Ffastapi-users-example/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/seapagan","download_url":"https://codeload.github.com/seapagan/fastapi-users-example/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":239214019,"owners_count":19601072,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["async","fastapi","fastapi-users","python","python3","sqlalchemy"],"created_at":"2025-02-17T00:21:34.762Z","updated_at":"2026-05-01T04:38:33.995Z","avatar_url":"https://github.com/seapagan.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# FastAPI Auth Example\n\nThis is an example of how to use [FastAPI](https://fastapi.tiangolo.com/) with\nJWT authentication, using the\n[fastapi_users](https://fastapi-users.github.io/fastapi-users/) library. It also\nhas `async` database access using [SQLAlchemy](https://www.sqlalchemy.org/)\n\nCurrently uses **SQLite** as the database, but can be easily changed to any\nother database. It largely follows the example in the fastapi-users\ndocumentation, however I have laid the project out in a way that I find more\nreadable and maintainable.\n\nWe use the [database\nstrategy](https://fastapi-users.github.io/fastapi-users/latest/configuration/authentication/strategies/database/)\ninstead of the default `jwt` strategy, as it allows us to invalidate tokens on\nthe server side. For the Transport, we use the\n[Bearer](https://fastapi-users.github.io/fastapi-users/latest/configuration/authentication/transports/bearer/)\nstrategy where the token is sent in the `Authorization` header.\n\nThe project uses [uv](https://docs.astral.sh/uv/) to manage the dependencies. To\ninstall the dependencies and switch to the virtual environment, run:\n\n```bash\nuv sync\nsource .venv/bin/activate # On Windows, use .venv\\Scripts\\activate\n```\n\nNow you can run the project with:\n\n```bash\npython main.py\n```\n\n\u003e [!NOTE]\n\u003e\n\u003e The above uses the `--reload` option, so the server will restart whenever you\n\u003e change a file. This is useful for development, but not recommended for\n\u003e production.\n\nThe project will be available at `http://localhost:8000`.\n\nYou can access the API documentation at `http://localhost:8000/docs` (or\n`http://localhost:8000/redoc` if you prefer that).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fseapagan%2Ffastapi-users-example","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fseapagan%2Ffastapi-users-example","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fseapagan%2Ffastapi-users-example/lists"}