From 8913c5a2fe1c7d760c0a48a9f53dbe03ee83a7de Mon Sep 17 00:00:00 2001 From: Georg Pfuetzenreuter Date: Sun, 29 Sep 2024 13:17:28 +0200 Subject: [PATCH] Extend client README Signed-off-by: Georg Pfuetzenreuter --- nft_http_api_client/README.md | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/nft_http_api_client/README.md b/nft_http_api_client/README.md index 3040e3d..b02f52c 100644 --- a/nft_http_api_client/README.md +++ b/nft_http_api_client/README.md @@ -1 +1,14 @@ # 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') +```