Miscellaneous Software

Miscellaneous software I develop and maintain in free time. Right now, it's all Python!



I really like how Julia modules work. Once you include a package using Julia's using keyword, all exported names are names in that package's public API. In Python, however, folks typically import packages with shortened names, and then access that package's contents using dot-syntax. For example, Python's popular numpy package is often used similarly to the code below.

import numpy as np
x = -1
absx = np.abs(x)
print(f"The absolute value of {x} is {absx}!")

So in short, Python users typically use the full namespace of each module. But sometimes you have "private"-like names in a module which you don't want your users to use! For example, typing has become increasingly popular. You want those types when your module is first loaded so each function's signatures are accurate, but you don't want your users to have access to typing.List and typing.Any when they use your package!

Introducing: module-hygiene. This package provides a cleanup function which helps you keep all of your modules clean! This is definitely an opiononated project, and most developers won't want to use it. Still, it makes me happy!


This will soon be public! I'm working on a Python package which uses the excellent rich package to provide rich-formatting to subprocess output. Check back here soon!