How I Built and Published My First Python Library on PyPI — automlease
As a recent BTech Management graduate from NAIT in Edmonton, Canada, I just accomplished something I never imagined when I started learning…
How I Built and Published My First Python Library on PyPI — automlease
As a recent BTech Management graduate from NAIT in Edmonton, Canada, I just accomplished something I never imagined when I started learning Python a few weeks ago — I built and published my own open source Python library on PyPI. It is called automlease, and anyone in the world can now install it with a single command.
This article walks you through what I built, why I built it, and how you can build your own PyPI library too.
What is automlease?
automlease is a Python library that lets complete beginners train a machine learning model in just 3 lines of code. Instead of writing 200+ lines of imports, data cleaning, model training, and evaluation code, automlease does everything automatically.
Install it: pip install automlease
Use it: from automlease import AutoML model = AutoML() model.fit(‘your_data.csv’, target=’target_column’) model.report()
That is it. Four lines. Your model is trained, evaluated, and a beautiful report is generated automatically.
What automlease does automatically:
It loads any CSV file you provide. It cleans missing values and converts text columns to numbers automatically. It detects whether your problem is classification or regression. It trains multiple ML models and picks the best one. It generates a detailed evaluation report with accuracy, precision, recall and F1 score. It creates a feature importance chart automatically. It saves the best model as a file so you can use it later.
The Problem I Wanted to Solve
When I was building my Heart Disease Prediction ML project, I realized that as a beginner, I was spending most of my time on repetitive setup code — importing libraries, handling missing values, encoding text columns, and splitting data. The actual machine learning part was only a small portion of the work.
I thought — what if a beginner could skip all of that and just focus on the results? That is exactly what automlease does.
The Libraries I Combined
My professor Yash Shah challenged me to combine 2 to 3 existing libraries into something new and useful. Here is what automlease combines:
Pandas handles loading and cleaning the data. scikit-learn provides the machine learning algorithms — Random Forest and Logistic Regression for classification, Random Forest and Linear Regression for regression. matplotlib and seaborn create the automatic feature importance charts. joblib saves the best-trained model automatically. Rich creates beautifully formatted terminal output with tables and colours.
How I Built It
I created a Python class called AutoML with two main methods. The fit method handles everything from loading data to training and saving the best model. The report method generates the evaluation summary and charts.
The entire library is built around one insight — a beginner should not need to know HOW machine learning works to USE machine learning. automlease handles the how, so the user can focus on the results.
Testing it on Real Data
I tested automlease on the same UCI Heart Disease dataset I used for my previous project — 920 real patient records. With just 3 lines of code automlease loaded the data, cleaned it, trained a Random Forest model, and achieved 83.78% accuracy. It also automatically generated a feature importance chart showing that chest pain type, maximum heart rate, and age were the most important predictors.
What I Learned
Building and publishing a PyPI library taught me things no course could. I learned how Python packages are structured with init.py and setup.py files. I learned how to use twine to publish to PyPI. I learned how to write clear documentation in README.md. Most importantly, I learned that creating something useful for others is the most rewarding part of being a developer.
Links
PyPI: https://pypi.org/project/automlease/
GitHub: https://github.com/vickybanna3327-byte/automlease
Special thanks to my mentor Yash Shah for pushing me to build something original and publish it to the world. This is just the beginning!
메타데이터
- post_id
- 4f96d76ec109
- slug
- how-i-built-and-published-my-first-python-library-on-pypi-automlease-4f96d76ec109
- url
- https://medium.com/@vickybanna3327/how-i-built-and-published-my-first-python-library-on-pypi-automlease-4f96d76ec109
- canonical_url
- https://medium.com/@vickybanna3327/how-i-built-and-published-my-first-python-library-on-pypi-automlease-4f96d76ec109
- author_url
- https://medium.com/@vickybanna3327
- status
- ok
- fetched_at
- 2026-06-21 07:44:09