Python wrapper for https://www.cyrating.com.
Project description
python-cyrating
A python wrapper for Cyrating https://www.cyrating.com.
Installation
pip install cyrating
Then in your application root directory use the following command to set up your configuration including your Cyrating token which is provided in your user interface:
echo -e "[cyrating]\ntoken: cyratingtoken" > cyrating.ini
Usage example
>>> import cyrating
>>> cr = cyrating.init()
Method | Description |
---|---|
get_main_company | returns main company |
get_entities | returns list of entities |
get_suppliers | returns list of suppliers |
domains | return list of domains for a company |
set_tags | set tags to a specified domain |
get_assets | get assets for a company |
get_events | get list of active reputation events |
get_certificate | returns certificate of a specific company |
Examples
Returns main company
>>> cr.main_company()
[...]
Returns list of entities
>>> cr.entities()
[...]
Returns list of suppliers
>>> cr.suppliers()
[...]
Returns domains of a company
>>> cr.domains(main_company)
[...]
Tag a domain
>>> cr.set_tags('example.com', ['tag1', 'tag2'])
[...]
Get assets
The method get_assets returns a dictionnary of assets with tags and type attributes.
>>> cr.get_assets(cr.domains(main_company))
[...]
Get the list of active reputation events
The method get_events returns a list of active reputation events. assets parameter is optional and is needed to provide tags association.
>>> main_company = cr.main_company()
>>> cr.get_events(main_company, assets=cr.get_assets(main_company))
[...]
Returns certificate of a specific company
>>> main_company = cr.get_main_company()
>>> cr.get_certificate(main_company)
Save certificate of a specific company to a file
>>> main_company = cr.get_main_company()
>>> cr.get_certificate(main_company, filename='Cyrating - Certificate of {}.pdf'.format(main_company['name']))
Meta
Cyrating – @cyrating – hello@cyrating.com
Distributed under the ISCL license. See LICENSE
for more information.
Contributing
- Send issues to issues@cyrating.com
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for cyrating-0.0.6-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1c5191b8c6875e5e941173580ef4e1f2e9d6e711e92824d91fd60007c884a615 |
|
MD5 | 2ce608a3f21c4cc756aea656fbfe5c85 |
|
BLAKE2b-256 | 0c045e11ecddc28d57f91ee3734f7e10eb1f30115b98b3c604fd95f17eaabd76 |