GitHub Repository
View source code and contribute
Features
- Compatible with Python 2.6+ and Python 3
- No external dependencies
- Supports large messages
- Configurable retry logic with exponential backoff
Installation
Install the library using setup.py:Quick Start
Test the client using the built-in demo:- Python 3 / 2.7+
- With Retry Config
- Python 2.6
Basic Usage
Thebztcp.client.Client class handles the connection and streaming:
Configuration Options
Retry Configuration
Configure retry behavior with exponential backoff:Advanced Usage
Low-Level Message Handling
For granular control over connection status and individual messages:Message Status Constants
Key Methods
Error Handling
The library raisesBzException for Benzinga-specific errors:
Complete Example
See Also
- Connection Guide - Server details and authentication
- Message Format - JSON structure reference
- Go Client - Alternative Go implementation