While the portfolio data is just a canned sample, one could likely insert their own model portfolios into the logic chain.
Install this in an environment with a version of Python between 3.9-3.12, inclusively.
-
Run,
pip install -e . -
Run,
openbb-api --app demo_risk/app.py --host 0.0.0.0 --port 6020 -
Open the OpenBB Workspace.
-
Add
http://127.0.0.1:6020as a new custom backend. -
Go to the templates page, click Refresh button.
-
Click on the new template.
-
Enjoy your burrito.
To run the application using Docker:
- Build the Docker image:
docker build -t demo-risk .- Run the container:
docker run -p 6020:6020 demo-risk-
Open the OpenBB Workspace.
-
Add
http://127.0.0.1:6020as a new custom backend. -
Go to the templates page, click Refresh button.
-
Click on the new template.
That's it.
To deploy the application on Fly.io:
- Install the Fly.io CLI:
curl -L https://fly.io/install.sh | sh- Login to Fly.io:
fly auth login- Initialize the app (if not already done):
fly launch- Deploy the application:
fly deploy- Open the deployed app:
fly open- In the OpenBB Workspace:
- Add the deployed URL (e.g.,
https://demo-risk.fly.dev) as a new custom backend. - Go to the templates page and click Refresh
- Click on the new template
The application is now deployed and accessible from anywhere!
Note: the deployed URL may vary based on your configs.
