I created my first (tiny) Python library! PyMicroConf: a tiny TOML config handler

https://github.com/NickBrisebois/pymicroconf

I was working on another random side project and wanted to define configs like Pydantic-Settings without actually pulling in all of Pydantic into my project, so I started writing a custom config class which turned out generic enough that I could break it off into its own thing.

One of the main things I wanted is to be able to load a TOML file for settings but to also be able to override each config option with an env var. I also really like Pydantic's use of Annotation[..., ...] type-hinting so I did something similar

I don't really expect it to be used by anyone else but I'm excited about putting out my first PyPi package and figured I'd share it here :)

Any feedback is very welcome!

PyPi link: https://pypi.org/project/pymicroconf/

Also AI disclosure: I got AI to partially write the description but the code itself isn't written by AI

14 points · 3 comments · view on lemmy.world

3 Comments

dance_ninja@lemmy.world · 3 pts · 205d (1 reply)

Thanks for sharing! I've been using TOML for some simple user-friendly config settings. It's great to see more structured approaches to using it.

NotSteve_@piefed.ca · 2 pts · 205d

It's an amazing config language!

danhab99@programming.dev · 3 pts · 205d

I love TOML!