Skip to content
This repository has been archived by the owner on Nov 8, 2024. It is now read-only.

Update SDK usage examples #44

Merged
merged 5 commits into from
May 30, 2024
Merged

Update SDK usage examples #44

merged 5 commits into from
May 30, 2024

Conversation

schmit
Copy link
Contributor

@schmit schmit commented May 29, 2024

Motivation and Context

Updates our examples, adds a FastAPI example and a bandit example

Description

Updated the examples/ folder to add additional examples.

How has this been tested?

Runs locally

@schmit schmit changed the base branch from main to sps/bandit May 29, 2024 23:26
@schmit schmit requested review from aarsilv and giorgiomartini0 May 29, 2024 23:26
@schmit schmit changed the title Update examples Update SDK usage examples May 29, 2024
@schmit
Copy link
Contributor Author

schmit commented May 29, 2024

Not too concerned with the mypy issues for these examples

Base automatically changed from sps/bandit to main May 30, 2024 05:11
@schmit schmit force-pushed the sps/bandit-example branch from 53d6a5b to 0203cbf Compare May 30, 2024 05:14
@@ -8,7 +8,7 @@ source venv/bin/activate
pip install -r requirements.txt
```

Set your API key in `main.py`:
Set your API key in `01_script.py`:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The other two examples read from the EPPO_API_KEY env var. I'd recommend updating this to say to also set the env var, or make it consistent across the examples/use env var for all.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes see where you are coming from. I wanted to keep the script simple and just copy-pasting in the API key seems the best way for the very first script. The other examples show more of the best-practice. Agreed we should make it clearer how to set up though

Copy link
Contributor

@petzel petzel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

one minor comment re: the README, overall LGTM

@schmit schmit merged commit 38dae12 into main May 30, 2024
3 of 4 checks passed
@schmit schmit deleted the sps/bandit-example branch May 30, 2024 05:32
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants