Skip to content

Commit ef02a74

Browse files
authored
Merge pull request #35 from rafsaf/update-readme
update readme and resolve misc with python version
2 parents d6f2ca7 + 5d04dd4 commit ef02a74

File tree

4 files changed

+15
-24
lines changed

4 files changed

+15
-24
lines changed

.github/workflows/build_docker_image.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ jobs:
1919
- name: Set up Python
2020
uses: actions/setup-python@v2
2121
with:
22-
python-version: "3.11"
22+
python-version: "3.12"
2323

2424
- name: Generate projects from templates using cookiecutter
2525
# minimal_project folder

.github/workflows/manual_build_docker_image.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ jobs:
1717
- name: Set up Python
1818
uses: actions/setup-python@v2
1919
with:
20-
python-version: "3.11"
20+
python-version: "3.12"
2121

2222
- name: Generate projects from templates using cookiecutter
2323
# minimal_project folder

README.md

Lines changed: 12 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,9 @@
1-
<a href="https://minimal-fastapi-postgres-template.rafsaf.pl/" target="_blank">
2-
<img src="https://img.shields.io/badge/live%20example-https%3A%2F%2Fminimal--fastapi--postgres--template.rafsaf.pl-blueviolet" alt="Live example">
3-
</a>
4-
<a href="https://github.com/rafsaf/minimal-fastapi-postgres-template/blob/main/LICENSE" target="_blank">
5-
<img src="https://img.shields.io/github/license/rafsaf/minimal-fastapi-postgres-template" alt="License">
6-
</a>
7-
<a href="https://docs.python.org/3/whatsnew/3.11.html" target="_blank">
8-
<img src="https://img.shields.io/badge/python-3.11-blue" alt="Python">
9-
</a>
10-
<a href="https://github.com/psf/black" target="_blank">
11-
<img src="https://img.shields.io/badge/code%20style-black-lightgrey" alt="Black">
12-
</a>
13-
<a href="https://github.com/rafsaf/minimal-fastapi-postgres-template/actions/workflows/tests.yml" target="_blank">
14-
<img src="https://github.com/rafsaf/minimal-fastapi-postgres-template/workflows/tests/badge.svg" alt="Tests">
15-
</a>
1+
[![Ruff](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/astral-sh/ruff/main/assets/badge/v2.json)](https://github.com/astral-sh/ruff)
2+
[![Live example](https://img.shields.io/badge/live%20example-https%3A%2F%2Fminimal--fastapi--postgres--template.rafsaf.pl-blueviolet)](https://minimal-fastapi-postgres-template.rafsaf.pl/)
3+
[![License](https://img.shields.io/github/license/rafsaf/minimal-fastapi-postgres-template)](https://github.com/rafsaf/minimal-fastapi-postgres-template/blob/main/LICENSE)
4+
[![Python 3.12](https://img.shields.io/badge/python-3.12-blue)](https://docs.python.org/3/whatsnew/3.12.html)
5+
[![Black](https://img.shields.io/badge/code%20style-black-lightgrey)](https://github.com/psf/black)
6+
[![Tests](https://github.com/rafsaf/minimal-fastapi-postgres-template/actions/workflows/tests.yml/badge.svg)](https://github.com/rafsaf/minimal-fastapi-postgres-template/actions/workflows/tests.yml)
167

178
# Minimal async FastAPI + PostgreSQL template
189

@@ -42,9 +33,9 @@
4233
- [x] [Alembic](https://alembic.sqlalchemy.org/en/latest/) migrations
4334
- [x] Very minimal project structure yet ready for quick start building new apps
4435
- [x] Refresh token endpoint (not only access like in official template)
45-
- [x] Two databases in docker-compose.yml (second one for tests) and ready to go Dockerfile with [Uvicorn](https://www.uvicorn.org/) webserver
46-
- [x] [Poetry](https://python-poetry.org/docs/) and Python 3.11 based
47-
- [x] `pre-commit` with poetry export, autoflake, black, isort and flake8
36+
- [x] Two databases in docker-compose.yml (second one for tests) and ready to go Dockerfile with [uvicorn](https://www.uvicorn.org/) webserver
37+
- [x] [Poetry](https://python-poetry.org/docs/) and Python 3.12 based
38+
- [x] `pre-commit` with poetry export and [ruff](https://github.com/astral-sh/ruff)
4839
- [x] Rich setup for pytest async tests with few included and extensible `conftest.py`
4940

5041
<br>
@@ -69,16 +60,16 @@ cookiecutter https://github.com/rafsaf/minimal-fastapi-postgres-template
6960

7061
```bash
7162
cd project_name
72-
### Poetry install (python3.11)
63+
### Poetry install (python3.12)
7364
poetry install
7465

7566
### Optionally there is also `requirements-dev.txt` file
76-
python3.11 -m venv venv
67+
python3.12 -m venv venv
7768
source venv/bin/activate
7869
pip install -r requirements-dev.txt
7970
```
8071

81-
Note, be sure to use `python3.11` 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 new versions specific syntax for example `str | int` for python < 3.10 or `tomllib` for python < 3.11)
72+
Note, be sure to use `python3.12` 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 new versions specific syntax for example `str | int` for python < 3.10 or `tomllib` for python < 3.11)
8273

8374
### 3. Setup databases
8475

{{cookiecutter.project_name}}/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM python:3.11.1-slim-bullseye
1+
FROM python:3.12.0-slim-bullseye
22

33
ENV PYTHONUNBUFFERED 1
44
WORKDIR /build

0 commit comments

Comments
 (0)