Skip to main content
HomePythonDeveloping Python Packages

Developing Python Packages

4.5+
20 reviews
Intermediate

Learn to create your own Python packages to make your code easier to use and share with others.

Start Course for Free
4 Hours14 Videos47 Exercises
12,679 LearnersTrophyStatement of Accomplishment

Create Your Free Account

GoogleLinkedInFacebook

or

By continuing, you accept our Terms of Use, our Privacy Policy and that your data is stored in the USA.

Loved by learners at thousands of companies


Course Description

Do you find yourself copying and pasting the same code between files, wishing it was easier to reuse and share your awesome snippets? Wrapping your code into Python packages can help! In this course, you’ll learn about package structure and the extra files needed to turn loose code into convenient packages. You'll also learn about import structure, documentation, and how to maintain code style using flake8. You’ll then speed up your package development by building templates, using cookiecutter to create package skeletons. Finally, you'll learn how to use setuptools and twine to build and publish your packages to PyPI—the world stage for Python packages.
  1. 1

    From Loose Code to Local Package

    Free

    Get your package started by converting scripts you have already written. You'll create a simple package which you can use on your own computer.

    Play Chapter Now
    Starting a package
    50 xp
    Modules, packages and subpackages
    100 xp
    From script to package
    100 xp
    Putting your package to work
    100 xp
    Documentation
    50 xp
    Writing function documentation with pyment
    100 xp
    Writing function documentation with pyment II
    100 xp
    Package and module documentation
    100 xp
    Structuring imports
    50 xp
    Sibling imports
    100 xp
    Importing from parents
    100 xp
    Exposing functions to users
    100 xp
  2. 2

    Install Your Package from Anywhere

    Make your package installable for yourself and others. In this chapter, you'll learn to deal with dependencies, write READMEs, and include licenses. You'll also complete all the steps to publish your package on PyPI—the main home of Python packages.

    Play Chapter Now
  3. 3

    Increasing Your Package Quality

    Bring your package up to a professional standard. Discover how to use pytest to guard against errors, tox to test if your package functions with multiple versions of Python, and flake8 to maintain great code style.

    Play Chapter Now
  4. 4

    Rapid Package Development

    Create your packages more quickly. In this final chapter, you’ll learn how to use cookiecutter to generate all the supporting files your package needs, Makefiles to simplify releasing new versions, and be introduced to the last few files your package needs to attract users and contributors.

    Play Chapter Now

In the following tracks

Data Scientist in PythonPython Developer

Collaborators

Collaborator's avatar
Amy Peterson
Collaborator's avatar
Maggie Matsui
James Fulton HeadshotJames Fulton

Climate Informatics Researcher

James is a PhD researcher at the University of Edinburgh, where he tutors computing, machine learning, data analysis, and statistical physics. His research involves using and developing machine learning algorithms to extract space-time patterns from climate records and climate models. He has held visiting researcher roles, working on planet-scale data analysis and modeling, at the University of Oxford and Queen's University Belfast and has a masters in physics where he specialized in quantum simulation. In a previous life, he was employed as a data scientist in the insurance sector. When not several indents deep in Python, he performs improvised comedy.
See More

Don’t just take our word for it

*4.5
from 20 reviews
70%
10%
20%
0%
0%
Sort by
  • Muhammad A.
    7 months

    This was a good but easy for me to pick. I wish make it more engaging with more real world scenarios. Too much generalization make the content less engaging, but there's a high chance ofy personal bias due to personsal background.

  • Nadia H.
    7 months

    Good course containing all info required to kickstart making your own package. After the course I was immediately able to convert my existing project in a python package successfully.

  • Victor G.
    about 1 year

    Excellent course

  • Olga U.
    about 1 year

    A great introduction into structuring a first package.

  • Adriano G.
    about 1 year

    I have been programing for almost 10 years and most of my code can be used just by me because it isn't structured in a way that can be shared and use it by others, I think making it a Python package is the proper way to contribute to the community and making it accessible.

"This was a good but easy for me to pick. I wish make it more engaging with more real world scenarios. Too much generalization make the content less engaging, but there's a high chance ofy personal bias due to personsal background."

Muhammad A.

"Good course containing all info required to kickstart making your own package. After the course I was immediately able to convert my existing project in a python package successfully."

Nadia H.

"Excellent course"

Victor G.

Join over 13 million learners and start Developing Python Packages today!

Create Your Free Account

GoogleLinkedInFacebook

or

By continuing, you accept our Terms of Use, our Privacy Policy and that your data is stored in the USA.