{"id":21944257,"url":"https://github.com/dmitrytokyo/fastapi_session_auth","last_synced_at":"2026-04-16T10:33:15.307Z","repository":{"id":243495710,"uuid":"812586043","full_name":"DmitryTokyo/fastapi_session_auth","owner":"DmitryTokyo","description":"Fastapi draft project with session bases auth. Using htmx","archived":false,"fork":false,"pushed_at":"2024-06-17T15:40:59.000Z","size":254,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-09-07T07:20:50.988Z","etag":null,"topics":["admin-dashboard","authentication","authorization","fastapi","htmx","session","sqlalchemy"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/DmitryTokyo.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":"2024-06-09T10:18:40.000Z","updated_at":"2024-08-12T11:44:10.000Z","dependencies_parsed_at":"2024-06-09T11:47:19.155Z","dependency_job_id":"ca59a34b-8b61-44f6-b7e5-5b2434f96cfd","html_url":"https://github.com/DmitryTokyo/fastapi_session_auth","commit_stats":null,"previous_names":["dmitrytokyo/fastapi_session_auth"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/DmitryTokyo/fastapi_session_auth","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DmitryTokyo%2Ffastapi_session_auth","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DmitryTokyo%2Ffastapi_session_auth/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DmitryTokyo%2Ffastapi_session_auth/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DmitryTokyo%2Ffastapi_session_auth/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/DmitryTokyo","download_url":"https://codeload.github.com/DmitryTokyo/fastapi_session_auth/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DmitryTokyo%2Ffastapi_session_auth/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31882264,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-16T09:23:21.276Z","status":"ssl_error","status_checked_at":"2026-04-16T09:23:15.028Z","response_time":69,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["admin-dashboard","authentication","authorization","fastapi","htmx","session","sqlalchemy"],"created_at":"2024-11-29T04:15:11.940Z","updated_at":"2026-04-16T10:33:15.284Z","avatar_url":"https://github.com/DmitryTokyo.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# FastAPI Template Project with Session Authentication, Jinja2, and HTMX\n\nThis project serves as a template for creating web applications using FastAPI, Jinja2 templates, and HTMX for dynamic interactions. The goal is to provide a ready-to-use framework that includes session-based authentication, admin interface with authentication, unit tests for CRUD operations and main routes, and Docker support. This allows developers to focus on implementing their specific logic without worrying about the underlying infrastructure and services.\n\n## Features\n- Session-based authentication\n- SQLAlchemy admin with authentication\n- Unit tests for CRUD operations and main routes\n- Dockerfile for containerization\n\n## Environment Variables\n- `SECRET_KEY`: A secret key for securing the session data.\n- `DB_URL`: The database URL in a format understood by SQLAlchemy. For example, `postgres://user:password@localhost/dbname`. More details can be found [here](https://pypi.org/project/dj-database-url/).\n- `DEV`: Specifies the environment. Possible values are `Dev`, `Test`, `Prod`, or any other custom environment you might add.\n\n## Running Tests\nAll tests use SQLite for the database (it is created locally). To run the unit tests for CRUD operations and main routes, use the following command:\n```shell\nmake tests\n```\n\n## Usage\n\n### In the local machine\nYou can start application by command:\n```shell\nmake runserver\n```\n\n### Using Docker\n\nAt first, you need to create a `.env` file in the root directory of your project with the following variables:\n\n```plaintext\nSECRET_KEY=your_secret_key\nDB_URL=your_database_url\nDEV=True\nPOSTGRES_USER=your_postgres_user\nPOSTGRES_PASSWORD=your_postgres_password\nPOSTGRES_DB=your_postgres_db\n```\n\n1. Use bash script (docker-compose inside)\n```shell\nchmod +x run.sh\n```\nand then\n```shell\n./run.sh\n```\n2. Use Docker CLI\n```shell\ndocker build -t fastapi-app:latest .\ndocker run -d -p 8000:5000 fastapi-app\n```\n## Interactive Shell\nYou can interact with the objects and application logic using an IPython shell. To start the IPython shell, use the following command:\n```shell\nmake ipython\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdmitrytokyo%2Ffastapi_session_auth","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdmitrytokyo%2Ffastapi_session_auth","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdmitrytokyo%2Ffastapi_session_auth/lists"}