Back to Programming

Ferrum

Completed

Simple Python Project Package Manager (SPPPM); Install packages for your user with a single line of code.

10-01-2025

Overview

Ferrum (Latin for iron) is a simple Python package manager designed to run with the program. It allows developers to easily install all of their dependencies with a single line of code, without needing to worry about users messing it up.

Features

  • Simple one-line installation of dependencies.
  • Version pinning
  • Uninstalling of dependencies also supported
  • Works on Windows, MacOS, and Linux

Installation and Usage

To install Ferrum, install from pip with the command pip install ferrum

To use Ferrum, import it in your python source code and call the function Ferrum.forge with a list of packages to install. For example, Ferrum.forge(["numpy","scipy"]) To uninstall packages, use Ferrum.purge with a list of packages to uninstall.

There are two options (flags) to use with ferrum, Verbose, and Summary

.

Verbose mode broadcasts the output from pip, while summary produces a simple success/failure summary of install/uninstall

Code Overview

Like most of my projects, Ferrum is completely open source, and less than 100 lines of code. You can find the source code on GitHub. The main logic of Ferrum is in the forge and purge functions, which contain about 90% of the total code. From the forge function, it first finds if the package exists, and if the developer put the packages in correct syntax (list/tuple/dict). The program then goes into a for loop running an subprocess command to install each package using pip. If the summary flag is toggled, it prints the results for each package. Purge does the same thing but it uninstalls the packages.

Reflection

I originally made this project because I got minorly annoyed that I needed to install dependencies manually for each project I ran on my computer. Yes a requirements.txt file exist, but I wanted something even quicker and simpler for newer users that prefer to not use the terminal. (That purpose kinda gets defeated because you have to install Ferrum using the terminal, but I digress :/ ) Overall, I am happy with how this project turned out, because I learned a lot about making packages, and using subprocesses in Python.