Skip to content

Commit 5ca1edf

Browse files
committed
freshen PyPi README
1 parent fbddb02 commit 5ca1edf

File tree

1 file changed

+16
-12
lines changed

1 file changed

+16
-12
lines changed

README.md

Lines changed: 16 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
# NetFoundry Python Module
2+
3+
This module has a general-purpose library for using the NetFoundry API and installs the CLI `nfctl`.
14

25
## User Guide
36

@@ -6,18 +9,19 @@
69
## Find the Version
710

811
```bash
9-
$ python3 -m netfoundry.version
12+
$ python3 -m netfoundry.version
13+
v5.2.0
14+
# or
15+
$ nfctl version
1016
v5.2.0
1117
```
1218

1319
## Play the demo
1420

15-
This creates a demo network named "BibbidiBobbidiBoo" with your API account stored in ~/.netfoundry/credentials.json
16-
17-
Learn about getting an API account by reading the [Authentication Guide](https://developer.netfoundry.io/v2/guides/authentication/)
21+
This creates a demo network with your API account file named `credentials.json` stored in the current directory or the XDG config directory e.g. `~/.config/netfoundry/`. Learn how to obtain and use an API account for your NetFoundry organization in [the Authentication Guide](https://developer.netfoundry.io/guides/authentication/)
1822

1923
```bash
20-
python3 -m netfoundry.demo --network=BibbidiBobbidiBoo
24+
nfctl demo
2125
```
2226

2327
## Create network snippet from demo.py
@@ -29,19 +33,19 @@ import netfoundry
2933
# user-default path is ~/.netfoundry/
3034
organization = netfoundry.Organization(credentials="credentials.json")
3135

32-
# use some Network Group, default is to use the first and there's typically only one
36+
# use some network group, default is to use the first and there's typically only one
3337
network_group = netfoundry.NetworkGroup(organization)
3438

35-
# create a Network
39+
# create a network
3640
network_name = "BibbidiBobbidiBoo"
37-
if network_name in network_group.networks_by_name().keys():
38-
# use the Network
41+
if network_group.network_exists(network_name):
42+
# use the network
3943
network = netfoundry.Network(network_group, network_name=network_name)
40-
network.wait_for_status("PROVISIONED",wait=999,progress=True)
44+
network.wait_for_status("PROVISIONED")
4145
else:
4246
network_id = network_group.create_network(name=network_name)['id']
4347
network = netfoundry.Network(network_group, network_id=network_id)
44-
network.wait_for_status("PROVISIONED",wait=999,progress=True)
48+
network.wait_for_status("PROVISIONED")
4549
```
4650

4751
## Publish a new version of the module
@@ -65,4 +69,4 @@ else:
6569
12:00 Verify Published Artifacts in PyPi and Hub
6670
12:30 PyPi Upgrade Gets New Version
6771
13:30 Docker Run Check Version
68-
```
72+
```

0 commit comments

Comments
 (0)