r/ProgrammerTIL • u/_daleal • Mar 25 '21
Python [Python] I wrote a project to transform web APIs into CLIs for development/whatnots
I wrote this project that lets you describe a web API using the TOML markup language and then call it like a CLI. I find this to be something that I want to do quite often, so I'm really happy with what I accomplished. I hope you find it useful! The project is unit tested with 100% coverage and is completely type annotated ♥
Go check it out! https://github.com/daleal/zum
Also, go check out the documentation! https://zum.daleal.dev
12
Upvotes
25
u/szukai Mar 25 '21
So er, what did you learn today?
1
u/nwsm Mar 25 '21
Neat! It would be cool if you could supply an OpenAPI spec instead of custom TOML.
1
u/natter76 Mar 25 '21
Nice :) thank you for sharing
0
u/chunkaburninlove Mar 25 '21
Cool project. I'm interested to look through your code and see how you did it.
For me though I'm not seeing the use case. There are hundreds of various, hardened libraries in various languages for making REST API calls, most of which are just as terse as Zum.
I also think that you lose quite a bit of readability in the body for the sake of saving a few keystrokes. How would someone using this for the first time implicitly know that they need to put name before city?