Skip to content

Commit 4129e02

Browse files
authored
Parameterize fastapi-github example with environment vars (#3078)
## 📝 Summary Detects `GITHUB_REPO` and `REPO_ROOT` environment variables if set, falling back to default in marimo. (I believe this is the desired behavior of the script) <!-- Provide a concise summary of what this pull request is addressing. If this PR fixes any issues, list them here by number (e.g., Fixes #123). --> ## 🔍 Description of Changes Just detects `GITHUB_REPO` and `REPO_ROOT` environment variables if set. <!-- Detail the specific changes made in this pull request. Explain the problem addressed and how it was resolved. If applicable, provide before and after comparisons, screenshots, or any relevant details to help reviewers understand the changes easily. --> ## 📋 Checklist - [x] I have read the [contributor guidelines](https://github.com/marimo-team/marimo/blob/main/CONTRIBUTING.md). - [ ] For large changes, or changes that affect the public API: this change was discussed or approved through an issue, on [Discord](https://marimo.io/discord?ref=pr), or the community [discussions](https://github.com/marimo-team/marimo/discussions) (Please provide a link if applicable). - [ ] I have added tests for the changes made. - [ ] I have run the code and verified that it works as expected. ## 📜 Reviewers @mscolnick
1 parent 84e5f35 commit 4129e02

File tree

1 file changed

+2
-2
lines changed
  • examples/frameworks/fastapi-github

1 file changed

+2
-2
lines changed

examples/frameworks/fastapi-github/main.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,8 @@
2323
logger = logging.getLogger(__name__)
2424

2525
# Constants
26-
GITHUB_REPO = "marimo-team/marimo"
27-
ROOT_DIR = "examples/ui"
26+
GITHUB_REPO = os.environ.get("GITHUB_REPO", "marimo-team/marimo")
27+
ROOT_DIR = os.environ.get("ROOT_DIR", "examples/ui")
2828
templates_dir = os.path.join(os.path.dirname(__file__), "templates")
2929

3030
# Set up templates

0 commit comments

Comments
 (0)