Skip to content

Commit 1d45209

Browse files
authored
Python 3.13 support (#215)
* Add support for python 3.13 * Uses FastAPI testclient for API tests
1 parent af7953b commit 1d45209

17 files changed

+1446
-1409
lines changed

.github/workflows/github-pages.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,10 +27,10 @@ jobs:
2727
- name: Checkout
2828
uses: actions/checkout@v4
2929

30-
- name: Set up Python 3.12
30+
- name: Set up Python 3.13
3131
uses: actions/setup-python@v5
3232
with:
33-
python-version: "3.12"
33+
python-version: "3.13"
3434

3535
- name: Install dependencies
3636
run: |

.github/workflows/python-code-style.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,10 @@ jobs:
1717

1818
steps:
1919
- uses: actions/checkout@v4
20-
- name: Set up Python 3.12
20+
- name: Set up Python 3.13
2121
uses: actions/setup-python@v5
2222
with:
23-
python-version: "3.12"
23+
python-version: "3.13"
2424
- name: Install dependencies
2525
run: |
2626
python -m pip install --upgrade pip

.github/workflows/python-lint.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,10 @@ jobs:
1717

1818
steps:
1919
- uses: actions/checkout@v4
20-
- name: Set up Python 3.12
20+
- name: Set up Python 3.13
2121
uses: actions/setup-python@v5
2222
with:
23-
python-version: "3.12"
23+
python-version: "3.13"
2424
- name: Install dependencies
2525
run: |
2626
python -m pip install --upgrade pip

.github/workflows/python-quality.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,10 @@ jobs:
1717

1818
steps:
1919
- uses: actions/checkout@v4
20-
- name: Set up Python 3.12
20+
- name: Set up Python 3.13
2121
uses: actions/setup-python@v5
2222
with:
23-
python-version: "3.12"
23+
python-version: "3.13"
2424
- name: Install dependencies
2525
run: |
2626
python -m pip install --upgrade pip

.github/workflows/python-tests.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ jobs:
1515
test:
1616
strategy:
1717
matrix:
18-
version: ["3.9", "3.10", "3.11", "3.12"]
18+
version: ["3.9", "3.10", "3.11", "3.12", "3.13"]
1919
os: [ubuntu-latest]
2020
runs-on: ${{ matrix.os }}
2121
steps:

.github/workflows/python-typing.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,10 @@ jobs:
1717

1818
steps:
1919
- uses: actions/checkout@v4
20-
- name: Set up Python 3.12
20+
- name: Set up Python 3.13
2121
uses: actions/setup-python@v5
2222
with:
23-
python-version: "3.12"
23+
python-version: "3.13"
2424
- name: Install dependencies
2525
run: |
2626
python -m pip install --upgrade pip

.idea/bootstrap-python-fastapi.iml

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/misc.xml

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

docs/index.md

Lines changed: 1 addition & 63 deletions
Original file line numberDiff line numberDiff line change
@@ -1,63 +1 @@
1-
# Bootstrap python service
2-
[![CI Pipeline](https://github.com/febus982/bootstrap-python-fastapi/actions/workflows/ci-pipeline.yml/badge.svg)](https://github.com/febus982/bootstrap-python-fastapi/actions/workflows/ci-pipeline.yml)
3-
[![Python tests](https://github.com/febus982/bootstrap-python-fastapi/actions/workflows/python-tests.yml/badge.svg?branch=main)](https://github.com/febus982/bootstrap-python-fastapi/actions/workflows/python-tests.yml)
4-
[![Test Coverage](https://api.codeclimate.com/v1/badges/a2ab183e64778e21ae14/test_coverage)](https://codeclimate.com/github/febus982/bootstrap-python-fastapi/test_coverage)
5-
[![Maintainability](https://api.codeclimate.com/v1/badges/a2ab183e64778e21ae14/maintainability)](https://codeclimate.com/github/febus982/bootstrap-python-fastapi/maintainability)
6-
7-
[![Checked with mypy](https://www.mypy-lang.org/static/mypy_badge.svg)](https://mypy-lang.org/)
8-
[![Ruff](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/charliermarsh/ruff/main/assets/badge/v1.json)](https://github.com/charliermarsh/ruff)
9-
[![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black)
10-
[![security: bandit](https://img.shields.io/badge/security-bandit-yellow.svg)](https://github.com/PyCQA/bandit)
11-
12-
This is an example implementation of a python application applying
13-
concepts from [Clean Architecture](https://blog.cleancoder.com/uncle-bob/2012/08/13/the-clean-architecture.html)
14-
and [SOLID principles](https://en.wikipedia.org/wiki/SOLID).
15-
16-
* The repository classes are isolated behind interfaces, enforcing the [Interface Segregation principle](https://en.wikipedia.org/wiki/Interface_segregation_principle)
17-
and the [Inversion of Control](https://en.wikipedia.org/wiki/Inversion_of_control) design pattern
18-
* The application frameworks are decoupled from the domain logic
19-
* The storage layer is decoupled from the domain logic
20-
21-
This template provides out of the box some commonly used functionalities:
22-
23-
* API Documentation using [FastAPI](https://fastapi.tiangolo.com/)
24-
* Async tasks execution using [Celery](https://docs.celeryq.dev/en/stable/index.html)
25-
* Repository pattern for databases using [SQLAlchemy](https://www.sqlalchemy.org/) and [SQLAlchemy bind manager](https://febus982.github.io/sqlalchemy-bind-manager/stable/)
26-
* Database migrations using [Alembic](https://alembic.sqlalchemy.org/en/latest/) (configured supporting both sync and async SQLAlchemy engines)
27-
* [TODO] Producer and consumer to emit and consume events using [CloudEvents](https://cloudevents.io/) format on [Confluent Kafka](https://docs.confluent.io/kafka-clients/python/current/overview.html)
28-
29-
## Documentation
30-
31-
The detailed documentation is available:
32-
33-
* Online on [GitHub pages](https://febus982.github.io/bootstrap-python-fastapi/)
34-
* Offline by running `make docs` after installing dependencies with `make dev-dependencies`
35-
36-
## How to use
37-
38-
Create your GitHub repository using this template (The big green `Use this template` button).
39-
Optionally tweak name and authors in the `pyproject.toml` file, however the metadata
40-
are not used when building the application, nor are referenced anywhere in the code.
41-
42-
Locally:
43-
44-
* `make migrate`: Run database migrations
45-
* `make install-dependencies`: Install runtime requirements
46-
* `make dev-dependencies`: Install development requirements
47-
* `make update-dependencies`: Updates requirements
48-
* `make migrate`: Run database migrations
49-
* `make dev`: Run HTTP application with hot reload
50-
* `make test`: Run test suite
51-
52-
Using Docker:
53-
54-
* `make containers`: Build containers
55-
* `docker compose run --rm dev make migrate`: Run database migrations
56-
* `docker compose up dev`: Run HTTP application with hot reload
57-
* `docker compose up celery-worker`: Run the celery worker
58-
* `docker compose run --rm test`: Run test suite
59-
60-
## Other commands for development
61-
62-
* `make check`: Run tests, code style and lint checks
63-
* `make fix`: Run tests, code style and lint checks with automatic fixes (where possible)
1+
--8<-- "./README.md"

0 commit comments

Comments
 (0)