File size: 441 Bytes
7791260
 
 
 
9e1e908
7791260
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
from fastapi import FastAPI
app = FastAPI()
import os 
import sys
src_directory = os.path.abspath(os.path.join(os.path.dirname(__file__),"../","api"))
sys.path.append(src_directory)


from modules import continents

df = continents.process_data()

@app.get("/")
def home():
    return {"message": "Welcome World"}

@app.get("/continents")
def display_continents():
    continent = continents.get_continents(df)
    return continent.tolist()