Add your description here
Project description
Python Template 🐍
A template for a python project for 2025
Features:
- 🛠️ configuration in a single file
pyproject.toml - 📦
uvas package manager - 💅
rufffor linting and formatting - 🧪
pytest - 🧹
Makefilewith code quality checks - 📚 auto doc generation
- 🐳 CI/CD Optimized Docker Image runs when a new release is created pushing to gh registry
- 🦾 GitHub actions:
- auto publish to
pypion push onmain - auto creating a new tag on push on
main, sync versions - run
testsandlintondevandmainwhen a PR is open
- auto publish to
Getting started
Installation
To set it up and run
uv sync
Then
python main.py
Will output a random joke
Why did the cow in the pasture get promoted at work? ... Because he is OUT-STANDING in his field!
You can now run, for example, a function defined as scripts in the pyproject.toml
make_me_laugh
Linting
ruff check
Formatting
ruff format
CI/CD
Tests
Tests inside /tests are run using pytest on PR both on dev and main
Publish Package
In order to publish to pypi you need to create a publisher on pypi.
This is explained here and here
In practice go your pypi project -> Manage Project -> Publishing, scroll and "add a new publisher"
Docker
Dockerfile contains a multi stage build that uses --compile-bytecode to compite your package. For this example, the resulting image is just
docker build -t python-template .
REPOSITORY TAG IMAGE ID CREATED SIZE
python-template latest 1ded7d260b1c 58 seconds ago 55.4MB
The image is build using the build workflow when a new release is created
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file python_template_zuppif-0.1.3.tar.gz.
File metadata
- Download URL: python_template_zuppif-0.1.3.tar.gz
- Upload date:
- Size: 14.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.0.1 CPython/3.12.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e1e7eca7662c1340bc269da6c4901e10fea9fb0a1233173ec9b6dc71e65a8266
|
|
| MD5 |
75cbdb00161153e3d9f5abd00662c330
|
|
| BLAKE2b-256 |
9719e0ea07e2ce08cdefe64b3f5f367ff648014297f951ae951b3115a71d74bb
|
Provenance
The following attestation bundles were made for python_template_zuppif-0.1.3.tar.gz:
Publisher:
publish.yml on FrancescoSaverioZuppichini/python-template
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
python_template_zuppif-0.1.3.tar.gz -
Subject digest:
e1e7eca7662c1340bc269da6c4901e10fea9fb0a1233173ec9b6dc71e65a8266 - Sigstore transparency entry: 158479899
- Sigstore integration time:
-
Permalink:
FrancescoSaverioZuppichini/python-template@f818cf59850bd6a50d788672dfb23d17903573c6 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/FrancescoSaverioZuppichini
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@f818cf59850bd6a50d788672dfb23d17903573c6 -
Trigger Event:
push
-
Statement type:
File details
Details for the file python_template_zuppif-0.1.3-py3-none-any.whl.
File metadata
- Download URL: python_template_zuppif-0.1.3-py3-none-any.whl
- Upload date:
- Size: 4.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.0.1 CPython/3.12.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4e71577d8a5ca8aa069f7bed8c6b5459fb8c8d6552bd225714e1fe3377ec67df
|
|
| MD5 |
76d2b223ca3b65957363b351b7de4e9e
|
|
| BLAKE2b-256 |
3da78adf9175114e334e7523172aefc2b7ca174d822c7098849f215b43225274
|
Provenance
The following attestation bundles were made for python_template_zuppif-0.1.3-py3-none-any.whl:
Publisher:
publish.yml on FrancescoSaverioZuppichini/python-template
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
python_template_zuppif-0.1.3-py3-none-any.whl -
Subject digest:
4e71577d8a5ca8aa069f7bed8c6b5459fb8c8d6552bd225714e1fe3377ec67df - Sigstore transparency entry: 158479900
- Sigstore integration time:
-
Permalink:
FrancescoSaverioZuppichini/python-template@f818cf59850bd6a50d788672dfb23d17903573c6 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/FrancescoSaverioZuppichini
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@f818cf59850bd6a50d788672dfb23d17903573c6 -
Trigger Event:
push
-
Statement type: