Skip to main content

SDK Python pour interagir avec l'API Whaller

Project description

Whaller Client SDK

📌 Introduction

This project is a Python SDK for interacting with the Whaller API.

This library is in the early stages of implementation and contains only a few endpoints, but you can easily extend it by following the do. We encourage you to work with the Whaller teams on extending it.

📦 Installation

1️⃣ Clone the repository

git clone https://github.com/whallerfr/client-python.git
cd client-python

2️⃣ Install the package in development mode

pip install -e .

This allows modifications and immediate testing of changes.

3️⃣ Install dependencies

pip install -r requirements.txt

🚀 Try the examples

1️⃣ Set environment variables

Before running examples scripts, you must create a env.py file with the following content as indicated in the env.orig.py file at the root of the examples folder:

BASE_URL = "https://my.whaller.com"
CLIENT_ID = "your_client_id"
CLIENT_TOKEN = "your_client_token"
LOGIN = "your_email"
PASSWORD = "your_password"

[!IMPORTANT] If you do not have client_id and client_token, please contact contact@whaller.com. Please note that there is a charge for obtaining these credentials.

2️⃣ Run an authentication example

An authentication example script is available in examples/. To run it:

cd examples/
python example_auth.py

If authentication is successful, you will see:

Authentication successful.

3️⃣ Use the SDK in your project

Minimal usage example:

from whaller_client.client import Client
from whaller_client.endpoints.persons import Persons

# Initialize the client
client = Client(BASE_URL, CLIENT_ID, CLIENT_TOKEN)
client.set_credentials(LOGIN, PASSWORD)
client.authenticate()

# Example usage of endpoints
persons = Persons(client)
print(persons.get_notifications(LOGIN))

📄 License

This project is licensed under the MIT License. See the LICENSE file for more details.

📫 Support

For any questions or suggestions, open an issue on GitHub.

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

whaller_client-0.1.0.tar.gz (6.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

whaller_client-0.1.0-py3-none-any.whl (6.5 kB view details)

Uploaded Python 3

File details

Details for the file whaller_client-0.1.0.tar.gz.

File metadata

  • Download URL: whaller_client-0.1.0.tar.gz
  • Upload date:
  • Size: 6.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.11.8

File hashes

Hashes for whaller_client-0.1.0.tar.gz
Algorithm Hash digest
SHA256 c5f8b83bcc6d1abf65ac0dfd66da5c19fe70cacc391f28c235bb207dbb9991d3
MD5 b270bcfa9343adbf00ba151752d43b07
BLAKE2b-256 46a084d3271204d52b73c52ce07d01cebf9be10884476344dcceb484e7133029

See more details on using hashes here.

File details

Details for the file whaller_client-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: whaller_client-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 6.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.11.8

File hashes

Hashes for whaller_client-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 3f50d0b090a032ff83281e68f2e0957dfd9e6fbbf0050030132d02e40196b52e
MD5 76ff32bddfa75f226373a1393e91bb78
BLAKE2b-256 5aae8a8320fdf511faf0773237859bd63bcf2d18d9779dd933302453d590fbda

See more details on using hashes here.

Supported by

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