Skip to main content

Official Python SDK for LogNexis API Monitoring & Observability

Project description

LogNexis Python SDK

The official Python tracking SDK for LogNexis — the lightweight, real-time API monitoring, analytics, and observability platform.

Website: https://lognexis.online
Documentation: https://lognexis.online/docs

What it does

Automatically capture API request logs, HTTP errors, latency metrics, and real-world performance without blocking your application threads. Includes drop-in middlewares for FastAPI and Flask!

Installation

pip install lognexis-py

Quick Start (FastAPI)

from fastapi import FastAPI
from lognexis import LogNexisFastAPI

app = FastAPI()

# Add the LogNexis middleware
app.add_middleware(LogNexisFastAPI, api_key="YOUR_LOGNEXIS_API_KEY")

@app.get("/")
def read_root():
    return {"Hello": "World"}

Quick Start (Flask)

from flask import Flask
from lognexis import LogNexisFlask

app = Flask(__name__)

# Add the LogNexis tracking hook
LogNexisFlask(app, api_key="YOUR_LOGNEXIS_API_KEY")

@app.route("/")
def hello():
    return "Hello World!"

Manual Usage

If you aren't using FastAPI/Flask or want to log background jobs:

from lognexis.client import LogNexisClient

client = LogNexisClient("YOUR_LOGNEXIS_API_KEY")

client.capture({
    "endpoint": "/custom-cron-job",
    "method": "POST",
    "statusCode": 200,
    "latency": 45.2
})

How it works

This SDK uses python's built-in threading and the lightweight requests library. It operates in a completely "fire-and-forget" background thread, meaning your application will NEVER crash and your API response times will NEVER be slowed down by this 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

lognexis_py-1.0.2.tar.gz (3.4 kB view details)

Uploaded Source

Built Distribution

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

lognexis_py-1.0.2-py3-none-any.whl (4.5 kB view details)

Uploaded Python 3

File details

Details for the file lognexis_py-1.0.2.tar.gz.

File metadata

  • Download URL: lognexis_py-1.0.2.tar.gz
  • Upload date:
  • Size: 3.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.15

File hashes

Hashes for lognexis_py-1.0.2.tar.gz
Algorithm Hash digest
SHA256 f7f67b1b6fe9f602f69bdaf349e77a89315fecc6d492bd5093e6ef933fe3550d
MD5 cce7df442e9d1b7faa6a22f5c3547dac
BLAKE2b-256 d626a1294ac3125d959e39af7d9fda8279b4e7a30376199a3ef5728c8aa75527

See more details on using hashes here.

File details

Details for the file lognexis_py-1.0.2-py3-none-any.whl.

File metadata

  • Download URL: lognexis_py-1.0.2-py3-none-any.whl
  • Upload date:
  • Size: 4.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.15

File hashes

Hashes for lognexis_py-1.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 5629f2459a58ab2dbe6d4f949c0dad7f15c0a2ea1a366a9ea2d53987acf709a3
MD5 8c4890c127d0d4b1485c25d82a7fe67e
BLAKE2b-256 c874abc18350d09f6ebd8c8a5d4ed1f4d9073db78694066658428f1eb3cc3ebf

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