Skip to main content

Python client for QwhaleLogs API

Project description

QWhaleLogsClient

QWhaleLogs client lib for saving logs in remote service

Install

$> pip install qwhale-logs-client

Get token

Go to https://logs.qwhale.ml/provider/login After the login go to https://logs.qwhale.ml/api/token

Logging example

import logging
from qwhale_logs_client import QWhaleLogsHandler

logging.basicConfig(level=logging.DEBUG, format='%(asctime)s - %(name)s - %(levelname)s - %(message)s')
logger = logging.getLogger("SimpleOne")
logger.addHandler(QWhaleLogsHandler(token="<YOUR_TOKEN>", batch_site=1))  # Add our logs handler
# The batch site is determine how many logs to send in one request
# For fewer sizes more requests are made (default to 100)

logger.info("Some log") # Normal use
# Now your logs are sent to the QWhaleLogsService

Loguru example (Recommended)

from loguru import logger
from qwhale_logs_client import QWhaleLogsHandler

logger.add(QWhaleLogsHandler(token="<You'r-Token>", batch_site=1))
# The batch site is determine how many logs to send in one request
# For fewer sizes more requests are made (default to 100)

logger.info("Some log") # normal use
# Now your logs are sent to the QWhaleLogsService

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

qwhale_logs_client-0.1.2.tar.gz (2.5 kB view details)

Uploaded Source

Built Distribution

qwhale_logs_client-0.1.2-py3-none-any.whl (3.5 kB view details)

Uploaded Python 3

File details

Details for the file qwhale_logs_client-0.1.2.tar.gz.

File metadata

  • Download URL: qwhale_logs_client-0.1.2.tar.gz
  • Upload date:
  • Size: 2.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/3.10.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.59.0 CPython/3.9.2

File hashes

Hashes for qwhale_logs_client-0.1.2.tar.gz
Algorithm Hash digest
SHA256 5e15952d95db5d621e04db21db9ecbe0f2f9da6811cdc86c5e35fb5e7eaff1c4
MD5 d1f6bc8e0f30f5490ec8a88e65047a6d
BLAKE2b-256 a8e569d60d4c6a9adddce203e496e27d7a5528e9a6f9ad2f3256a4d144a929a5

See more details on using hashes here.

File details

Details for the file qwhale_logs_client-0.1.2-py3-none-any.whl.

File metadata

  • Download URL: qwhale_logs_client-0.1.2-py3-none-any.whl
  • Upload date:
  • Size: 3.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/3.10.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.59.0 CPython/3.9.2

File hashes

Hashes for qwhale_logs_client-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 dbefb1779b95ac1a3bda3cf812d81b8fd6fd5fccf933a1525af4e193b94d97d5
MD5 0f86304342eb6432ed2afcf615c17b6b
BLAKE2b-256 6bf80e2a326aeb4e1ec868c8b48655284d81a4470d1c9ca118b169cb2f4fdef4

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