This project has as its main objective to be a template for FastAPI with Cloudant DB. After that, upload to IBM Cloud.
This section should list any major frameworks/libraries used to bootstrap your project. Leave any add-ons/plugins for the acknowledgements section. Here are a few examples.
This is an example of how you may give instructions on setting up your project locally. To get a local copy up and running follow these simple example steps.
This is an example of how to list things you need to use the software and how to install them.
- Create a .env file to run the cloudant-rest-db branch
CLOUDANT_USER=""
CLOUDANT_PWD=""
CLOUDANT_HOST=""
CLOUDANT_DATABASE=""
- Create a vcap-local.json file to run the deploy-to-ibm-cloud branch
{
"services": {
"cloudantNoSQLDB": [
{
"credentials": {
"username":"",
"password":"",
"host":""
},
"label": "cloudantNoSQLDB"
}
]
}
}
- Install Python3, pip3
Once with all prerequisites done, you need install the dependencies:
pip3 install -r requirements.txt
Run the server with:
uvicorn main:app --reload
Now go to http://127.0.0.1:8000/docs to verify all the routes.
Matheus Bitencourt - @matbiit
Project Link: https://github.com/matbiit/fast-api-db-template