Library to interact with the Exonet API.
Project description
exonetapi
Python 3 library for the Exonet API.
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.
Change log
Please see releases for more information on what has changed recently.
Contributing
When contributing to this repository, please first discuss the change you wish to make via issue, email, or any other method with the owners of this repository before making a change.
Please note we have a code of conduct, please follow it in all your interactions with the project.
Issues and feature requests
You've found a bug in the source code, a mistake in the documentation or maybe you'd like a new feature? You can help us by submitting an issue to our GitHub Repository. Before you create an issue, make sure you search the archive, maybe your question was already answered.
Even better: You could submit a pull request with a fix / new feature!
Pull request process
-
Search our repository for open or closed pull requests that relates to your submission. You don't want to duplicate effort.
-
You may merge the pull request in once you have the sign-off of two other developers, or if you do not have permission to do that, you may request the second reviewer to merge it for you.
Setting up development environment
This Python project is fully managed using the Poetry dependency manager.
You need at least:
- Python 3.8+
- Poetry
Install all packages, including all development requirements:
poetry install
Poetry creates by default an virtual environment where it installs all necessary pip packages, to enter or exit the venv run the following commands:
poetry shell
exit
Now you're all set to get started!
To run the Python tests:
poetry run pytest
To run the bandit checks:
poetry run bandit
Security
If you discover any security related issues please email development@exonet.nl instead of using the issue tracker.
Credits
License
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
File details
Details for the file exonetapi-4.0.0.tar.gz
.
File metadata
- Download URL: exonetapi-4.0.0.tar.gz
- Upload date:
- Size: 12.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 29e9ffef45b4bd905a44c4fdbf1a146a2a656947bed18cd717555500401c9c5b |
|
MD5 | d90d1e6a3fcdcf1bb3a76b17d14990ce |
|
BLAKE2b-256 | 8508b7d737089effcbe3a169ab8f394dff8a7c627a5a4fd47ef82475c08c6083 |
File details
Details for the file exonetapi-4.0.0-py3-none-any.whl
.
File metadata
- Download URL: exonetapi-4.0.0-py3-none-any.whl
- Upload date:
- Size: 15.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | be2a807776fa56e86a2f541e394508c48c2d30ceb91dfca78e2f583050723cd6 |
|
MD5 | 9afe368191a57dbc7814433005ecd701 |
|
BLAKE2b-256 | 065d05dc6623895ee960207877b7a2dd71550e712d08a823f3bf1b77abf0f511 |