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 templatebutton at the top of the GitHub page - Clone your new repository to your local machine
Make changes
- Change the package name from
example_package_samreynoldsmathto your own package name by renaming the directory - Edit the source code as needed
- Update the
pyproject.tomlfile 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
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file example_package_samreynoldsmath-0.2.1.tar.gz.
File metadata
- Download URL: example_package_samreynoldsmath-0.2.1.tar.gz
- Upload date:
- Size: 3.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.8.2 CPython/3.11.6 Linux/6.5.0-26-generic
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2abb8dc62fb99cd09beb658804285ac07eebde1a4a47554b9be74a6223390d6f
|
|
| MD5 |
4121813bd1b4df74f38551758276a485
|
|
| BLAKE2b-256 |
027b8ff44476051fd7ebc6f0289c0e6d164894d58b5134970e888f5e315edd63
|
File details
Details for the file example_package_samreynoldsmath-0.2.1-py3-none-any.whl.
File metadata
- Download URL: example_package_samreynoldsmath-0.2.1-py3-none-any.whl
- Upload date:
- Size: 4.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.8.2 CPython/3.11.6 Linux/6.5.0-26-generic
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2cb491aaab056d76c821a31bf577f8280491305cfc437fad11cb97650bcc0cf9
|
|
| MD5 |
0e1d3a2228dedc4ae035b3c165eb13c1
|
|
| BLAKE2b-256 |
a1b3756027629871e553ae9bfe2ca4cd3da2b7d9c89461ade609f8c3cafe932b
|