Just a demo of the uv package manager for Python.
Project description
uv-demo PyPI package
A demo and template for a modern Python package managed by uv. Very useless as a
package.
Use this as a template for new projects, or as a reference for how to set up a Python project with the following:
-
uvas the Python package manager. -
pre-commithooks for code formatting, linting, and quality checks. - GitHub Actions for testing and publishing.
- Multiple Python versions tested with
uv -p ${python-version} run pytest [...]. -
gh-actfor running GitHub Actions locally. - Justfile with common recipes.
- Documentation with
pdoc+ GitHub Pages. - Deptry to highlight missing and unused dependencies.
System Dependencies
uvcurl -LsSf https://astral.sh/uv/install.sh | sh
justsudo apt install justsudo pacman -S just- More installation methods.
- For running GitHub Actions locally
Quick start
This will install all dependencies (uv sync) and run the entrypoint script:
uv run uv-demo
just Recipes
# just --list
Available recipes:
list # List available recipes
clean # Clean up generated files
[dev]
install # Install pre-commit hooks and development project dependencies with uv
upgrade # Upgrade all project and pre-commit dependencies respecting pyproject.toml constraints [alias: update]
pre-commit # Run pre-commit hooks on all files [alias: check]
deptry # Run deptry to check for unused and missing dependencies
[build]
build # Build the package and run tests
publish # Build and publish the package to PyPI
[test]
test *pytest_args # Simple execution of tests with coverage
test-lowest *pytest_args # runs tests with the lowest compatible versions of dependencies, to check compatibility issues
test-verbose *pytest_args # Run tests with coverage and increased output
test-all # Run static checker and tests for all compatible python versions
serve-coverage # Serve the coverage report with a simple HTTP server
[docs]
docs # Generate and serve documentation
docs-gen # Generate documentation using pdoc
docs-serve # Serve the docs with a simple HTTP server
[ci]
gact # Run the GitHub Actions workflow for all branches
gact-pull-request # Run the GitHub Actions workflow for pull requests [alias: gact-pr]
gact-release # Run the GitHub Actions workflow for release
Integration with GitHub Actions
See the Upload Python Package workflow file for this package.
Running actions locally
You can use act to run GitHub Actions locally. Use cases:
- While writing a workflow, to test the workflow locally before pushing to the repository.
- Run the publishing workflow without setting secrets on GitHub.
- Before opening a pull request, to check the workflow will pass.
Copy the example secrets file:
cp "config/secrets.env.example" "config/secrets.env"
Then edit the new file to add your secrets.
After that, run just gact to run the GitHub Actions workflow locally.
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 uv_demo-0.3.2.tar.gz.
File metadata
- Download URL: uv_demo-0.3.2.tar.gz
- Upload date:
- Size: 10.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c3871a0bb55eddcbac5f3322bf4f89b2565cd84d2bbec68bbef912caba83f8e2
|
|
| MD5 |
90ecdbf17d178066427d92dc3e6e1e56
|
|
| BLAKE2b-256 |
ead8f225c53f9cf24f365f25c1e909508e0e37a6c750849f0be7553765d2b82c
|
Provenance
The following attestation bundles were made for uv_demo-0.3.2.tar.gz:
Publisher:
python-publish.yaml on lucaspar/uv-demo
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
uv_demo-0.3.2.tar.gz -
Subject digest:
c3871a0bb55eddcbac5f3322bf4f89b2565cd84d2bbec68bbef912caba83f8e2 - Sigstore transparency entry: 953690521
- Sigstore integration time:
-
Permalink:
lucaspar/uv-demo@8055a2ce262c122e2c7464598bac99db2f7f7065 -
Branch / Tag:
refs/tags/v0.3.2 - Owner: https://github.com/lucaspar
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
python-publish.yaml@8055a2ce262c122e2c7464598bac99db2f7f7065 -
Trigger Event:
push
-
Statement type:
File details
Details for the file uv_demo-0.3.2-py3-none-any.whl.
File metadata
- Download URL: uv_demo-0.3.2-py3-none-any.whl
- Upload date:
- Size: 4.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
211dd52ec108563c14506f4058731acb46c1e00cc422b496fd93e39fe46a90ef
|
|
| MD5 |
6db7d9171788e643e9a60c36271949a4
|
|
| BLAKE2b-256 |
b2299ae994d9c9bccf76d5a4fbb24124fcf601401c8226b975376f8aadf2dd90
|
Provenance
The following attestation bundles were made for uv_demo-0.3.2-py3-none-any.whl:
Publisher:
python-publish.yaml on lucaspar/uv-demo
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
uv_demo-0.3.2-py3-none-any.whl -
Subject digest:
211dd52ec108563c14506f4058731acb46c1e00cc422b496fd93e39fe46a90ef - Sigstore transparency entry: 953690666
- Sigstore integration time:
-
Permalink:
lucaspar/uv-demo@8055a2ce262c122e2c7464598bac99db2f7f7065 -
Branch / Tag:
refs/tags/v0.3.2 - Owner: https://github.com/lucaspar
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
python-publish.yaml@8055a2ce262c122e2c7464598bac99db2f7f7065 -
Trigger Event:
push
-
Statement type: