Skip to main content

Basic library to interract with Kyodo

Project description

py.kyodo

PyPi Version Python Version Issues GitHub pull requests

Basic library to talk with Kyodo servers.

Important notices

This lib is only demonstration and contain basic things. Please consider to take it as research object that can be improved. Thanks in advance.

Basic example

import logging
from asyncio import run
from datetime import datetime
from kyodo import Client, Socket
from kyodo.utils.objects import Message

async def process_message(client: Client, message: Message) -> None:
	# do smth with messages, idk
    
async def main():
    logging.basicConfig(
        level=logging.INFO,
        filename="logs/{}.log".format(datetime.now().strftime("%Y-%m-%d %H:%M:%S")),
        format="[%(asctime)s / %(levelname)s] %(name)s -> %(message)s",
    )
    logging.info("Configuration loaded...")
    client = Client()
    await client.login(email, password)
    logging.info("Client logged in...")
    socket = Socket(client, process_message)
    logging.info("Socket initialized, starting listening...")
    print("Starting now!")
    await socket.listen_forever()
    
try:
    run(main())
except KeyboardInterrupt:
    logging.info("KeyboardInterrupt received, exiting...")
    print("Exiting...")
    exit(0)

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

py_kyodo-1.0.0.tar.gz (9.7 kB view details)

Uploaded Source

Built Distribution

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

py_kyodo-1.0.0-py3-none-any.whl (10.9 kB view details)

Uploaded Python 3

File details

Details for the file py_kyodo-1.0.0.tar.gz.

File metadata

  • Download URL: py_kyodo-1.0.0.tar.gz
  • Upload date:
  • Size: 9.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.9

File hashes

Hashes for py_kyodo-1.0.0.tar.gz
Algorithm Hash digest
SHA256 e19e4f649ad65193a7cf289e83520fb867ddcc637d48af5496c7bbdddc719dac
MD5 be7964634d0b98cc940b371509f70d84
BLAKE2b-256 832cc30af4a8bad793bffce30263d39926a48b6a2e7d7f2c36de3fb32b3c1c33

See more details on using hashes here.

File details

Details for the file py_kyodo-1.0.0-py3-none-any.whl.

File metadata

  • Download URL: py_kyodo-1.0.0-py3-none-any.whl
  • Upload date:
  • Size: 10.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.9

File hashes

Hashes for py_kyodo-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 ff6b993c0573f031678e12ec8396ce107841332588b64cb38455c34ca508f3fc
MD5 771064e2f2013baf36f76a507c927592
BLAKE2b-256 1b1bab699658f5bd76ed253b97ed6b71585bf0559ce31ecfcad6625b744e56f7

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