Do you like building python packages? Do you hate configuring all of the things? This is for you.
Create a new folder with your package name (this makes it easier to infer the package name from the folder name via copier scripts):
mkdir your-project
cd your-projectThen run the copier script to set up the package:
uv tool run --with jinja2_shell_extension copier@latest copy --trust --vcs-ref=HEAD https://github.com/iloveitaly/python-package-template .Here are the key tools and features provided:
uv. Configured in the.envrcfile withlayout uv.- Justfile. Provides commands for setting up (
just setup) and cleaning (just clean) the project environment. - GitHub Actions. Repo metadata sync, package build and publish.
- Dependabot.:
- VS Code Settings. Some important py config that is hard to figure out sometimes.
- CLI Script Hook. Remove if you aren't publishing a package with a CLI.
- LLM IDE Rules. Optional setup for better AI-assisted development with GitHub Copilot, Cursor, etc.
- GitHub Configuration.
justrecipes to configure your GitHub repo.
Prompt to take this template, combined with code extracted from a project, and create an open source project.
This repo:
1. Has a generic/empty template for a python package
2. Has a file extracted from a project @extract.py
Can you:
1. $INTEGRATE_CODE_INSTRUCTIONS
2. Add any `uv add` packages required for this to run
3. Make sure all tests pass. Add some basic tests.
4. Update the @README.md
5. Update the `pyproject.toml` keywords (maximum of 4) and description based on the contents of this repo. Do not use `.` in a keyword.
6. Make sure all linting issues are corrected by running `just lint`
This is setup to be used with PyPi trusted publishers. You can easily change this configuration by adding --token ${{ secrets.PYPI_API_TOKEN }} to the build workflows.