Skip to content

Latest commit

 

History

History
80 lines (58 loc) · 1.95 KB

README.md

File metadata and controls

80 lines (58 loc) · 1.95 KB

fast-api-db-template

This project has as its main objective to be a template for FastAPI with Cloudant DB. After that, upload to IBM Cloud.

Built With

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.

(back to top)

Getting Started

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.

Prerequisites

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

Installation

Once with all prerequisites done, you need install the dependencies:

pip3 install -r requirements.txt

Run the server with:

uvicorn main:app --reload

(back to top)

Usage

Now go to http://127.0.0.1:8000/docs to verify all the routes.

(back to top)

Contact

Matheus Bitencourt - @matbiit

Project Link: https://github.com/matbiit/fast-api-db-template

(back to top)