Skip to main content

A Python SDK for interacting with the Chirpier API.

Project description

Chirpier SDK

Chirpier SDK is a Python SDK that simplifies event tracking and monitoring in your Python applications. It provides an easy-to-use API for sending, managing, and analyzing events, making it ideal for developers building data-driven applications.

Features

  • Event Management: Easily create and track events in your system.
  • Error Handling: Comprehensive error management for reliable tracking.
  • Lightweight: Minimal dependencies for faster integration.
  • Scalable: Designed for both small applications and enterprise-level workloads.

Installation

Install Chirpier SDK using pip:

pip install chirpier-py

Usage

Here’s a quick example of how to use Chirpier SDK:

from chirpier import Chirpier, Event

# Initialize the client
Chirpier.initialize(api_key="your-api-key")

# Monitor the event
try:
   Chirpier.monitor(Event(
      group_id="bfd9299d-817a-452f-bc53-6e154f2281fc",
      stream_name="My measurement",
      value=1
   ))
except (ConnectionError, HTTPError) as e:
   print(f"Failed to send event: {e}")

Components

Client

  • Initializes the connection with the event tracking service.
  • Provides methods for sending and managing events.

Event

  • Represents an event with properties like group_id, stream_name, and value.

Utils

  • Helper functions for advanced use cases.

Error Handling

  • Custom exceptions to handle and debug errors effectively.

Testing

Run the test suite to ensure everything works as expected:

pytest tests/

Contributing

We welcome contributions! To contribute:

  1. Fork this repository.
  2. Create a new branch for your feature or bug fix.
  3. Submit a pull request with a clear explanation of your changes.

License

This project is licensed under the MIT License. See the LICENSE file for details.

Support

If you have any questions or need support, please open an issue on the GitHub repository or contact us at contact@chirpier.co.

API Reference

Client

Chirpier.initialize(api_key="your-api-key")

Parameters

  • your-api-key (str): Your Chirpier API key

Event

event = Event(
    group_id="bfd9299d-817a-452f-bc53-6e154f2281fc",
    stream_name="My measurement",
    value=1
)

Parameters

  • group_id (str): UUID of the monitoring group
  • stream_name (str): Name of the measurement stream
  • value (float): Numeric value to record

Monitor

Chirpier.monitor(event)

Start tracking your events seamlessly with Chirpier SDK!

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

chirpier-0.0.3.tar.gz (5.9 kB view details)

Uploaded Source

Built Distribution

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

chirpier-0.0.3-py3-none-any.whl (7.2 kB view details)

Uploaded Python 3

File details

Details for the file chirpier-0.0.3.tar.gz.

File metadata

  • Download URL: chirpier-0.0.3.tar.gz
  • Upload date:
  • Size: 5.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.5 CPython/3.11.3 Darwin/24.1.0

File hashes

Hashes for chirpier-0.0.3.tar.gz
Algorithm Hash digest
SHA256 f06573707f1c5d27b1a40a05cbaac76c496ecb7bb3fb42b54179a917e0f09022
MD5 e7a6a3daaf37bd12979765235e7424d0
BLAKE2b-256 3644d3b36142d150f9b56ec0a1936cbdf174f754bb9622356ab9d88e4e5134cf

See more details on using hashes here.

File details

Details for the file chirpier-0.0.3-py3-none-any.whl.

File metadata

  • Download URL: chirpier-0.0.3-py3-none-any.whl
  • Upload date:
  • Size: 7.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.5 CPython/3.11.3 Darwin/24.1.0

File hashes

Hashes for chirpier-0.0.3-py3-none-any.whl
Algorithm Hash digest
SHA256 da3e8fb40ecd03b0d397c103d997105a625d50990fd69c663af8c42f20281524
MD5 3737d2662ea25ef2f0a1b740ac6edf85
BLAKE2b-256 dfd0c4a8493222715c848d3b354024c22b10598601a8407c72daeeda368598be

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