A sample package
Project description
Say Hello!
Python Package Template using UV
Getting Started
-
You need to have UV installed. You can find instructions here.
-
Create the virtual environment
uv venv # create env .venv
uv sync # install dependencies
- Start developping :
- Add your library code in the
src/directory - Write tests in the
tests/directory - Add your license
- Update
pyproject.tomlwith your package information
Development Workflows
Code Quality
To ensure a certain level of code quality, Ruff is used.
Configuration can be found in pyproject.toml.
Test
Tests must be write in tests and follow the convention of pytest
Scripts
All automation scripts are defined in noxfile.py file.
To run them use the following commands :
nox # Run all scripts
nox -s <script_name> # Run a scpecific script
Available scripts :
lint: Check the codebase respect all linting and format rulesclean: Delete build directorydisttests: Run tests fromtestsfolder with python version from 3.9 to 3.13
You can list them with nox --list.
See Nox documentation if you want to know more.
Publishing your package
Automatic Publishing
Your package is automatically published when you push to:
Manual Publishing
You can also publish it manually with the following commands :
uv publish --token YOUR_PYPI_TOKEN
# OR
uv publish --index testpypi --token YOUR_TEST_PYPI_TOKEN
Installing your package
Once published, your package can be installed with:
uv add your-package-name
uv add --default-index https://test.pypi.org/simple/ your-package-name # For testing
Or use pip :
pip install your-package-name
pip install --index-url https://test.pypi.org/simple/ your-package-name # For testing
Links
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 say_hello_sample_library-0.1.2.tar.gz.
File metadata
- Download URL: say_hello_sample_library-0.1.2.tar.gz
- Upload date:
- Size: 2.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.8.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a365afd3f679560e2e0173c3368494c2e9605311c21a54c58ac3e2e68b40a11c
|
|
| MD5 |
068ffcac38f31a52630b54dfcf623da1
|
|
| BLAKE2b-256 |
dc33c54600c6d5cf314ab4f53fd621cd2ce8f971a53706d94cabff5106da5b85
|
File details
Details for the file say_hello_sample_library-0.1.2-py3-none-any.whl.
File metadata
- Download URL: say_hello_sample_library-0.1.2-py3-none-any.whl
- Upload date:
- Size: 2.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.8.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ee699d786f8ea950e714a4a02c8f05f42858baa03baa9b6798a6fbb465b0e385
|
|
| MD5 |
93ddc875ed6bc9d9b76a8cd8ecbd13c0
|
|
| BLAKE2b-256 |
fc7715f1177414f260ae50940be45d531e595422a7b051077cd099321bab1441
|