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.2.tar.gz (12.9 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.2-py3-none-any.whl (8.5 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: edgepulse-0.1.2.tar.gz
  • Upload date:
  • Size: 12.9 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.2.tar.gz
Algorithm Hash digest
SHA256 02dfed501574e640dd845054f28a5780bbb64b6b58172d5717decac8be0eb651
MD5 4e7604e682ca49160af8a09e77484193
BLAKE2b-256 a2e345cbe6f79e16e13a6094257cf9b2015eb8073adbf390ee2e79df57cace31

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: edgepulse-0.1.2-py3-none-any.whl
  • Upload date:
  • Size: 8.5 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.2-py3-none-any.whl
Algorithm Hash digest
SHA256 7f4cfa0a61935d963be270bfa8b9d8e91f33feeb7ff6fd07b65e88c1e678026d
MD5 f12f110e80c0a5fd7139ab6b3a242789
BLAKE2b-256 360a3ec8278bfca850281aa990cddfe276f2446bfb400716b29d77b23deace56

See more details on using hashes here.

Provenance

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