Skip to content

Commit d224ee7

Browse files
committed
Add readme
1 parent 767b574 commit d224ee7

1 file changed

Lines changed: 55 additions & 0 deletions

File tree

README.md

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
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\scripts\activate.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`

0 commit comments

Comments
 (0)