Hug

Latest version: v2.6.1

Safety actively analyzes 631178 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

Page 4 of 10

2.3.2

- Implemented Issue 540: Add support for remapping parameters
- Updated Falcon requirement to 1.3.0
- Fixed issue 552: Version ignored in class based routes
- Fixed issue 555: Gracefully handle digit only version strings
- Fixed issue 519: Exceptions are now correctly inserted into the current API using `extend_api`
- Breaking Changes:
- Fixed issue 539: Allow JSON output to include non-ascii (UTF8) characters by default.

2.3.1

- Fixed issue 500 & 504: Added support for automatic reload on Windows & enabled intuitive use of pdb within autoreloader
- Implemented improved way to retrieve list of urls and handlers for issue 462
- Implemented support for Python typing module style sub types
- Updated to allow -m parameter load modules on current directory
- Improved hug.test decode behaviour
- Added built in handlers for CORS support:
- directive `hug.directives.cors`
- Improved routing support
- Added allow origins middleware

2.3.0

- Falcon requirement upgraded to 1.2.0
- Enables filtering documentation according to a `base_url`
- Fixed a vulnerability in the static file router that allows files in parent directory to be accessed
- Fixed issue 392: Enable posting self in JSON data structure
- Fixed issue 418: Ensure version passed is a number
- Fixed issue 399: Multiple ints not working correctly for CLI interface
- Fixed issue 461: Enable async startup methods running in parallel
- Fixed issue 412: None type return for file output format
- Fixed issue 464: Class based routing now inherit templated parameters
- Fixed issue 346: Enable using async routes within threaded server
- Implemented issue 437: Added support for anonymous APIs
- Added support for exporting timedeltas to JSON as seconds
- Added support for endpoint-specific input formatters:
python
def my_input_formatter(data):
return ('Results', hug.input_format.json(data))

hug.get(inputs={'application/json': my_input_formatter})
def foo():
pass

- Adds support for passing in a custom scheme in hug.test
- Adds str() and repr() support to hug_timer directive
- Added support for moduleless APIs
- Improved argparser usage message
- Implemented feature 427: Allow custom argument deserialization together with standard type annotation
- Improvements to exception handling.
- Added support for request / response in a single generator based middleware function
- Automatic reload support for development runner
- Added support for passing `params` dictionary and `query_string` arguments into hug.test.http command for more direct modification of test inputs
- Added support for manual specifying the scheme used in hug.test calls
- Improved output formats, enabling nested request / response dependent formatters
- Breaking Changes
- Sub output formatters functions now need to accept response & request or **kwargs
- Fixed issue 432: Improved ease of sub classing simple types - causes type extensions of types that dont take to __init__
arguments, to automatically return an instanciated type, beaking existing usage that had to instanciate
after the fact
- Fixed issue 405: cli and http hug.startup() differs, not executed for cli, this also means that startup handlers
are given an instance of the API and not of the interface.

2.2.0

Not secure
- Defaults asyncio event loop to uvloop automatically if it is installed
- Added support for making endpoints `private` to enforce lack of automatic documentation creation for them.
- Added HTTP method named (get, post, etc) routers to the API router to be consistent with documentation
- Added smart handling of empty JSON content (issue 300)
- Added ability to have explicitly unversioned API endpoints using `versions=False`
- Added support for providing a different base URL when extending an API
- Added support for sinks when extending API
- Added support for object based CLI handlers
- Added support for excluding exceptions from being handled
- Added support for **kwarg handling within CLI interfaces
- Allows custom decorators to access parameters like request and response, without putting them in the original functions' parameter list
- Fixed not found handlers not being imported when extending an API
- Fixed API extending support of extra features like input_format
- Fixed issue with API directive not working with extension feature
- Fixed nested async calls so that they reuse the same loop
- Fixed TypeError being raised incorrectly when no content-type is specified (issue 330)
- Fixed issues with multi-part requests (issue 329)
- Fixed documentation output to exclude `api_version` and `body`
- Fixed an issue passing None where a text value was required (issue 341)

2.1.2

Not secure
- Fixed an issue with sharing exception handlers across multiple modules (Thanks soloman1124)
- Fixed how single direction (response / request) middlewares are bounded to work when code is Cython compiled

2.1.1

Not secure
- Hot-fix release to ensure input formats don't die with unexpected parameters

Page 4 of 10

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.