This library makes it easy to perform some of the most common BitSight tasks via the BitSight API, while accounting for common responses and pagination.
pip install bitsight
Set your BitSight API Token as an environment variable named BST_API_KEY. Otherwise, you will be prompted to enter your api token.
import bitsight
companies = bitsight.Companies()
search_results = companies.get_company_search('example.com')
guid = search_results[0]['guid']
subscriptions = bitsight.Subscriptions()
subscribe_result = subscriptions.post_subscribe(guid, bitsight.LicenseType.continuous_monitoring)
findings = companies.get_findings(guid)
company_details = companies.get_company_details(guid)
reports = bitsight.Reports()
report_successful = reports.post_download_company_report(guid, file_path='example_report.pdf')
company_requests = bitsight.CompanyRequests()
company_request_response = company_requests.post_request_company('example.com')
rua = bitsight.RapidUnderwriting()
fast_ratings_report = rua.post_request_rua(domain='example.com', company_name='Example', industry=bitsight.Industries.technology)
portfolio = bitsight.Portfolio()
portfolio_companies = portfolio.get_portfolio()
alerts = bitsight.Alerts()
latest_alerts = alerts.get_latest_alerts()
session_manager = bitsight.BitSight()
industries = session_manager.get(bitsight.Endpoints.V1.industries)