Making Unicorns Fly with Python
Mind map of six different progressive ways to set up a Python project

Making Unicorns Fly with Python

Before Henry Ford famously said, "If I had asked people what they wanted, they would have said faster horses," there was a problem that James Watt, a mechanical engineer, faced in the late 18th century. Legend has it that one of his first customers asked him to create a steam engine that could match the capabilities of a horse. Using his creativity, Watt coined the term "horsepower" and developed a formula to measure it. He determined that one horsepower is equal to the power needed to lift 550 lbs, not 500 lbs, by one foot in one second. Years later, engineers conducted experiments and found that a horse could produce 5.7 horsepower.

What does this have to do with flying unicorns and the Python coding language? Well, not much. However, in the vast ecosystem of Python libraries and the countless ways to assemble code, it's important to consider how to efficiently and effectively share the functionality of code with others, even if it involves calculating how many unicorns are needed to match a specific horsepower.

So, how can Python code be packaged in a way that is reproducible, efficient, and easy to share with others? Here are six different progressive approaches to run and package a flying-unicorn Python package.

Six Progressive Ways of Setting Up a Python Project

1. `1.local` - Running Python on your local machine (YOLO)
2. `2.venv` - Using Python virtual environments
3. `3.pip` - Using `pip` for local package management
4. `4.poetry` - Using `poetry` for local package management
5. `5.twine` - Using `Twine` to publish and distribute code
6. `6.docker` - Using `Docker` to reliably reconstruct a Python package during build        

More detailed information and steps are on GitHub

To view or add a comment, sign in

More articles by Tariku Tessema

Explore content categories