Scribe client
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
Metadata
Release files for facebook-scribe 2.0.post1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| facebook-scribe-2.0.post1.tar.gz | 11.6 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| facebook_scribe-2.0.post1-py2.py3-none-any.whl | Python 2, Python 3 | none | any | Details |
Total release size: 22.7 kB
Release files / facebook-scribe-2.0.post1.tar.gz
| Download URL | facebook-scribe-2.0.post1.tar.gz |
|---|---|
| Size | 11.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
62982849144f6232e38a4dae27d228f8ec69378a1d44f42f95a38019f89fe2b6
|
|
BLAKE2b-256 checksum How to use checksums |
28e683040dbeb37979c0e73fb3260349766e0cade3f70cbce8a8aee24831dcd2
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Release files / facebook_scribe-2.0.post1-py2.py3-none-any.whl
| Download URL | facebook_scribe-2.0.post1-py2.py3-none-any.whl |
|---|---|
| Size | 11.2 kB |
| Tags | Python 2 Python 3 |
|
SHA-256 checksum How to use checksums |
75cfb0af537cce75ef7c21dc4e91513acff35ec6c4d98cc9fa43d4d1b7c477f6
|
|
BLAKE2b-256 checksum How to use checksums |
5617a0288a64f8d3d673156ea9cff2e75dca35d7649b15ffcbefaf16fdde9ced
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |