nfsn.py is an ultra simple NFSN API helper built on requests. nfsn.py is
a requests custom authentication helper that implements the
NFSN request signing protocol. Using it is really simple, just
put nfsn.py
in the same directory as your other python files.
Here's a small example:
import requests
from nfsn import NFSNAuth
# You can set the details globally
NFSNAuth.login = "your NFSN login"
NFSNAuth.api_key = "your NFSN api key"
session = requests.session(auth=NFSNAuth())
# or you can supply the details as constructor arguments
session = requests.session(auth=NFSNAuth("your NFSN login", "your NFSN api key"))
# Then just use requests as normal
session.post("https://api.nearlyfreespeech.net/dns/example.com/listRRs")