Skip to main content

No project description provided

Project description

python-openobserve

A python connector to submit information to OpenObserve (https://github.com/openobserve/openobserve)

The idea is to have a similar python connector to the "Elasticsearch" package, which allows a 1:1 replacement of the "Elasticsearch" package with the "OpenObserve" package.

OpenObserve is way more lightweight than Elasticsearch, and it is open source, like everything should be.

usage

see example.ipynb for a full example

OO = OpenObserve(user = "root@example.com", password = "Complexpass#123")

from datetime import datetime
from random import random
from pprint import pprint
document = {
    "@timestamp" : datetime.utcnow(),
    "component" : "testagent",
    "action" : "buy", 
    "amount" : random() * 100,
    "portfolio" : {
        "USD" : random() * 100.0,
        "BTC" : 0.1 + random() * 0.1
    }
}
pprint(document)

# insert document
OO.index("dd", document)

#search
# example sql parsing helper
sql = 'SELECT * FROM "dd"'
results = OO.search(sql)
print(f"got {len(results)} results")
pprint(results)

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

python_openobserve-0.1.0.tar.gz (15.0 kB view details)

Uploaded Source

Built Distribution

python_openobserve-0.1.0-py3-none-any.whl (28.0 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: python_openobserve-0.1.0.tar.gz
  • Upload date:
  • Size: 15.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.5.1 CPython/3.11.3 Darwin/22.5.0

File hashes

Hashes for python_openobserve-0.1.0.tar.gz
Algorithm Hash digest
SHA256 90962daab9f35987a2938d32abb44cff0ae34399d7bca685123a8964dbc8cf79
MD5 bc43fc11531a8723bc90405cfb035aee
BLAKE2b-256 5193f7d81167a6ab9d0a5a8e4377cc6f810dfdb54e98184584cf21b99dc9bba8

See more details on using hashes here.

File details

Details for the file python_openobserve-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for python_openobserve-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 3977e83c2afb41ef788747f5054093ea66bd7c9e5b1b032c7617b3dcae6e2e12
MD5 6ff142d3379fea25794c01b5d22f0fdd
BLAKE2b-256 98e68291245b7e32ca6aeb77c028825ad1359e3108f87aad7ef083ba59b8b3ad

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page