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.1.tar.gz (5.6 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.1-py3-none-any.whl (7.0 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: chirpier-0.0.1.tar.gz
  • Upload date:
  • Size: 5.6 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.1.tar.gz
Algorithm Hash digest
SHA256 d412864395dc8d266d899d935cfdf0c0dfa54b46587160dd2a0426cea9f22497
MD5 3ba949ccd781f614c8c165989af79867
BLAKE2b-256 a673bcf66db9f889883f31ab8657d7a707e9dbb5407aad81f09135c496f1782c

See more details on using hashes here.

File details

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

File metadata

  • Download URL: chirpier-0.0.1-py3-none-any.whl
  • Upload date:
  • Size: 7.0 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.1-py3-none-any.whl
Algorithm Hash digest
SHA256 4218b73e6fe684d2553b11968b4509cdd13a36e2d576b1abe821cf2954c14e37
MD5 aedcf051da5854792d00ef06b9ce0c0e
BLAKE2b-256 66b6c442745e2b91320ebee5d0e23f0fa90ed1de2708aaeac4303a2cb1295c81

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