Skip to main content

This is a Python client for scribe that can be installed using pip:

pip install facebook-scribe

Usage

Connect to HOST:9999 using Thrift:

from scribe import scribe
from thrift.transport import TTransport, TSocket
from thrift.protocol import TBinaryProtocol

socket = TSocket.TSocket(host="HOST", port=9999)
transport = TTransport.TFramedTransport(socket)
protocol = TBinaryProtocol.TBinaryProtocol(trans=transport, strictRead=False, strictWrite=False)
client = scribe.Client(protocol)
transport.open()

category = 'LOGS'
message = 'hello world'

log_entry = scribe.LogEntry(category, message)
result = client.Log(messages=[log_entry])
if result == 0:
  print 'success'

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

facebook-scribe-py3-0.1.1.tar.gz (6.5 kB view details)

Uploaded Source

File details

Details for the file facebook-scribe-py3-0.1.1.tar.gz.

File metadata

File hashes

Hashes for facebook-scribe-py3-0.1.1.tar.gz
Algorithm Hash digest
SHA256 07d0ded53160dbcf38d529c8ed579824f4995e859da0959b06e5841e6b8a65d1
MD5 0f1186f914fa9faa1d6d4791ee866256
BLAKE2b-256 0bc15a5004152ac272623d743180a7e2d97e163de632273e49d9522e6d81fa9a

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

0.1.1 This release

1 file

0.1

1 file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page