File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ # NGI Live API sample
2+
3+ ## Requirements:
4+
5+ - Python
6+
7+ ## Set up:
8+
9+ 1 . Create a virtual environment
10+
11+ ``` sh
12+ python -m venv .venv
13+ ```
14+
15+ 2 . Activate the python virtual environent
16+
17+ linux/mac:
18+
19+ ``` sh
20+ source .venv/bin/activate
21+ ```
22+
23+ windows:
24+
25+ ``` sh
26+ .venv\s cripts\a ctivate.ps1
27+ ```
28+
29+ 3 . Install dependencies from requirements file
30+
31+ ``` sh
32+ pip install -r requirements.txt
33+ ```
34+
35+ 4 . Create a ` .env ` file from the template and fill the required variables in the .env
36+
37+ Contact NGI to obtain a client id and secret if you don't have one.
38+
39+ Linux/mac:
40+
41+ ``` sh
42+ cp .env.template .env
43+ ```
44+
45+ Fill the required parameters, for example:
46+
47+ ```
48+ KEYCLOAK_CLIENT_ID=your-client # your client id
49+ KEYCLOAK_CLIENT_SECRET=abcsasdkjhadkjjd # your client secret
50+ PROJECT_ID=20241234 # Project number
51+ ```
52+
53+ ## Run the sample:
54+
55+ ` python demo.py `
You can’t perform that action at this time.
0 commit comments