peeringdb¶
PeeringDB module.
- exception spicerack.peeringdb.CacheMiss[source]¶
Bases:
spicerack.exceptions.SpicerackError
Custom exception class for cache management.
- exception spicerack.peeringdb.PeeringDBError[source]¶
Bases:
spicerack.exceptions.SpicerackError
Custom exception class for errors of the PeeringDB class.
- class spicerack.peeringdb.PeeringDB(*, ttl: int = 86400, cachedir: Optional[pathlib.Path] = None, proxies: Optional[MutableMapping[str, str]] = None, token: Optional[str] = None)[source]¶
Bases:
object
Basic dumb wrapper over the PeeringDB API.
Implements the beta/v0 PeeringDB API. Tries to be smart by a) keeping a persistent keep-alived session for multiple requests and b) operating a local filesystem cache, if so desired.
Initiliaze the module.
- Parameters
- Returns
a path like string encoding all the arguments
- Return type