Hug vs Pencil: What are the differences?
Developers describe Hug as "New Python REST API and CLI micro-framework". Hug aims to make developing Python driven APIs as simple as possible, but no simpler. As a result, it drastically simplifies Python API development. On the other hand, Pencil is detailed as "A Microframework Inspired by Flask for Rust". A web application microframework for Rust.
Hug and Pencil can be primarily classified as "Microframeworks (Backend)" tools.
Hug and Pencil are both open source tools. It seems that Hug with 5.8K GitHub stars and 344 forks on GitHub has more adoption than Pencil with 871 GitHub stars and 43 GitHub forks.
What is Hug?
What is Pencil?
Need advice about which tool to choose?Ask the StackShare community!
Why do developers choose Pencil?
Sign up to add, upvote and see more prosMake informed product decisions
What are the cons of using Hug?
What are the cons of using Pencil?
What companies use Pencil?
Sign up to get full access to all the companiesMake informed product decisions
Unlike our frontend, we chose Flask, a microframework, for our backend. We use it with Python 3 and Gunicorn.
One of the reasons was that I have significant experience with this framework. However, it also was a rather straightforward choice given that our backend almost only serves REST APIs, and that most of the work is talking to the database with SQLAlchemy .
We could have gone with something like Hug but it is kind of early. We might revisit that decision for new services later on.