Skip to main content

Module to communicate to the Youfone API

Project description

aioyoufone

Asynchronous library to communicate with the Youfone API

maintainer buyme_coffee discord

MIT License

GitHub issues Average time to resolve an issue Percentage of issues still open PRs Welcome

Python

github release github release date github last-commit github contributors github commit activity

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",
        "nl",
        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())

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

aioyoufone-0.3.0.tar.gz (7.0 kB view details)

Uploaded Source

Built Distribution

aioyoufone-0.3.0-py3-none-any.whl (7.0 kB view details)

Uploaded Python 3

File details

Details for the file aioyoufone-0.3.0.tar.gz.

File metadata

  • Download URL: aioyoufone-0.3.0.tar.gz
  • Upload date:
  • Size: 7.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.0.0 CPython/3.10.13

File hashes

Hashes for aioyoufone-0.3.0.tar.gz
Algorithm Hash digest
SHA256 5c8e73ea52ec26d9a6d96c000db30d57d47c706da5a0f200e6b4579c414aa5f1
MD5 4b69729a82de6922f78f82aafff80d29
BLAKE2b-256 0f62ab1e3a0b904e802f2b216d65731f9cb8a274595ea753dae3cae45933c969

See more details on using hashes here.

File details

Details for the file aioyoufone-0.3.0-py3-none-any.whl.

File metadata

  • Download URL: aioyoufone-0.3.0-py3-none-any.whl
  • Upload date:
  • Size: 7.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.0.0 CPython/3.10.13

File hashes

Hashes for aioyoufone-0.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 7d1865ca5c529870414a50a68232e9d6e4763cc2db5165fe387474fd4addaafa
MD5 cc454cff63737560f489bff98fa998e3
BLAKE2b-256 2d09a63bff649ccbb738809ce84174934634b6badc06edc598af133e7d9e738e

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