python package template
Content
pytestfor tests:make testrufffor linting/formatting:make lint(replaces bothblackandisort)- pyproject-pipenv to make sure dependencies in pyproject.toml and Pipfile are in sync
.githubwith actions ready to be used- test runs lint checks, unit tests and pyproject-pipenv
- publish-dev publishes feature branches (
dev/dev-*) to: - publish-main publishes semver tags to:
- pypi
- docker image to ghcr.io
New project checklist
- Replace folder
examplewith the actual package - Replace
LICENSEif MIT does not apply - Search the project for
# TODOto find the (minimum list of) places that need to be changed. - Add PYPI credentials to secrets
PYPI_USERNAMEandPYPI_TOKENto publish tags to pypiTESTPYPI_USERNAMEandTESTPYPI_TOKENto publish dev branches to testpypi
- Add codecov token
CODECOV_TOKENtaken from link above
- Replace this README.md - template below
Notes
Feature branch publishing
publish-dev workflow publishes dev/dev-* branches to testpypi.
Other common approach to publish dev branches is to use pre-release channels: version the package with a rc or beta suffix (such as 1.0.0-beta1) and pypi will consider pre-release. In order to install this, the user needs to do pip install PACKAGE --pre otherwise the latest stable is picked up.
However this will "pollute" your pypi index and it still requires you to bump the version (1.0.0-beta1 < 1.0.0) or to install the branch using specific version.
Yet another approach is to simply use an entirely different package name for the dev releases. Tensorflow does that, for example, with tf-nightly.
---
fp-github-template-example
CLI that echos whatever you tell it to.
Install
pip install fp-github-template-example
Usage
$ example-cli
Got nothing to say?
$ example-cli hello
HELLO right back at ya!
>>> from example import demo
>>> demo.echo('ehlo')
'EHLO right back at ya!'
Build
Check out CONTRIBUTING.md
Metadata
Release files for fp-github-template-example 0.0.3
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| fp-github-template-example-0.0.3.tar.gz | 4.5 kB | Without provenance | Details for fp-github-template-example-0.0.3.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| fp_github_template_example-0.0.3-py3-none-any.whl | Python 3 | none | any | Details for fp_github_template_example-0.0.3-py3-none-any.whl |
Total release size: 9.3 kB
Release files / fp-github-template-example-0.0.3.tar.gz
| Download URL | fp-github-template-example-0.0.3.tar.gz |
|---|---|
| Size | 4.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
316c22d10a0d7f6ffcd4dc1b3fe932201f62d165f30c491793e53a25d7568ff6
|
|
BLAKE2b-256 checksum How to use checksums |
53aad9b4480d2bff73815893970cbe057c2ed6b6407758d260621e27f15fb09a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.1.1 CPython/3.10.15
|
Release files / fp_github_template_example-0.0.3-py3-none-any.whl
| Download URL | fp_github_template_example-0.0.3-py3-none-any.whl |
|---|---|
| Size | 4.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
eece88083e81eb54d0b8b63dca96172c56882200abaee61f943480d76d9d6382
|
|
BLAKE2b-256 checksum How to use checksums |
3250bba68357ba5914ea0b85e6d2d800ad4940f51013d1d8a4b655d92b864a85
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.1.1 CPython/3.10.15
|
Security for fp-github-template-example 0.0.3
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.