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.post1.tar.gz
(11.6 kB
view details)
Built Distribution
File details
Details for the file facebook-scribe-2.0.post1.tar.gz
.
File metadata
- Download URL: facebook-scribe-2.0.post1.tar.gz
- Upload date:
- Size: 11.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 62982849144f6232e38a4dae27d228f8ec69378a1d44f42f95a38019f89fe2b6 |
|
MD5 | 0a40b350349e163b4cee2ab21bbff969 |
|
BLAKE2b-256 | 28e683040dbeb37979c0e73fb3260349766e0cade3f70cbce8a8aee24831dcd2 |
File details
Details for the file facebook_scribe-2.0.post1-py2.py3-none-any.whl
.
File metadata
- Download URL: facebook_scribe-2.0.post1-py2.py3-none-any.whl
- Upload date:
- Size: 11.2 kB
- Tags: Python 2, Python 3
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 75cfb0af537cce75ef7c21dc4e91513acff35ec6c4d98cc9fa43d4d1b7c477f6 |
|
MD5 | 7984e277b8c9eee2a79fec6434d4e2d0 |
|
BLAKE2b-256 | 5617a0288a64f8d3d673156ea9cff2e75dca35d7649b15ffcbefaf16fdde9ced |