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.2.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.2-py3-none-any.whl (7.2 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: chirpier-0.0.2.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.2.tar.gz
Algorithm Hash digest
SHA256 c8c51c0f3a8984801db8065c1375e8c01db4c3de981aa820ba364586ab0e43cb
MD5 5dad872aee03c9927da29c26f21b8ed0
BLAKE2b-256 1a971ccbf9ece36f2bdba4c0dba1d3577052413ef52bd0e043b6b461fe851e4c

See more details on using hashes here.

File details

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

File metadata

  • Download URL: chirpier-0.0.2-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.2-py3-none-any.whl
Algorithm Hash digest
SHA256 5e62a31b06f416ea5ce3f37b7835fba04b37306bfea6577e570fa6bdb16be4ea
MD5 b864cac2c5cb9b4b5dd48787c3cb7e5f
BLAKE2b-256 06948817eb24c84ade669cf6a6d692bd690b1d86b33156723e4aa171f12e3867

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