Created
August 29, 2020 09:22
-
-
Save jamescalam/fed1c86fbc2b74eedde28618cbaf9f73 to your computer and use it in GitHub Desktop.
Snippet showing multiple API endpoints setup with Flask.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Users(Resource): | |
# methods go here | |
pass | |
class Locations(Resource): | |
# methods go here | |
pass | |
api.add_resource(Users, '/users') # '/users' is our entry point for Users | |
api.add_resource(Locations, '/locations') # and '/locations' is our entry point for Locations |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment