Skip to main content
HomePython

Course

Developing Python Packages

IntermediateSkill Level
4.7+
852 reviews
Updated 02/2026
Learn to create your own Python packages to make your code easier to use and share with others.
Start Course for Free
PythonProgramming4 hr14 videos47 Exercises3,900 XP22,757Statement of Accomplishment

Create Your Free Account

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

Group

Training 2 or more people?

Try DataCamp for Business

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.

Prerequisites

Introduction to ShellWriting Functions in Python
1

From Loose Code to Local Package

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.
Start Chapter
2

Install Your Package from Anywhere

3

Increasing Your Package Quality

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.
Start Chapter
Developing Python Packages
Course
Complete

Earn Statement of Accomplishment

Add this credential to your LinkedIn profile, resume, or CV
Share it on social media and in your performance review
Enroll Now

Don’t just take our word for it

*4.7
from 852 reviews
80%
19%
1%
0%
0%
  • Vijayarajan
    15 hours ago

  • mohamed
    yesterday

    2

  • Adebisi
    yesterday

  • Manuel
    yesterday

  • omar
    yesterday

  • Julie
    2 days ago

"2"

mohamed

Adebisi

Manuel

FAQs

What will I be able to do after completing this course?

You will be able to structure, document, test, and publish your own Python packages to PyPI using setuptools, twine, pytest, tox, and flake8.

What tools are used for package quality and testing?

You will use pytest to write tests, tox to verify compatibility across Python versions, and flake8 to enforce consistent code style.

Does the course cover publishing packages to PyPI?

Yes. You will complete all the steps to publish a package on PyPI, including writing a README, adding a license, handling dependencies, and using setuptools and twine.

What is cookiecutter and how is it used in this course?

Cookiecutter is a tool for generating project templates. You will use it to quickly scaffold package skeletons with all the supporting files your package needs.

What Python knowledge is required before taking this course?

You need intermediate Python skills including functions, the Python toolbox, and basic shell commands. Six prerequisite courses are listed, covering these foundations.

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

Create Your Free Account

or

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

Grow your data skills with DataCamp for Mobile

Make progress on the go with our mobile courses and daily 5-minute coding challenges.