Skip to content

Commit e432812

Browse files
authored
Merge pull request #20 from rafsaf/add-python-3.10-warning-in-readme
add message in readme to be sure python 3.10 is only supported
2 parents 07af055 + 57a8c3f commit e432812

File tree

1 file changed

+41
-17
lines changed

1 file changed

+41
-17
lines changed

README.md

Lines changed: 41 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -16,16 +16,22 @@
1616

1717
# Minimal async FastAPI + PostgreSQL template
1818

19-
- [Feauters](#features)
20-
- [Quickstart](#quickstart)
21-
- [About](#about)
22-
- [Step by step example - POST and GET endpoints](#step-by-step-example---post-and-get-endpoints)
23-
- [1. Create SQLAlchemy model](#1-create-sqlalchemy-model)
24-
- [2. Create and apply alembic migration](#2-create-and-apply-alembic-migration)
25-
- [3. Create request and response schemas](#3-create-request-and-response-schemas)
26-
- [4. Create endpoint](#4-create-endpoints)
27-
- [5. Write tests](#5-write-tests)
28-
- [Deployment strategies - via Docker image](#deployment-strategies---via-docker-image)
19+
- [Minimal async FastAPI + PostgreSQL template](#minimal-async-fastapi--postgresql-template)
20+
- [Features](#features)
21+
- [Quickstart](#quickstart)
22+
- [1. Install cookiecutter globally and cookiecutter this project](#1-install-cookiecutter-globally-and-cookiecutter-this-project)
23+
- [2. Install dependecies with poetry or without it](#2-install-dependecies-with-poetry-or-without-it)
24+
- [3. Setup databases](#3-setup-databases)
25+
- [4. Now you can run app](#4-now-you-can-run-app)
26+
- [Running tests](#running-tests)
27+
- [About](#about)
28+
- [Step by step example - POST and GET endpoints](#step-by-step-example---post-and-get-endpoints)
29+
- [1. Create SQLAlchemy model](#1-create-sqlalchemy-model)
30+
- [2. Create and apply alembic migration](#2-create-and-apply-alembic-migration)
31+
- [3. Create request and response schemas](#3-create-request-and-response-schemas)
32+
- [4. Create endpoints](#4-create-endpoints)
33+
- [5. Write tests](#5-write-tests)
34+
- [Deployment strategies - via Docker image](#deployment-strategies---via-docker-image)
2935

3036
## Features
3137

@@ -47,8 +53,9 @@ _Check out also online example: https://minimal-fastapi-postgres-template.rafsaf
4753

4854
## Quickstart
4955

56+
57+
### 1. Install cookiecutter globally and cookiecutter this project
5058
```bash
51-
# Install cookiecutter globally
5259
pip install cookiecutter
5360

5461
# And cookiecutter this project :)
@@ -57,21 +64,38 @@ cookiecutter https://github.com/rafsaf/minimal-fastapi-postgres-template
5764
# if you want experimental fastapi-users template
5865
# check "experimental_fastapi_users_template"
5966
# to True in cookiecutter option
67+
```
6068

69+
### 2. Install dependecies with poetry or without it
70+
```bash
6171
cd project_name
62-
# Poetry install (and activate environment!)
72+
### Poetry install (python3.10)
6373
poetry install
64-
# Setup two databases
74+
75+
### Optionally there are also requirements
76+
python3.10 -m venv venv
77+
source venv/bin/activate
78+
pip install -r requirements-dev.txt
79+
```
80+
Note, be sure to use `python3.10` with this template with either poetry or standard venv & pip, if you need to stick to some earlier python version, you should adapt it yourself (remove python3.10+ specific syntax for example `str | int`)
81+
82+
### 3. Setup databases
83+
```bash
84+
### Setup two databases
6585
docker-compose up -d
66-
# Alembic migrations upgrade and initial_data.py script
86+
87+
### Alembic migrations upgrade and initial_data.py script
6788
bash init.sh
68-
# And this is it:
89+
```
90+
### 4. Now you can run app
91+
```bash
92+
### And this is it:
6993
uvicorn app.main:app --reload
7094

71-
# Optionally - use git init to initialize git repository
95+
# Then probably - use git init to initialize git repository
7296
```
7397

74-
#### Running tests
98+
### Running tests
7599

76100
```bash
77101
# Note, it will use second database declared in docker-compose.yml, not default one

0 commit comments

Comments
 (0)