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.4.tar.gz (2.6 kB view details)

Uploaded Source

Built Distribution

qwhale_logs_client-0.1.4-py3-none-any.whl (3.6 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: qwhale_logs_client-0.1.4.tar.gz
  • Upload date:
  • Size: 2.6 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.4.tar.gz
Algorithm Hash digest
SHA256 981387edf373329744e63339d51fadefb9a5fcac36d39f62be11fa4c8fb61256
MD5 42dd21c1fec81b7337149f6cd84543ad
BLAKE2b-256 06377aae5474b685c2a8e3cb2c401105d010bbb37a23b7bb64d71fb54a7cf930

See more details on using hashes here.

File details

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

File metadata

  • Download URL: qwhale_logs_client-0.1.4-py3-none-any.whl
  • Upload date:
  • Size: 3.6 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.4-py3-none-any.whl
Algorithm Hash digest
SHA256 cbe0d57ac9e7e050f49b2edd5a271598530060bd47686140576fa77a71e4fb20
MD5 86bad7979756d64530f5833b153d2b45
BLAKE2b-256 98214c1a4c0a246752c18e763bcafa09b5bb848f385efca3ce0f94f8ec074bc6

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