This sample shows how to daper-ize a Python Web API. It makes use of the dapr
CLI command to interact with the locally running application.
You'll need to have the follow installed to propperly run the demo.
Run these commands in the demo2 root directory. First, you'll create a virtual environment for the workspace.
> python -m venv .venv
Once this is complete, activate virtual environment. If you're using VS Code with the python extension installed, it usually prompts you to activate the environment for you.
> . .venv/bin/activate
Run the following commands to upgrade pip and install FastAI
> python -m pip install --upgrade pip
> python -m pip install 'fastapi[all]' # quotes for zsh users
> python main.py
dapr run --app-id api --app-port 8000 --dapr-http-port 3500 python main.py
Sample requests have been provided in the httprequests folder that work with the REST Client for VS Code, but you can use any client you like such as cURL.