Skip to main content

Python SDK for logdash logging and metrics service

Project description

logdash - Python SDK

Logdash is a zero-config observability platform. This package serves as a Python interface to use it.

Pre-requisites

Setup your free project in less than 2 minutes at logdash.io

Installation

pip install logdash

Logging

from logdash import create_logdash

# Initialize with your API key
logdash = create_logdash({
    # optional, but recommended to see your logs in the dashboard
    "api_key": "<your-api-key>",
})

# Access the logger
logger = logdash.logger

logger.info("Application started successfully")
logger.error("An unexpected error occurred")
logger.warn("Low disk space warning")

Metrics

from logdash import create_logdash

# Initialize with your API key
logdash = create_logdash({
    # optional, but recommended as metrics are only hosted remotely
    "api_key": "<your-api-key>",
})

# Access metrics
metrics = logdash.metrics

# to set absolute value
metrics.set("users", 0)

# to modify existing metric
metrics.mutate("users", 1)

View

To see the logs or metrics, go to your project dashboard

logs delta

License

This project is licensed under the MIT License.

Contributing

Contributions are welcome! Feel free to open issues or submit pull requests.

Support

If you encounter any issues, please open an issue on GitHub or let us know at contact@logdash.io.

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

logdash-1.0.4.tar.gz (7.7 kB view details)

Uploaded Source

Built Distribution

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

logdash-1.0.4-py3-none-any.whl (10.2 kB view details)

Uploaded Python 3

File details

Details for the file logdash-1.0.4.tar.gz.

File metadata

  • Download URL: logdash-1.0.4.tar.gz
  • Upload date:
  • Size: 7.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for logdash-1.0.4.tar.gz
Algorithm Hash digest
SHA256 3bb5d691e7e5791b77a8243bc1050ce1b06f9ba1dbd7b0e98f4b6dd48a6738c8
MD5 f3a97e19c696b717a6eb93560a93cefa
BLAKE2b-256 1c8f93fb79d4fafed668d389a4b92a33178ee2ca3507a75f7b1d8a0b3f0185e6

See more details on using hashes here.

File details

Details for the file logdash-1.0.4-py3-none-any.whl.

File metadata

  • Download URL: logdash-1.0.4-py3-none-any.whl
  • Upload date:
  • Size: 10.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for logdash-1.0.4-py3-none-any.whl
Algorithm Hash digest
SHA256 889d26386c3e7063595e9a2f30ac490536f106367c19386ebeb839a1db5fa72e
MD5 3c68c0b30ef6e17e1ab1b9d2b35706be
BLAKE2b-256 1ea337b482c032ae6a92057f46fb23483d758d801cc87e3ab23c9532b2af976f

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