skip to navigation
skip to content

facebook-scribe 2.0.post1

A Python client for Facebook Scribe

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'
 
File Type Py Version Uploaded on Size
facebook-scribe-2.0.post1.tar.gz (md5) Source 2017-07-30 11KB
facebook_scribe-2.0.post1-py2.py3-none-any.whl (md5) Python Wheel py2.py3 2017-07-30 10KB