- go to /docker
- run
docker-compose up --build -d - go to
localhost:8000in a browser window
- This will populate the database and necessary table
- Access API
- API documentation can be viewed in API.md
import requests
r = requests.post('http://localhost:8000/api/add_service', json={
"Ref": "REFREF1",
"Centre": "Centre Name",
"Service": "Service Name"
"Country": "Cn",
})
print(f"Status Code: {r.status_code}, Response: {r.text}")import requests
r = requests.post('http://localhost:8000/api/update_service', json={
"Ref": "REFREF1",
"Centre": "Centre Name",
"Service": "Service Name"
"Country": "Cn",
})
print(f"Status Code: {r.status_code}, Response: {r.text}")import requests
r = requests.get('http://localhost:8000/api/get_country?country_code=gb')
print(f"Status Code: {r.status_code}, Response: {r.json()}")