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-sdk

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.0.tar.gz (12.3 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.0-py3-none-any.whl (8.3 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: edgepulse-0.1.0.tar.gz
  • Upload date:
  • Size: 12.3 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.0.tar.gz
Algorithm Hash digest
SHA256 cc785a6d4137086eefa37b6382112f65ca514a20bfef9884d24c6de5bbdd64f7
MD5 0ea6f399f04d295d0d881125ab3273c4
BLAKE2b-256 2e429b3b899e9787ea06aff6e476dac125079147334a5e807b5dfc3f972755d9

See more details on using hashes here.

Provenance

The following attestation bundles were made for edgepulse-0.1.0.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.0-py3-none-any.whl.

File metadata

  • Download URL: edgepulse-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 8.3 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.0-py3-none-any.whl
Algorithm Hash digest
SHA256 c3503c5e9b5f1baebb48900422c46aa7858c946e990cba6403e2c6cb54aced49
MD5 93f3d968b72121dd7c1b9aad5688089e
BLAKE2b-256 f74caa6d320e3983c4ca4670985a2afbf0574e13b435cbfdaf33cb06e1eb02e9

See more details on using hashes here.

Provenance

The following attestation bundles were made for edgepulse-0.1.0-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