Typer, build great CLIs. Easy to code. Based on Python type hints.
As means of demonstrating this last property, let's create a simple CLI tool for adding numbers - we'll add logging debug messages and timing reports as optional features that can be enabled using flags. I'm going to use typer to turn our service into a CLI application:
A standard library for microservices.
I first learned of this pattern in Go's go-kit where I've seen it called "service middlewares". The Design Patterns book describes something similar as the "decorator" pattern - not to be confused with Python decorators, which have the unfortunate property of melding themselves with what they decorate, which limits their practical usefulness, at least as far as reducing coupling is concerned.
Less time debugging, more time building. Scout APM allows you to find and fix performance issues with no hassle. Now with error monitoring and external services monitoring, Scout is a developer's best friend when it comes to application development.
Example code for a blog post about composition patterns in Python.
A working example of the protocol-based implementation can be found on GitHub.
How to build a command line package from scripts?
1 project | reddit.com/r/bioinformatics | 9 Aug 2022
Better entry points with a decorator
1 project | reddit.com/r/Python | 26 Jul 2022
Is a console application the same as a command line interface>
1 project | reddit.com/r/learnprogramming | 6 Jul 2022
A markdown to html converter
2 projects | reddit.com/r/PythonProjects2 | 25 Jun 2022
Typer is a library for building CLI applications based on Python 3.6 type hints
1 project | news.ycombinator.com | 9 Jun 2022