Skip to main content

CUBETIQ vLogs SDK for Python

Project description

vLogs SDK for Python

A simple way to collect logs and send to the server via simple SDK.

  • Collect the logs
  • Support local retries

Install via pip

pip install vlogs

Usages

from vlogs.sdk import VLogs, VLogsOptions
from vlogs.model import Collector, CollectorType, CollectorSource
import asyncio

appId = "72bd14c306a91fa8a590330e3898ddcc"
apiKey = "vlogs_gX9WwSdKatMNdpUClLU0IfCx575tvdoeQ"

# Create VLogs instance
sdk = VLogs.create(
    VLogsOptions.builder()
    .apiKey(apiKey)
    .appId(appId)
    .build()
)

async def main():
    response = await sdk.collect(
        Collector.builder()
        .type(CollectorType.Error)
        .source(CollectorSource.Other)
        .message("This is a test message")
        .build()
    )

    print("Response: ", response)

# Run the async function
asyncio.run(main())

Build, Install, and Test from Source

make

Build and Install from Source

make build install

Run test

make test

Publish

  • Set Token
poetry config pypi-token.pypi my-token
  • Publish
make publish

Contributors

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

vlogs-1.0.4.tar.gz (4.9 kB view hashes)

Uploaded Source

Built Distribution

vlogs-1.0.4-py3-none-any.whl (6.1 kB view hashes)

Uploaded Python 3

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