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'
Links
Project details
Release history Release notifications | RSS feed
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.tar.gz
(6.6 kB
view details)
Built Distribution
File details
Details for the file facebook-scribe-2.0.tar.gz
.
File metadata
- Download URL: facebook-scribe-2.0.tar.gz
- Upload date:
- Size: 6.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9f0571b3ecfd6a2903338c888e7050ed2bcf1a4ed96895a8f775353224e96e0c |
|
MD5 | 9144478092710d786c214ebe14a14e61 |
|
BLAKE2b-256 | 740c8b1af93c987cbb1be33dd3d493e25da7aeb7465bc19063988a925f159e96 |
File details
Details for the file facebook_scribe-2.0-py2.py3-none-any.whl
.
File metadata
- Download URL: facebook_scribe-2.0-py2.py3-none-any.whl
- Upload date:
- Size: 11.1 kB
- Tags: Python 2, Python 3
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 51ac95714d4b374683e525611659d9c5227b680f93d9d5fd3ab2c7375f30dc33 |
|
MD5 | 898bd26e683014ef759eca0e87e1000e |
|
BLAKE2b-256 | fd2b502db90aac63469ce24ebfaddb3c04a008765fbf4ab8855c390c49251a39 |