Hug vs Trails: 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, Trails is detailed as "Modern Web Application Framework for Node.js". Trails is a modern, community-driven web application framework for node.js. It builds on the pedigree of Rails and Grails to accelerate development by adhering to a straightforward, convention-based, API-driven design philosophy.
Hug and Trails can be categorized as "Microframeworks (Backend)" tools.
"Simple" is the top reason why over 3 developers like Hug, while over 7 developers mention "Easy setup and usage" as the leading cause for choosing Trails.
Hug and Trails are both open source tools. It seems that Hug with 5.8K GitHub stars and 344 forks on GitHub has more adoption than Trails with 1.72K GitHub stars and 75 GitHub forks.
What is Hug?
What is Trails?
Need advice about which tool to choose?Ask the StackShare community!
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 Trails?
Sign up to get full access to all the companiesMake informed product decisions
Sign up to get full access to all the tool integrationsMake 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.
The number one thing I like about Trails is that it does not force me to use any particular web server or database layer. I can choose the web server (hapi, express, etc), ORM layer (bookshelf, sequelize, waterline) and everything works with a common configuration.