pyospackage is a demonstration Python package that compliments the pyOpenSci beginner tutorial series on creating a Python package.
This package was built using pyOpenSciβs Python package Copier template.l This template makes it easy for anyone to quickly create a Python package following best practices developed by the pyOpenSci community.
The template includes configuration for:
- Standard Python package layout and structure
- Code linting and formatting tools like Ruff
- Setup for a test suite
- Basic setup for Continuous Integration and Deployment (CI/CD)
- Basic documentation infrastructure and files using mkdocs or sphinx
If you're interested in using the template, check out the Copier Template Repo.
This package accompanies our tutorials and docs on building and publishing high-quality Python packages:
- π¦ Tutorial Series: Beginner Python Packaging Tutorials
- π Overview: Python Packaging Overview
These resources cover everything from package layout and versioning to testing, publishing to PyPI, and creating great documentation.
You can install this package using either pip, uv, or conda-forge. We recommend that you create a new Python
environment to work in when installing this package. Use
whatever environment manager that you wish!
To install the package using pip:
pip install pyospackageTo install the package using conda-forge:
conda install -c conda-forge pyospackageTo install the package using uv:
uv pip install pyospackageOr just run uv run python in the directory where the package lives and it will install it automatically into the chosen uv venv.
To use this package:
from pyospackage.add_numbers import add_num
a = add_num(1, 2)
print(a)You can also add any links to this section to tutorials in your documentation.
Development documentation can be found in the DEVELOPMENT.md file.
All linting and code formatting is implemented in this package using a combination of pre-commit hooks and Ruff. Ruff is a fast, rust-based linter and code formatter that covers functionality previously implemented by Black and isort (formatters that are commonly used in the Python ecosystem). Ruff simplifies your linting and code format setup but running all of the checks and fixes using a single tool. As such pyOpenSci encourages new projects to consider using Ruff.
Information here about contributing to your package. links to your code of conduct and development guide.
To cite pyospackage please follow the citation instructions on Zenodo.
pyospackage is distributed under the terms of the MIT license.
Thanks goes to these wonderful people (emoji key):
Alex Batisse π |
Jonny Saunders π» π |
Sarah Kaiser π» π |
Geoff Cureton π» π |
Steven Silvester π» π |
James Lamb π» π π |
steven π |
This project follows the all-contributors specification. Contributions of any kind welcome!