Skip to main content

a package for sending app telemetry data to the TelemetrX backend. Compatible with TelemetrX Fast API v0.3.0 with SSL bypass support for corporate environments.

Project description

telemetrx-0.2.1

telemetrx is a Python library which facilitates the sending of App telemetry data to the TelemetrX platform, leveraging the TelemetrX API.

🆕 Version 0.2.1 - Fast API v0.3.0 Compatibility + SSL Bypass

  • Updated API endpoint structure (/v1/send)
  • New governance fields: usage_type, app_action, srid
  • Enhanced technology stripe validation
  • Improved error handling and response parsing
  • Async function support with send_telemetrx_async
  • 🔒 SSL bypass support for corporate environments (verify_ssl=False)

Features

The library features the function send_telemetrx() which helps app owners to send telemetry data to the TelemetrX platform with a single line of code.

Installation

Install telemetrx with pip:

pip install telemetrx

Quick Start

Before you start, there are few environment variables that will need to be set:

After you make sure that the environment variables above are set, here is an example of how to use the telemetrx library:

from telemetrx import send_telemetrx

# Basic usage
telemetry_data = {"search_query": "network troubleshooting",
                  "result_count": 25}

send_telemetrx(
    user="your_cec_id",
    app_name="My app",
    telemetry_data=telemetry_data,
    telemetrx_env="prod",
    technology_stripe="Enterprise Networking",
    app_action="search_performed",
    usage_type="Active",  # "Active" for user clicks, "Passive" for auto-loads
    srid="SR123456789"  # Optional Service Request ID
)

New Features in v0.2.0

Enhanced Governance Fields:

  • usage_type: "Active" (intentional user action) or "Passive" (automatic/background)
  • app_action: Specific action performed (e.g., "search", "login", "export")
  • srid: Service Request ID for tracking

Updated Technology Stripes: Now supports: "Data Center", "Collaboration", "Security", "Service Provider", "Enterprise Networking", "Other", "SaaS", "Technology Agnostic"

Async Support:

import asyncio
from telemetrx import send_telemetrx_async

async def send_data():
    result = await send_telemetrx_async(
        telemetrx_env="stage",
        telemetrx_data={"data": {"app_name": "your_app", "cec": "your_cec_id"}},
        app_token="your_app_token",
        telemetrx_base_url="https://your-telemetrx-api-url.com"
    )
    return result

# Run async
result = asyncio.run(send_data())

Corporate Environment Support

🔒 SSL Bypass for Corporate Networks

Version 0.2.1 introduces SSL bypass support for corporate environments where self-signed certificates may cause connection issues.

Usage

from telemetrx import send_telemetrx

# For corporate environments with SSL certificate issues
result = send_telemetrx(
    user="your_cec_id",
    app_name="your_app_name",
    telemetry_data={"action": "user_login", "timestamp": "2024-01-01T12:00:00Z"},
    technology_stripe="Technology Agnostic",
    app_action="login",
    usage_type="Active",
    verify_ssl=False,  # Disable SSL verification for corporate environments
    app_token="your_app_token",
    telemetrx_base_url="https://your-telemetrx-api-url.com",
    telemetrx_env="stage"
)

Async Usage with SSL Bypass

import asyncio
from telemetrx import send_telemetrx_async

async def send_data():
    payload = {
        "data": {
            "app_name": "your_app_name",
            "cec": "your_cec_id",
            "technology_stripe": "Technology Agnostic",
            "custom": {"action": "user_action"},
            "app_action": "test_action",
            "usage_type": "Active"
        }
    }
    
    result = await send_telemetrx_async(
        telemetrx_env="stage",
        telemetrx_data=payload,
        app_token="your_app_token",
        telemetrx_base_url="https://your-telemetrx-api-url.com",
        verify_ssl=False  # Disable SSL verification
    )
    return result

result = asyncio.run(send_data())

⚠️ Security Note: Only use verify_ssl=False in trusted corporate environments. This disables SSL certificate verification and should not be used in production environments with untrusted networks.

Requirements

  • Python 3.10+

License

Distributed under a propriatery license. See LICENSE file for more information.

Authors

  • Vivek Singh - vivekksi
  • Vincent Simard - visimard
  • Angeliki Papathanasiou - anpapath

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

telemetrx-0.2.1.tar.gz (10.5 kB view details)

Uploaded Source

Built Distribution

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

telemetrx-0.2.1-py3-none-any.whl (7.0 kB view details)

Uploaded Python 3

File details

Details for the file telemetrx-0.2.1.tar.gz.

File metadata

  • Download URL: telemetrx-0.2.1.tar.gz
  • Upload date:
  • Size: 10.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.11.6

File hashes

Hashes for telemetrx-0.2.1.tar.gz
Algorithm Hash digest
SHA256 5f0abc9eda46b0e6bd18493b728911f9a780c085812a9973eaa92adc17e90020
MD5 1aac8f697c65cd9cc37ae10fc6ca3f3b
BLAKE2b-256 fcbd8f58fe8f6802e3f12f3c476361e29f00f701199e46c108fae3af6d67161c

See more details on using hashes here.

File details

Details for the file telemetrx-0.2.1-py3-none-any.whl.

File metadata

  • Download URL: telemetrx-0.2.1-py3-none-any.whl
  • Upload date:
  • Size: 7.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.11.6

File hashes

Hashes for telemetrx-0.2.1-py3-none-any.whl
Algorithm Hash digest
SHA256 8eac14ce672480cde3f35cd08483a8c622a9f538daef90533112e7fa18be361f
MD5 4dab90629b9287ec3bd0cd78785023d1
BLAKE2b-256 314843be06c4b9de837bc06fd73dea6c633a155be4f02040aeea12b4a2a7a206

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