Python 3 library for the Exonet API.
- Code style guide: PEP 8.
- Docstring conventions: PEP 257 and reStructuredText.
Install using pip:
pip install exonetapi
Example to get the user details of the authorised user:
from exonetapi import Client
# Create a new Client.
client = Client('https://api.exonet.nl')
# Authorize with a personal access token.
client.authenticator.set_token('<YOUR_TOKEN>')
# Make an API call. Get details of the authorized user.
user_details = client.resource('me').get()
# Print user's name.
print('Autorized as: {name}'.format(
name=user_details.attribute('name')
))
See the /docs directory for complete documentation and additional code snippets.
The /examples directory contains ready to use scripts to help you get started. These examples can be executed with your personal access token. One of them gets a ticket with it's emails and prints the details:
$ python examples/ticket_details.py <YOUR-TOKEN>
This should make two API calls and print the ticket and email details for one of your tickets.
Run unit tests and coverage:
coverage run -m unittest discover tests -v && coverage html
Please see releases <https://github.com/exonet/exonet-api-python/releases> for more information on what has changed recently.
If you discover any security related issues please email [email protected] instead of using the issue tracker.
The MIT License (MIT). Please see [License File](LICENSE.md) for more information.