Extend client README
Signed-off-by: Georg Pfuetzenreuter <mail@georg-pfuetzenreuter.net>
This commit is contained in:
parent
98b3f82397
commit
8913c5a2fe
@ -1 +1,14 @@
|
|||||||
# RESTful HTTP API for nftables - Client
|
# RESTful HTTP API for nftables - Client
|
||||||
|
|
||||||
|
## Usage
|
||||||
|
|
||||||
|
The token can be passed either as an argument to `NftablesRemote()` or in the environment variable `NFT-API-TOKEN`.
|
||||||
|
|
||||||
|
```
|
||||||
|
# initialize
|
||||||
|
from nftables_api_client.client import NftablesRemote
|
||||||
|
nft = NftablesRemote('http://localhost:9090', 'mytoken')
|
||||||
|
|
||||||
|
# do things
|
||||||
|
nft.get('/set/inet/filter/foo')
|
||||||
|
```
|
||||||
|
Loading…
Reference in New Issue
Block a user