Open source software is made by volunteers. There is a culture of community participation and collaboration that has been key to the Open Source Movement’s success. This tutorial explains how you can participate in Open Source with Python by contributing to an existing open source project on GitHub, or starting your own.
Open source software keeps the world going. It powers the internet and much of the software that runs just about every major business on earth. Some of it is truly brilliant. Much of it, like anything else in life, could use a little love now and then. There is probably an open source project out there that needs your help. Here’s a small guide to get you started, with references on how to find all sorts of open source programs to work on.
Understand the product
Before contributing to a project, you should understand how it works. To understand it, you need to try it for yourself. If you find the product interesting and useful, it is worth contributing to.
Too often, beginners try to contribute to a project without first using the software. They then get frustrated and give up. If you don’t use the software, you can’t understand how it works. If you don’t know how it works, how can you fix a bug or write a new feature?
When you start contributing to an open source project, there can be a lot of information to take in all at once.
To help you navigate it all, your first port of call should be the Python Developer’s Guide. It’s a super important resource that all contributors and core developers rely on since it covers everything from how to assess a potential contribution to how to deal will issue tracking. (If you contribute to this guide, then you’ll be able to make a big impact on what contributing to Python is like.)
Once you get down to the nuts and bolts of contributing, it’ll be useful to get familiar with a few tools:
- GitHub: Python contributors collaborate with each other through GitHub, which allows you to host code, do version control, give feedback, and more. To learn more about how to use this tool, check out Introduction to Git and GitHub for Python Developers as well as Python’s official Git Bootcamp and Cheat Sheet.
- reStructuredText: If you want to contribute documentation, then it’ll be very helpful to learn how to use this markup language. The Python Developer’s Guide has a primer on reStructuredText to help you get started. (Fun fact: reStructuredText has been around longer than Markdown!)
- Sphinx: You’ll use Sphinx to build Python’s documentation. To learn more, you can check out Mariatta Wijaya’s talk Introduction to Sphinx Docs and reStructuredText and Eric Holscher’s talk Documenting your project with Sphinx & Read the Docs.
Although you don’t need to have experience with the C programming language to contribute to Python, it can open up some new ways of contributing. Here are some resources you can check out to learn more:
- C for Python Programmers
- Your Guide to the CPython Source Code
- CPython Internals: Your Guide to the Python 3 Interpreter
To get a feel for how the interpersonal aspects of contributing to Python work, you can also check out Brett Canon’s PyCascades talk Setting Expectations for Open Source Participation. It’s about setting reasonable expectations of each other so we can make open source pleasant for everyone involved.
Familiarize yourself with the project
Once you find a project that aligns with your interests and skills, the next step is to get a sense as to how large and how active the project is.
A good way to get a sense of the pulse of the codebase is to look at the right-most column of the project. This gives an indication as to when certain files were last updated.
Let’s look at an example of an inactive project. Note that the last time most of these files were modified was 4 years ago. This is a project that perhaps at one time was more active, but is currently either in a stable enough place to not require updates or is a project that may have been abandoned or replaced by another project.
Alternatively, here is an example of a more active project. Note that some of the files have not been updated. This is common, especially for certain files that are not expected to change drastically over the course of the project lifespan like the
However there are many files in this repository that indicate that the last time they were modified was either 4 days ago or 9 days ago. So, it seems as if the pulse of this project is a bit more active and perhaps more suitable to contributing to.
While it’s certainly fine to take an inactive project and build upon it with your own features and extensions, it can serve a benefit to a newcomer to be part of an active community.
Once you’ve found a suitable project that is of interest to you and ideally is somewhat actively maintained, perusing the source code and looking through the project structure can be a good way to see the intent, style, and other attributes of the existing project.
Depending on the size of the project, this can be more or less involved task, but the “meat” of the project can usually be isolated to just a few spots. Spending your time here and reading through the source code like you’re reading this article can be an insightful and surprisingly enjoyable task.
If you see something in Python that you think should be improved, then you’re welcome to suggest it. But for your first contribution, it can be easier to start with an issue that has already been flagged by someone else.
If you want to contribute to the Python Developer’s Guide or Python’s official site, then you can check out the issues listed on GitHub:
If you want to contribute to CPython, which is what most people mean when they say “Python,” then you’ll need to create an account at Python’s bug tracker, which is called BPO because it’s at
rg. You can register yourself as a user by going to User → Register in the menu on the left.
The information in the default view can be a lot to take in since it shows issues raised by users as well as issues raised by core developers, which may already have been fixed. Fortunately, you can filter this list to find exactly what you’re looking for.
To filter the list, start by logging in and then go to Your Queries → Edit in the menu on the left. You’ll get a list of queries that you can leave in or leave out:
Here’s an example of what you’d see if you edited your queries to leave in only easy documentation issues:
Now that you’ve filtered your list to leave in only easy documentation issues, you’re seeing just documentation issues that are suitable for beginners.
If you’d like to work on something other than documentation, you can also try some other queries to help you find an issue that interests you:
|Query||Types of Issues|
|Easy Tasks||Issues that have been flagged as good for beginners|
|Reports Without Replies||Issues that have been reported but not discussed|
|Unread||Issues that have been reported but not read|
|Recently Created||Issues that were reported recently|
|50 Latest Issues||The top fifty issues that have had the most recent updates|
Once you’ve decided which issue you want to work on for your first contribution, it’s good to check the comments to see if:
- There’s still some ongoing discussion about whether it should be resolved and how it should be approached
- Someone else is already working on the issue
You can also check the latest version of the code and documentation to see if the issue has already been resolved but hasn’t been closed by a core developer yet.
Note: You can learn more about how to use the issue tracker in the official documentation on triaging an issue.
Once you’ve determined which issue you want to start with, you can leave a comment on the issue to:
- Say that you’re going to work on it
- Let others know when you plan to submit your pull request
If you clearly communicate your plans, then other contributors will know that someone else is already working on the issue and be able to focus their energy on solving other issues instead.
Check the project’s status
How active is the project?
If you send a pull request to an unmaintained or dormant project, your pull request (or PR) may never be reviewed or merged. Look for projects with lots of activity; that way you will get immediate feedback on your code and your contributions will not go to waste.
Here’s how to tell if a project is active:
- Number of contributors: A growing number of contributors indicates the developer community is interested and willing to accept new contributors.
- Frequency of commits: Check the most recent commit date. If it was within the last week, or even month or two, the project is being maintained.
- Number of maintainers: A higher number of maintainers means more potential mentors to guide you.
- Activity level in the chat room/IRC: A busy chat room means quick replies to your queries.
Have you always wanted to contribute some code to a large project? Have you been waiting for a tutorial that would show you how to begin contributing long enough to make your first contribution? Here’s how to get started contributing with Python.