Skip to content

Commit 1d40591

Browse files
committed
update README example
1 parent b7e714f commit 1d40591

File tree

1 file changed

+5
-6
lines changed

1 file changed

+5
-6
lines changed

README.md

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,7 @@ This creates a demo network named "BibbidiBobbidiBoo" with your API account stor
1010
Learn about getting an API account by reading the [Authentication Guide](https://developer.netfoundry.io/v2/guides/authentication/)
1111

1212
```bash
13-
$ python3 -m netfoundry.demo BibbidiBobbidiBoo
14-
INFO: running demo script in /home/alice/.pyenv/versions/3.9.0/lib/python3.9/site-packages/netfoundry/demo.py
13+
python3 -m netfoundry.demo --network=BibbidiBobbidiBoo
1514
```
1615

1716
## Create network snippet from demo.py
@@ -20,15 +19,15 @@ INFO: running demo script in /home/alice/.pyenv/versions/3.9.0/lib/python3.9/sit
2019
#!/usr/bin/env python3
2120
import netfoundry
2221

23-
# default API account credential file is ~/.netfoundry/credentials.json
24-
Organization = netfoundry.Organization(credentials="credentials.json")
22+
# user-default path is ~/.netfoundry/
23+
organization = netfoundry.Organization(credentials="credentials.json")
2524

2625
# use some Network Group, default is to use the first and there's typically only one
27-
network_group = netfoundry.NetworkGroup(Organization)
26+
network_group = netfoundry.NetworkGroup(organization)
2827

2928
# create a Network
3029
network_name = "BibbidiBobbidiBoo"
31-
if network_name in network_group.networks_by_name.keys():
30+
if network_name in network_group.networks_by_name().keys():
3231
# use the Network
3332
network = netfoundry.Network(network_group, network_name=network_name)
3433
network.wait_for_status("PROVISIONED",wait=999,progress=True)

0 commit comments

Comments
 (0)