Skip to main content

EdgePulse Python SDK for edge functions monitoring and observability

Project description

EdgePulse Python SDK

PyPI version Python Support License: MIT

The EdgePulse Python SDK provides monitoring and observability capabilities for Python applications. It allows you to track function executions, capture timing data, handle errors, and send telemetry to EdgePulse services.

Installation

Install the EdgePulse SDK using pip:

pip install edgepulse

Quick Start

  1. Set up your environment:

    export EDGEPULSE_PROJECT_KEY="your-api-key-here"
    export EDGEPULSE_API_URL="https://api.edgepulse.com/api/Invocation"  # Optional
    
  2. Use the decorator to monitor functions:

    from Edgepulse import with_edgepulse
    
    @with_edgepulse
    def my_function(x, y):
        """Your function logic here."""
        return x + y
    
    # The function will now be monitored automatically
    result = my_function(1, 2)
    

Features

  • Zero-configuration monitoring: Simple decorator-based approach
  • Automatic timing: Captures function execution duration
  • Error tracking: Records exceptions with full stack traces
  • Flexible telemetry: Sends data to configurable EdgePulse endpoints
  • Type safety: Full type hints for better development experience
  • No external dependencies: Uses only Python standard library

Configuration

The SDK uses environment variables for configuration:

  • EDGEPULSE_PROJECT_KEY (required): Your EdgePulse API key
  • EDGEPULSE_API_URL (optional): EdgePulse API endpoint (defaults to localhost for development)

Advanced Usage

Manual invocation tracking

from Edgepulse import EdgePulseInvocation, store_invocation

# Create a custom invocation
invocation = EdgePulseInvocation.create(
    function_name="my_function",
    invoked_at="2026-01-02T10:30:00Z",
    status_code=200,
    duration_ms=150
)

# Store it
store_invocation(invocation)

Custom HTTP client

from Edgepulse import WebClient, store_invocation

# Use a custom client with different timeout
client = WebClient("https://api.edgepulse.com/api/Invocation", timeout=30)
store_invocation(invocation, client=client)

Development

Setting up development environment

git clone https://github.com/edgepulse/sdk-python.git
cd sdk-python
pip install -e ".[dev]"

Requirements

  • Python 3.9+

License

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

Support

Contributing

We welcome contributions!

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

edgepulse-0.1.1.tar.gz (12.8 kB view details)

Uploaded Source

Built Distribution

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

edgepulse-0.1.1-py3-none-any.whl (8.4 kB view details)

Uploaded Python 3

File details

Details for the file edgepulse-0.1.1.tar.gz.

File metadata

  • Download URL: edgepulse-0.1.1.tar.gz
  • Upload date:
  • Size: 12.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for edgepulse-0.1.1.tar.gz
Algorithm Hash digest
SHA256 6af8e1615fd6787ed1292e743dfab116a78122f13628520865ab408f389d1031
MD5 3b870e2f6b3bef1ce2428e6b645671f4
BLAKE2b-256 4367de3582777fe323be4664ffd3147cb47799d9e1bd55d8ceaac7609643bac9

See more details on using hashes here.

Provenance

The following attestation bundles were made for edgepulse-0.1.1.tar.gz:

Publisher: publish-python-sdk.yml on jeremytrips/Edgepulse.py

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file edgepulse-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: edgepulse-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 8.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for edgepulse-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 07515568079bb24798d194d17d938bb449182257aa7ed8c00dd6631b54e680cf
MD5 ae22aff9b1faee344c198488cd794206
BLAKE2b-256 be06b31c757451bc0c09705d455e1786f08b4a7a911edf4cb5726b8f5e0aa49b

See more details on using hashes here.

Provenance

The following attestation bundles were made for edgepulse-0.1.1-py3-none-any.whl:

Publisher: publish-python-sdk.yml on jeremytrips/Edgepulse.py

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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