CORE
NIST NVD API
- class CveXplore.core.nvd_nist.nvd_nist_api.NvdNistApi(baseurl='https://services.nvd.nist.gov', api_path='2.0', proxies=None, user_agent='CveXplore')[source]
Bases:
ApiBaseClass
,UpdateBaseClass
- CveXplore.core.nvd_nist.nvd_nist_api.retry_policy(info)[source]
It will always retry until succeeded
If fails for the first time, it will retry immediately,
If it fails again,
aioretry will perform a 100ms delay before the second retry, 200ms delay before the 3rd retry, the 4th retry immediately, 100ms delay before the 5th retry, etc… :rtype:
Tuple
[bool
,Union
[int
,float
]]
API Base class
- class CveXplore.core.api_base_class.ApiBaseClass(baseurl, api_path=None, proxies=None, user_agent='ApiBaseClass', **kwargs)[source]
Bases:
object
The GenericApi class serves as a base class for all API’s used within CveXplore
- __init__(baseurl, api_path=None, proxies=None, user_agent='ApiBaseClass', **kwargs)[source]
The Generic api caller handles all communication towards an api resource.
- call(method=None, resource=None, data=None, timeout=60, return_response_object=False)[source]
Method for requesting free format api resources
- Return type:
dict
- get_session(retries=1, backoff_factor=0.3, status_forcelist=(429, 500, 502, 503, 504), session=None)[source]
Method for returning a session object per every requesting thread
- Return type:
Session
- property headers: dict
Property to return the current headers