Skip to main content

A Python client for Facebook Scribe

Project description

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'

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

facebook-scribe-2.0.post1.tar.gz (11.6 kB view details)

Uploaded Source

Built Distribution

facebook_scribe-2.0.post1-py2.py3-none-any.whl (11.2 kB view details)

Uploaded Python 2 Python 3

File details

Details for the file facebook-scribe-2.0.post1.tar.gz.

File metadata

File hashes

Hashes for facebook-scribe-2.0.post1.tar.gz
Algorithm Hash digest
SHA256 62982849144f6232e38a4dae27d228f8ec69378a1d44f42f95a38019f89fe2b6
MD5 0a40b350349e163b4cee2ab21bbff969
BLAKE2b-256 28e683040dbeb37979c0e73fb3260349766e0cade3f70cbce8a8aee24831dcd2

See more details on using hashes here.

File details

Details for the file facebook_scribe-2.0.post1-py2.py3-none-any.whl.

File metadata

File hashes

Hashes for facebook_scribe-2.0.post1-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 75cfb0af537cce75ef7c21dc4e91513acff35ec6c4d98cc9fa43d4d1b7c477f6
MD5 7984e277b8c9eee2a79fec6434d4e2d0
BLAKE2b-256 5617a0288a64f8d3d673156ea9cff2e75dca35d7649b15ffcbefaf16fdde9ced

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