Skip to content

Commit af6cee2

Browse files
committed
some change in readme, added new images, small fix in conftest in fastapi-user template
1 parent 2984b46 commit af6cee2

File tree

5 files changed

+19
-5
lines changed

5 files changed

+19
-5
lines changed

README.md

Lines changed: 19 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,15 @@
22
<img src="https://github.com/rafsaf/minimal-fastapi-postgres-template/workflows/tests/badge.svg" alt="Test">
33
</a>
44

5-
<a href="https://github.com/rafsaf/respo/blob/main/LICENSE" target="_blank">
6-
<img src="https://img.shields.io/github/license/rafsaf/respo" alt="License">
5+
<a href="https://github.com/rafsaf/minimal-fastapi-postgres-template/blob/main/LICENSE" target="_blank">
6+
<img src="https://img.shields.io/github/license/rafsaf/minimal-fastapi-postgres-template" alt="License">
77
</a>
88

9+
:information_source: This repository contains two different templates to choose from.
10+
911
## Minimal async FastAPI + postgresql template
1012

11-
![OpenAPIexample](./docs/OpenAPI_example.png)
13+
![template-fastapi-minimal-openapi-example](./docs/template-minimal-openapi-example.png)
1214

1315
- SQLAlchemy using new 2.0 API + async queries
1416
- Postgresql database under `asyncpg`
@@ -20,6 +22,20 @@
2022
- `pre-push.sh` script with poetry export, autoflake, black, isort and flake8
2123
- Setup for async tests, one func test for token flow and very extensible `conftest.py`
2224

25+
## Async FastAPI + postgresql template based on [fastapi-users](https://fastapi-users.github.io/fastapi-users/)
26+
27+
- SQLAlchemy using new 2.0 API + async queries
28+
- Postgresql database under `asyncpg`
29+
- Alembic migrations
30+
- Very minimal project structure yet ready for quick start building new api
31+
- Refresh token endpoint (not only access like in official template)
32+
- Two databases in docker-compose.yml (second one for tests)
33+
- poetry
34+
- `pre-push.sh` script with poetry export, autoflake, black, isort and flake8
35+
- Setup for async tests, one func test for token flow and very extensible `conftest.py`
36+
37+
![template-fastapi-users-openapi-example](./docs/template-fastapi-users-openapi-example.png)
38+
2339
## What this repo is
2440

2541
This is a minimal template for FastAPI backend + postgresql db as of 2021.11, `async` style for database sessions, endpoints and tests. It provides basic codebase that almost every application has, but nothing more.

docs/OpenAPI_example.png

-55.2 KB
Binary file not shown.
Loading
127 KB
Loading

{{cookiecutter.project_name}}/template_fastapi_users/app/conftest.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,5 +9,3 @@
99

1010
# This will ensure using test database
1111
os.environ["ENVIRONMENT"] = "PYTEST"
12-
# This will change default 12 bcrypt rounds to only 1 so hashing password func will be short
13-
os.environ["SECURITY_BCRYPT_DEFAULT_ROUNDS"] = "1"

0 commit comments

Comments
 (0)