Skip to main content

Add your description here

Project description

Python Template 🐍

PyPI version License Python versions

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 venv
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!

Development

You can install in editable mode the library

uv pip install -e .

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

Tets

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 secret called UV_PUBLISH_TOKEN with your pypi access token under API tokens.

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 relaese 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.2.tar.gz (3.0 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.2-py3-none-any.whl (3.4 kB view details)

Uploaded Python 3

File details

Details for the file python_template_zuppif-0.1.2.tar.gz.

File metadata

File hashes

Hashes for python_template_zuppif-0.1.2.tar.gz
Algorithm Hash digest
SHA256 7b3c7f132472eedb5d064c8d61ca0b51cbf8805f0c2d2e75e49b95748683a289
MD5 3252597e1d63e169f83b1ccb2d25aa78
BLAKE2b-256 e74535699a7bba9546a87049c0ebbdeb3deb1a77f2b7eb1d5edeece72d5c7cd5

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for python_template_zuppif-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 4b4e0650ac5d03486fa88cfdcb93ba45805cc9a1cfe908b70ce435987948ed82
MD5 cbb37f022a9217cc73f89327c8d14592
BLAKE2b-256 5300df9326ee13534745f3e395e935d27cfeea6947effa3c8c981c8d3a993fd3

See more details on using hashes here.

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