Example boilerplate for a simple Python project
Project description
Example Python project
Generate cool badges with badgen, shields, or the standard GitHub workflow badges.
This repo contains boilerplate configs for python projects, including:
- vanilla
setup.py
to bundle and install a python package; - publishing package to PyPI on CI;
- running tests on CI;
- general folder structure.
Publishing to PyPI locally
Python reference here, and twine reference here.
- Install necessary dependencies.
pip3 install setuptools twine build
- Generate distribution archives (bundle package).
python3 -m build
- Upload the distribution archives to test-pypi as follows.
python3 -m twine upload --repository testpypi dist/*
- If everything looks OK, upload the distribution archives to the official PyPI repo.
python3 -m twine upload dist/*
Note When prompted for credentials use
__token__
for the username and your generated api token as the password.
Installing
After publishing your project, you can now install it with pip as follows (optionally, add the test-pypi url):
pip3 install my-project-andre [--index-url https://test.pypi.org/simple/]
Substitute my-project-andre
with whatever unique project name you chose in setup.py.
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
File details
Details for the file my-project-andre-0.1.0.tar.gz
.
File metadata
- Download URL: my-project-andre-0.1.0.tar.gz
- Upload date:
- Size: 15.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.9.16
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 61d971b105057a443a3e99472802fd108c6ad4f0450d8cb9ad9f04a83cccde5e |
|
MD5 | af1ae18301adefd94a14ea76bf9be80c |
|
BLAKE2b-256 | 42ab9cd691dddf93325fe11133ef4518d16881764cdef9bd3da98ab8e6e7184a |
File details
Details for the file my_project_andre-0.1.0-py3-none-any.whl
.
File metadata
- Download URL: my_project_andre-0.1.0-py3-none-any.whl
- Upload date:
- Size: 15.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.9.16
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1354ac11efc7695ef8a2a29dca41018b4a8967272042c1fa8b8232ed6cda2c1b |
|
MD5 | 242dc848fa20c1836d7c453725cd8a7b |
|
BLAKE2b-256 | 93828f3bceddbef56d6c82af0125d509ae9ba4391a6464382f61c310282e6d48 |