aioyoufone
Asynchronous library to communicate with the Youfone API
API Example
"""Test for aioyoufone."""
from aioyoufone import YoufoneClient
import json
import asyncio
import logging
# Setup logging
logger = logging.getLogger(__name__)
async def main():
client = YoufoneClient(
"user@email.com",
"YourPassword",
None,
True
)
try:
customer_data = await client.fetch_data()
if isinstance(customer_data, dict) and 'error' in customer_data:
logging.error("Error occurred while retrieving customer data: %s", customer_data['error'])
else:
logging.info("Customer data retrieved successfully: %s", json.dumps(customer_data, indent=4, sort_keys=True))
except Exception as e:
logging.error("Error occurred while retrieving customer data: %s", str(e))
finally:
await client.close_session()
logging.basicConfig(level=logging.INFO)
asyncio.run(main())
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
aioyoufone-0.4.3.tar.gz
(6.8 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file aioyoufone-0.4.3.tar.gz.
File metadata
- Download URL: aioyoufone-0.4.3.tar.gz
- Upload date:
- Size: 6.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via:
twine/5.1.1 CPython/3.10.15
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
caf3b26ee369afa586ae4d59ba10587ae42d57b3ea48e0c26b186f6a80a7ce8b
|
|
| MD5 |
6e218e1a5e505b093053709513deea77
|
|
| BLAKE2b-256 |
1fa88d1589c3c72ef1211ab66e9d11f010cf56c930822c57ff1f7cc11f32e93f
|
File details
Details for the file aioyoufone-0.4.3-py3-none-any.whl.
File metadata
- Download URL: aioyoufone-0.4.3-py3-none-any.whl
- Upload date:
- Size: 6.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via:
twine/5.1.1 CPython/3.10.15
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8e1e400fd875b1fde1adbec53371a49e9c8dd99906eac9764ea0938463aa0dd3
|
|
| MD5 |
119c67b126a3ffdde06b67f11dcbaa59
|
|
| BLAKE2b-256 |
9e48141e8ea3acea3788a90f27a7c48e4657758b154a43bac44d7e8b9bf191d0
|