Skip to main content

Library to interact with the Exonet API.

Project description

Python 3 library for the Exonet API.

https://img.shields.io/pypi/v/exonetapi.svg?style=flat-square https://img.shields.io/pypi/pyversions/exonetapi.svg?style=flat-square https://img.shields.io/lgtm/grade/python/g/exonet/exonet-api-python.svg https://img.shields.io/pypi/l/exonetapi.svg?style=flat-square

Conventions

  • Code style guide: PEP 8.

  • Docstring conventions: PEP 257 and reStructuredText.

Install

Install using pip:

pip install exonetapi

Usage

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.

Examples

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.

Testing

Run unit tests and coverage:

coverage run -m unittest discover tests -v && coverage html

Change log

Please see releases <https://github.com/exonet/exonet-api-python/releases> for more information on what has changed recently.

Security

If you discover any security related issues please email support@exonet.nl instead of using the issue tracker.

Credits

License

The MIT License (MIT). Please see [License File](LICENSE.md) for more information.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

exonetapi-3.0.3.tar.gz (14.2 kB view details)

Uploaded Source

File details

Details for the file exonetapi-3.0.3.tar.gz.

File metadata

  • Download URL: exonetapi-3.0.3.tar.gz
  • Upload date:
  • Size: 14.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.26.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.50.0 CPython/3.7.7

File hashes

Hashes for exonetapi-3.0.3.tar.gz
Algorithm Hash digest
SHA256 43f6cb674fd9acaff10691d21c654feea59a2336f7b568e9c1d1ae0bf5783ee1
MD5 98f8444a4e8ba2c13d71d7acd3a0c001
BLAKE2b-256 453e6a3d8c8d2754fd46089865e299fa6c17c01dc7296451f53aa7cf1e8549ce

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page