A tools and resources hub for Python packaging and collaborative open science
pyOpenSci is committed to supporting scientists as they leverage open source to solve the world’s most complex challenges. From beginners who hope to build an installable Python package, contributors ready to master core GitHub collaboration skills to experts looking to streamline packaging maintenance workflows, our educational hub is a trusted resource for gaining the skills needed to scale your project.
Are you interested in cohort learning options? Visit our university research communities and labs accelerator programs page to learn more.
Our process: Community-developed Python tutorials
Our tutorials are created through a multi-stage community review process.
- Tutorials are developed by the pyOpenSci team or community members.
- Tutorials are reviewed by tool maintainers to ensure ideas and concepts are accurate.
- Before publication, tutorials then go through several rounds of community review for accuracy, usability and accessibility.
Start learning: beginner-friendly Python packaging tutorials
Beginner-friendly Python packaging tutorials guide you through creating a Python package, following modern best practices. It’s best to follow the tutorials in order, but you can always pick a specific topic if you wish to jump around.
0. Get to know Hatch
Hatch is an end-to-end Python packaging and workflow tool. In this tutorial, you will install and learn how to configure Hatch for Python packaging.
1. What is a Python package
Learn about what a Python package is and the basic components that make up a Python package.
Use Hatch environments in your package
After you create a package with the pyOpenSci template, use Hatch to run tests, build distributions, check metadata, and work with your development environments day to day.
Migrate setup.py to pyproject.toml with Hatch
If your project already uses setup.py, Hatch can help you move toward a modern pyproject.toml while keeping metadata and build settings aligned with current packaging standards.
2. Make your Python code installable
Learn how to create the most basic version of a Python package which can then be installed into a Python environment.
3. Publish your Python package to PyPI
Learn how to publish your Python package to test.PyPI.org and to PyPI.org.
4. Publish to conda forge using grayskull
Learn how to publish your Python package to the conda-forge channel of conda using the grayskull Python package.
5. Add a README file to your Python package
A README file is often the landing page that a user will use to understand your package. Learn about how to create a useful README file for your Python package.
6 . Add a LICENSE and CODE_OF_CONDUCT
License and code of conduct files are important to add to your Python package as they provide instructions for both how users can use your package and also how the community of users should interact with you as a maintainer.
7. Add metadata with a pyproject.toml file
To enhance the visibility of your package on PyPI and provide more information about its compatibility with Python versions, project development status, and project maintainers, you should add additional metadata to your pyproject.toml file. This lesson will guide you through the process.
Command line reference for packaging
Quick-reference tables for shell commands used across the packaging tutorials, from installing Hatch and pipx through building, testing, and publishing.
Trusted publishing with GitHub Actions
Automate building and publishing to PyPI from GitHub Actions and configure PyPI Trusted Publishing so you can ship releases without long-lived API tokens on the repository.
Lessons: Collaborative GitHub for Scientists
Support for this track comes in part from the Better Scientific Software Fellowship. These lessons live in the pyOpenSci lessons book and teach GitHub collaboration for open source and team science.
Read social etiquette in open source, then work through the contribute path:
- Your contributing path
- Get to know the repo
- Find an issue
- Fork a GitHub repository
- Edit and commit files
- Submit a pull request
Work locally: Clone a GitHub repository
Background: What is Git/GitHub?, GitHub Codespaces, Ways to contribute
Expert-Led Training & Community Events
pyOpenSci runs comprehensive training events that equip scientists with the critical skills needed to make their research software more open, reliable, and collaborative.
When you attend our events, you experience the value of learning directly from leaders in the open-source space. Over the years, we have fostered a welcoming, supportive and diverse community where you can collaborate alongside cross-disciplinary peers facing similar challenges. From expert-led workshops to our highly collaborative sprint events, the connections you make and the skills you build here will transform your workflow.
Find the open science tools that you need for your research
Our catalog of vetted open source tools makes it easier for scientists to find the trusted tools that they need to develop their open science workflows.
View our growing list of accepted scientific Python packages