https://github.com/simonw/python-lib-template-repository
GitHub template repository for creating new Python libraries, using the simonw/python-lib cookiecutter template
https://github.com/simonw/python-lib-template-repository
Last synced: about 1 year ago
JSON representation
GitHub template repository for creating new Python libraries, using the simonw/python-lib cookiecutter template
- Host: GitHub
- URL: https://github.com/simonw/python-lib-template-repository
- Owner: simonw
- Created: 2021-08-28T20:18:48.000Z (almost 5 years ago)
- Default Branch: main
- Last Pushed: 2024-05-12T17:18:04.000Z (about 2 years ago)
- Last Synced: 2024-10-18T07:54:00.047Z (over 1 year ago)
- Homepage:
- Size: 21.5 KB
- Stars: 54
- Watchers: 3
- Forks: 5
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Template repository for creating new Python libraries
This GitHub [template repository](https://docs.github.com/en/github/creating-cloning-and-archiving-repositories/creating-a-repository-on-github/creating-a-repository-from-a-template) can be used to create a new repository with the skeleton of a Python library, based on the [python-lib](https://github.com/simonw/python-lib) cookiecutter.
Start here: https://github.com/simonw/python-lib-template-repository/generate
The name of your repository will be the name of the Python package that you publish to [PyPI](https://pypi.org/), so make sure that name is not taken already!
Add a one-line description of your repository, then click "Create repository from template".

Once created, your new repository will execute a GitHub Actions workflow that uses cookiecutter to rewrite the repository to the desired state. This make take 30 seconds or so.
You can see an example of a repository generated using this template here:
- https://github.com/simonw/python-lib-template-repository-demo
## GitHub Actions setup by this repository
The `test.yml` GitHub Actions workflow will run your tests automatically any time you push a change to the repo.
The `publish.yml` Action runs when you create a new GitHub release. It can build and upload your package to [PyPI](https://pypi.org/).
For this to work you need to create an account on PyPI and configure your new GitHub repository as a "trusted publisher".
See [Publishing your library as a package to PyPI](https://github.com/simonw/python-lib#publishing-your-library-as-a-package-to-pypi) for details.