Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Latest commit

 

History

History
History

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 

Splitting the API into multiple files

Example of an API defined in multiple Python modules and combined together using the extend_api() helper.

Run with hug -f api.py. There are three API endpoints:

  • http://localhost:8000/say_hi() from api.py
  • http://localhost:8000/part1part1() from part_1.py
  • http://localhost:8000/part2part2() from part_2.py
Morty Proxy This is a proxified and sanitized view of the page, visit original site.