Skip to content

Commit a07b94f

Browse files
committed
add support for .env with python-dotenv
1 parent 6c574db commit a07b94f

File tree

3 files changed

+6
-0
lines changed

3 files changed

+6
-0
lines changed

.env.sample

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
GEMINI_PROJECT_ID=<GEMINI_PROJECT_ID>
2+
GITHUB_TOKEN=<GITHUB_TOKEN>

main.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,11 @@
1+
import dotenv
12
import os
23
import argparse
34
# Import the function that creates the flow
45
from flow import create_tutorial_flow
56

7+
dotenv.load_dotenv()
8+
69
# Default file patterns
710
DEFAULT_INCLUDE_PATTERNS = {
811
"*.py", "*.js", "*.ts", "*.go", "*.java", "*.pyi", "*.pyx",

requirements.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,3 +3,4 @@ pyyaml>=6.0
33
requests>=2.28.0
44
google-cloud-aiplatform>=1.25.0
55
google-genai>=1.9.0
6+
python-dotenv>=1.0.0

0 commit comments

Comments
 (0)