-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
75708f9
commit 4c060e6
Showing
5 changed files
with
23 additions
and
0 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
This folder is optional but if you have any data (eg. CSV) files that are needed, you should store them here in one folder |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
# API Template (Flask) | ||
|
||
This is a template you can use/follow to make a simple Flask Microservice. It may need adjusting based on your needs. | ||
|
||
Simply put, you should be able to use this template by importing your original python file and modifying the other files/folders to setup the API endpoints. | ||
|
||
For more guidance, you can also refer to the ETA API for more guidance as that follows a very similar format. |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
This Schemas folder should contain any SQL queries needed to setup your table so that it can receive data |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
# This file will be heavily dependent on your service but some general steps are detailed below | ||
|
||
# Ensure that any dependencies (eg. libraries, packages, files, DB) are accounted for here | ||
|
||
# Retrieve environment variables (ie. DB credentials) and connect to your DB | ||
|
||
# Write your API methods/endpoints below as needed (this should take care of pulling data and writing it as needed through the use of JSON data) | ||
|
||
# Your API method can most likely pull the necessary data, feed it into your logic/other python file (eg. for the ETA API, it feeds the data into the eta.py file, and execute the appropriate methods | ||
|
||
# Below is the code needed to start running your microservice -> The code below will run your microservice locally on port 6000 (change as necessary if it's already taken) | ||
if __name__ == '__main__': | ||
app.run(host='0.0.0.0', port=6000) |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
This file is pretty straightforward, make sure to have all required packages/libraries included here for setup/dependency purposes. |