A simple demo of how to structure, use, and publish a Python package.
Project description
Python Package Template
Description
A simple demo of how to structure, use, and publish a Python package.
Prerequisites
- Python 3.11 or later
- Virtual environments
- A PyPi account
- poetry
Usage
Clone the repository
- This is a template repository on GitHub
- To use it, click the green
Use this template
button at the top of the GitHub page - Clone your new repository to your local machine
Make changes
- Change the package name from
example_package_samreynoldsmath
to your own package name by renaming the directory - Edit the source code as needed
- Update the
pyproject.toml
file to include your own package metadata - Update
README.md
,CHANGELOG.md
,LICENSE
,.gitignore
, and other files as needed
Build and upload
Clear the dist
directory
rm dist/*
Build the package using poetry
poetry build
Publish the package to PyPi using poetry
poetry publish
Install
In a fresh virtual environment, install the package using pip
(replace example-package-samreynoldsmath
with your package name)
pip install example-package-samreynoldsmath
License
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
Close
Hashes for example_package_samreynoldsmath-0.2.1.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2abb8dc62fb99cd09beb658804285ac07eebde1a4a47554b9be74a6223390d6f |
|
MD5 | 4121813bd1b4df74f38551758276a485 |
|
BLAKE2b-256 | 027b8ff44476051fd7ebc6f0289c0e6d164894d58b5134970e888f5e315edd63 |
Close
Hashes for example_package_samreynoldsmath-0.2.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2cb491aaab056d76c821a31bf577f8280491305cfc437fad11cb97650bcc0cf9 |
|
MD5 | 0e1d3a2228dedc4ae035b3c165eb13c1 |
|
BLAKE2b-256 | a1b3756027629871e553ae9bfe2ca4cd3da2b7d9c89461ade609f8c3cafe932b |