Introducing: hug 2
The first release of hug introduced a succinct and intuitive way of building HTTP REST APIs with Python 3. Version 2 brings further improvements to the way HTTP APIs can be created, while also enabling single API definitions to be exposed over multiple interfaces. APIs can now be exposed to HTTP, the command line, and Python from the same codebase.
Write once. Use everywhere.
With hug 2.0.0 your API and business logic is cleanly separated from the interface you're exposing it on, which means you can safely expose it over HTTP, CLI, and Python in one fell swoop.
hug 2.0.0 introduces the concept of seamless micro-service communication, which makes it easy to switch out pure Python calls for HTTP communication and vice versa.
hug 2.0.0 makes reusing routes easy. Every route object is chainable and doesn't perform any actions until it is ran against a function, method, or object.
Improved type system; integrated Marshmallow support
hug 2.0.0 introduces an improved expandable type system for simple parameters while also fully integrating support for Marshmallow. With hug you can simply pass a Marshmallow schema or field as a type annotation on any endpoint and hug will take care of the rest.
Class based routing
With hug 2.0.0 creating a route from a class definition is a breeze.
Intuitive exception handling
Want to customize the behavior when a list of custom exceptions happen? Or when any exception occurs? hug 2.0.0 makes handling the edge cases easy and intuitive.