Skip to main content

Add your description here

Project description

Python Template 🐍

PyPI version

A template for a python project for 2025

Features:

  • 🛠️ configuration in a single file pyproject.toml
  • 📦 uv as package manager
  • 💅 ruff for linting and formatting
  • 🧪 pytest
  • 🧹 Makefile with 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 pypi on push on main
    • auto creating a new tag on push on main, sync versions
    • run tests and lint on dev and main when a PR is open

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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

python_template_zuppif-0.1.3.tar.gz (14.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

python_template_zuppif-0.1.3-py3-none-any.whl (4.0 kB view details)

Uploaded Python 3

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

Hashes for python_template_zuppif-0.1.3.tar.gz
Algorithm Hash digest
SHA256 e1e7eca7662c1340bc269da6c4901e10fea9fb0a1233173ec9b6dc71e65a8266
MD5 75cbdb00161153e3d9f5abd00662c330
BLAKE2b-256 9719e0ea07e2ce08cdefe64b3f5f367ff648014297f951ae951b3115a71d74bb

See more details on using hashes here.

Provenance

The following attestation bundles were made for python_template_zuppif-0.1.3.tar.gz:

Publisher: publish.yml on FrancescoSaverioZuppichini/python-template

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file python_template_zuppif-0.1.3-py3-none-any.whl.

File metadata

File hashes

Hashes for python_template_zuppif-0.1.3-py3-none-any.whl
Algorithm Hash digest
SHA256 4e71577d8a5ca8aa069f7bed8c6b5459fb8c8d6552bd225714e1fe3377ec67df
MD5 76d2b223ca3b65957363b351b7de4e9e
BLAKE2b-256 3da78adf9175114e334e7523172aefc2b7ca174d822c7098849f215b43225274

See more details on using hashes here.

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

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page