
Turn your code into a Python package that anyone can pip install. Implement type hinting with MyPy, linting with Ruff, PyTest testing, and CI/CD with GitHub Actions, and pyproject.toml packaging.
Access additional course resources by opening the AI and course assistant tab, then the resources tab under each video to find extra files and GitHub links in the additional resources.
Learn to create your first Python package, name it uniquely, and prepare it for PyPI by setting up a GitHub repo, .gitignore, and MIT license, with SSH cloning tips.
Create a simple calculator package by building calculator.py with a Calculator class implementing add, subtract, multiply, and divide methods, then prepare readme.md and git tracking for packaging.
Avoid global installs by using Python virtual environments for packaging, ensuring safe, isolated environments and easier uninstallation when working with C extensions, bindings, or pre-commit tools.
Learn to create and activate a Python virtual environment in the terminal on mac or Linux (WSL2), install packages with pip, and manage them without affecting the global Python.
Resolve the Windows caveat for virtual environments by running set-executionpolicy unrestricted-force in PowerShell, then delete and recreate the environment to run it normally.
Install and configure pre-commit hooks for Python packaging, run checks with git, and push clean commits to prevent large files and code clutter.
Explore packaging a Python project with pyproject.toml, configure the build system using setup tools and the build backend, and align the project name and version with your github repo.
Explore semantic versioning in Python packaging, learn how to update major, minor, and patch numbers in pyproject.toml, and ensure backwards compatibility for reliable PyPI releases.
Create an outer and inner folder with the same name, add __init__.py, and export the Calculator class to turn your code into a Python package.
Learn how to install and run a Python package in a virtual environment, create a scripts folder, run a script, and use an editable install to reflect code changes instantly.
Publish your Python 3 package to PyPI by configuring, enabling two-factor authentication, and authenticating with an API token, then build and upload with twine, and verify by installation.
Learn to pip install a private repository from Git or GitHub using git+https URLs, create and activate a virtual environment, and optionally install a specific branch or tag.
Learn how python -m runs a package by invoking its main function, and explain the __name__ == '__main__' guard to prevent code from executing on import.
Create a project.scripts entry in pyproject.toml to map a bash command to a package function, then install in editable mode and run the command to call main.
Explore relative and absolute imports in Python packaging, demonstrate long and short import paths, compare readability, and practice choosing appropriate import styles across subdirectories.
Explore Python packaging with __init__.py, learn how subdirectories expose modules, and propagate imports through a package using relative and absolute imports across folders.
Explore the FileCalculator class that sums numbers from a nums.csv file using pathlib to build a relative path from the package’s location, ensuring robust packaging.
Learn to test Python packages with PyTest, upgrading existing unit tests and placing tests inside the package to ensure distribution, while writing basic tests, assertions, and handling zero division errors.
Write a simple pytest test for the FileCalculator class inside the packaging project, asserting the default file sums to 6 and demonstrating basic testing and packaging workflows.
Master type hints with MyPy to catch type errors before runtime, improve readability, and strengthen Python packaging by typing code and leveraging unions and none type.
Enable stronger mypy configurations by adding type hints, converting to floats, running mypy with strict mode, fixing type errors, and exporting modules for robust Python packaging.
Expose your type hints to users by adding a blank py.typed file in your package alongside calculator.py, enabling external code to read your types; future steps cover manifest.in and pyproject.toml.
TY, by Astral, is MyPy's spiritual successor, rewritten in Rust, delivering 20–100x faster performance. TY will take the industry by storm as Ruff gains attention.
Explore how linters check bugs, formatting, and PEP 8 conformance using Ruff’s unified static analysis. Learn to install, run checks, and auto-fix with Ruff for code formatting and import sorting.
Add tqdm as a runtime dependency to your Python package to show a progress bar while processing lines, and learn to couple this dependency for packaging.
Learn to configure pyproject.toml dependencies with tqdm using tilde equals for compatible versions, and define optional test dependencies like pytest, mypy, rough, and pre-commit.
Create and manage dependencies with requirements.txt and requirements.dev.txt alongside pyproject.toml. Install them with python3 -m pip install -r requirements.txt and use development files for testing, continuous integration, and deployment workflows.
Learn to use tox to run pytest, RoughFormat, RoughCheck, and MyPy across multiple Python versions in an automated CI/CD pipeline, with a tox.ini and GitHub Actions integration.
Automate tests and checks with GitHub Actions, running pytest, mypy, and ruff across a matrix of Python versions and operating systems, enabling a robust ci cd pipeline.
Learn to craft a polished README.md for Python packaging by integrating badges, markdown sections, links, and usage guides, while skipping CI for documentation updates.
Compare mkdocs and sphinx as documentation tools and explain why industry projects mostly rely on readmes and wikis instead of complex tooling.
Learn to distribute a Python package with manifest.in to include non-python files, bump the version in pyproject.toml, build with python -m build, and upload via twine.
Aligns code with a new Ruff config by running format and check, fixes prints, isort issues, and relative imports, then runs tests, bumps version, and releases via build and twine.
Discover how popular Python packages like bgpy and requests reach billions of downloads, and why type hints, linting, and basic docs matter.
Supercharge your career by learning how to build Python Packages like those in industry, so that anyone around the world can pip install your code, and do so in an extremely robust manner. In just a few hours, you'll go from building a Python Package, to supercharging it with MyPy, Ty, PyTest, Tox, GitHub Actions, CI/CD Pipelines, Ruff (including Black, Flake8, Isort, PyLint, and more), and so much more!
Hi, I'm Dr. Justin Furuness, and I'm the right guy to teach this to you. My Python packages have hundreds of thousands of downloads, have been used by NIST (the US government agency for cybersecurity), have been published in peer-reviewed papers, and have been used by teams all around the world.
But don't just take my word for it. Here are some testimonials from just a few of the more than 10,000 people that have taken my courses:
"The course content exceeded the expectations and details are to the point and crisp" -Ezhilarasi
"Very very helpful and my doubts are blown away which were there until now" -Sai
"This was great! I found it to be extremely helpful to get my bearings on the structure/process of a python package, and I'm excited to take this knowledge into my work." - Jamie
"Very much useful. Rarely I find this kind of work when the courses says advanced python but this is what I expect. Thanks for such great course. I wish if you can provide more such courses in future." - Amit
"Course was excellent" -Harikrishna
"That course and the instructor are just great! Clear and to the point. Don't let the length of the course fool you : ) It is truly worth it" - Moutasem
"Very good. Clearly a gifted programmer." -Matthew
"This is exactly what I needed, thanks!" -Zukisa
"Great, organized work. Keep producing more courses like this." -Dr. Ahmed
"It's an amazing course" -Mutra
"Great material, short and on point. I've liked the explanations and the clarity of the teacher. In the past I've installed some packages using different techniques but I needed some guidelines and best-practices with how structure a project, init files, main files ecc." -David
"To the point in a short time for a topic that I was struggling with for a long time." - Anonomous
"Nice and short, well explained. Recommend if this is a topic of interest to you." - Sean
"Excellent course, really appreciate that you got straight to the point and did not explain Python from scratch as many tutorials do. Those certainly have their place, but a quick course like this is definitely appreciated by someone who already knows the language!" - Jacob
"Short and sweet, efficient, concise gets to the point and it's good to see it all in one pass - is good about being transparent about not being for beginners, nice for me who has spent a long time programming in python for myself, but just never really able to get accustomed to more properly packaging code for others to use." -Ambrew
"Excellent" - Augustin
"Great course on python packaging. Short and with no minutia. I highly recommend it and wish the instructor had more courses." -Christina
"Really good course to the point and very current." - Patrick
"Detailed, succinct, and salient." - Bryce
"Thanks for the tutorial! It was very helpful. I am pretty sure I will come back to this course several times for references once I will want to create my own package." -Kamil
"I understood how to covert a python script to package in very nice and simple way. Thanks a lot." -Ranjan
"it was amazing, tnx" -Hejar
"I know nothing about how to create packages in python, and so far the explanations in the course are easy to follow." - Marte
"Many useful information in these videos. Highly recommended if you want to dig into creating packages, and use pip. Thanks for creating this course!" -Farkas
"That was such an informative, clearly explained course. I liked the briefness. It is one of the best content out there when we think about the course duration. Just 1-2 hours :) You will not be regretted. Thank you instructor !" -Furkan
"Awesome instructor. Explains on the point in a very comfortable and efficient way. Well done! Also, the contend introduces some extra tricks and best practices that i did not expect when starting the course." -Julian
"Thank you for the good and organized explanations!! they were very relevant!! Keep up the good work ;)" -Abderrahman
"great course. to the point. super useful. thanks :)" - Avi
"Great course, exactly what I was looking for." -Jose
"Very useful advanced topics and easy to follow." -Martin
"Really great course, perfect pace and explanation for each step of the process. Great start for a new project I am working with." -Corinne
"Such a wonderful, practical and to the point content. Every bit of the course is so enriching. This is my first course on uploading a package to PyPi. Additionally, this is also helpful for people who have never done OOP in Python. We need more from Justin Furuness or more Justin-s in udemy sharing their real knowledge. Thank you Sir" - Deepak
We start with building an example Calculator Python Package to get you back up to speed. We go over what pyproject.toml is, how to upload your packages to PyPI, when to use absolute vs relative imports, and more. We then add more advanced topics, such as: How to add type hinting and check them with static type checkers like MyPy and Ty. How to test our package with PyTest. How to run those tests in isolated environments, over many Python versions with Tox. How to automate tests with every git push using GitHub Actions. How to format our code automatically, and check for logic and syntax issues using linters like Ruff, which wraps up PyLint, Black, Flake8, and more. We work in how to version dependencies, what semantic versioning is and why it is useful, how to call our package from the command line, and how to get those cool README badges. And so much more!
This field is constantly evolving, and I make sure this course evolves right along with it. I make sure to update this course any time new changes come out, which for Python packaging, is often. I've made sure to include the latest changes from PyPi around their new authentication scheme. I've also added the latest and greatest type checker with Ty, and the latest and greatest linter with Ruff!
You're also getting access to myself and my help. Any questions feel free to message in the QnA and I'll be sure to respond. With a PhD, 10+ years of experience, and several popular Python packages with 100k+ downloads, you'll be getting top notch assistance.
As far as prerequisites go, this course is not for beginners. This is for strong python developers that are looking to take their skills to an advanced level. You should have a solid foundation in Python and have worked on at least a few Python projects of your own. You should know basic git/Github and terminal commands. This is meant to be part 2 of the Python Packaging series, but you can take this course without having ever taken part 1 as I have a refresher in the beginning.
This course is specifically geared to those who want to take their code to the next level and make it as robust as the code they see in popular open source packages, or code they might see in industry. Specifically college graduates and advanced developers. These skills are broadly applicable, far more than just with Python Packaging, and you'll likely use it throughout all of your codebases.
These skills are highly useful and will no doubt impress any employer. This is widely regarded as the one of the hardest topics in Python, if not the hardest, so if you can do this you will be among a select few.
And of course, this course has a 30 day no questions asked money back guarantee! So you have nothing to lose, and everything to gain. Please enroll now, and join me on this journey me as we take these advanced topics and turn them into something you find easy!