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.

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.4.tar.gz (7.1 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.4-py3-none-any.whl (7.5 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: chirpier-0.0.4.tar.gz
  • Upload date:
  • Size: 7.1 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.4.tar.gz
Algorithm Hash digest
SHA256 a7d59ad5d6c085b42bd10385620393d6c548ed13edc13d041748527c6fc390f1
MD5 672337f6347b7b944b2391f69991ab76
BLAKE2b-256 184feba8e92a123d5ac89664dc6d752dd5b22f60f80f6438cf13f62d90e6741c

See more details on using hashes here.

File details

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

File metadata

  • Download URL: chirpier-0.0.4-py3-none-any.whl
  • Upload date:
  • Size: 7.5 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.4-py3-none-any.whl
Algorithm Hash digest
SHA256 8e886a7155aabb773afa1faafebe62147f75f07b9c1247ee04fe7856f944f7ef
MD5 60388dad34e5dca16ac169fb48212f36
BLAKE2b-256 3b087bbdbbe57d9750b829146bfbfd3629a9d942ba78c35330cc1f083aa9e753

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