Template for creating and generic Python packages
Project description
python-package-template
python-package-template
is a copier template to create and update Python packages. Copier uses git to merge changes from the original template into your instance, so you can keep all of your Python packages up to date and consistent.
Initial Setup
Basic Usage
pipx install copier
copier copy https://github.com/sabard/python-package-template /path/to/project
cd /path/to/project
./setup.sh
Developer
Dependencies:
Installation is made simple with pyenv-installer.
Once you have installed pyenv, install the rest of python-package-template
's dependencies with the setup script:
./setup.sh
Update Package Dependencies
Add new dependencies to requirements.in
and then run:
./update-deps.sh
Single dependencies can be updated with:
./update-deps.sh --upgrade-package <package>
Local Usage
TODO add pipx install copier
or provide another install method than running the setup script
Create a new template
cd
into your project directory and run:
pyenv activate python-package-template
copier copy path/to/python-package-template path/to/your_project
-or-
copier copy gh:sabard/python-package-template .
Update an existing template
After making changes to the template:
cd path/to/your_project
pyenv activate python-package-template
copier update
pyenv deactivate
Publish Package
Run the upload script which tags and releases the package via a push-triggered CI workflow:
./upload.sh
Make sure TWINE_REPOSITORY
, TWINE_USERNAME
, and TWINE_PASSWORD
environment variables are available in your CI environment.
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
File details
Details for the file py-pkg-tmpl-0.0.1.dev1.tar.gz
.
File metadata
- Download URL: py-pkg-tmpl-0.0.1.dev1.tar.gz
- Upload date:
- Size: 15.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.10.14
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | b99985fc69b9e4f7e7b9a26a225b8f237704ab4b205f0c26ff5a0895d97cb402 |
|
MD5 | 64a72c360abc9de0bbffe65bd57ff94a |
|
BLAKE2b-256 | f25018a1a8481cd5f9ee30f9320f6c9b4c2b3a4fe5a47e286a83291567728d99 |