A requests authentication wrapper for the NFSN API
Python
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
LICENSE
nfsn.py
readme.md

readme.md

nfsn.py

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")