Official VideoHub Python SDK for building video, audio, and screen sharing applications.
Project description
VideoHub Python SDK
Official Python SDK for VideoHub – build video calls, audio rooms, and real-time communication applications with ease.
VideoHub enables developers to integrate video conferencing, audio rooms, real-time chat, AI chatbot integration, screen sharing, and real-time communication into their applications using simple APIs.
Installation
Install from PyPI:
pip install videohub-python
Requirements
-
Python 3.9+
-
Python 3.11+ (recommended)
-
VideoHub API Key
-
App credentials:
- App ID
- App Secret
- App Platform (
web,android,ios) - App Identifier (domain or package name)
Quick Start
from videohub.client import Client
videoHub = Client(
api_key="vhub_live_xxxxxxxxx",
app_id="your_app_id",
app_secret="your_app_secret",
app_platform="web",
app_identifier="example.com"
)
# Create a room
videoHub.rooms.create(
room_name="my-room",
max_participants=5
)
# Generate a host token
token = videoHub.rooms.host_token("my-room")
print(token)
Authentication
All API requests require the following credentials:
| Field | Description |
|---|---|
| API Key | Account authentication key |
| App ID | Unique application identifier |
| App Secret | Secret used for request verification |
| App Platform | web, android, or ios |
| App Identifier | Domain or package name |
Features
- Video calling
- Audio calling
- Screen sharing
- Room management
- Call management
- Admin APIs
- Secure authentication
- & more
Examples
Create Room
room = videoHub.rooms.create(
room_name="demo-room",
max_participants=5
)
print(room)
Generate Room Token
token = videoHub.rooms.host_token("demo-room")
print(json.dumps({
"token": token["token"],
"rtc": videoHub.rtc
}, indent=4))
Error Handling
The SDK raises structured exceptions for API errors:
from videohub.exceptions import VideoHubError
try:
client.rooms.create("room1")
except VideoHubError as e:
print(e)
Subscriber
auth = videoHub.rooms.guest_token("demo-room", "app_id")
print(json.dumps({
"token": auth["token"],
"rtc": videoHub.rtc
}, indent=4))
Project Structure
videohub/
├── client.py
├── config.py
├── constants.py
├── exceptions.py
├── http.py
│
├── services/
│ ├── auth.py
│ ├── rooms.py
│ ├── calls.py
│ └── admin.py
│
└── utils/
└── validators.py
Documentation
Full API documentation is available at:
Contributing
Contributions are welcome.
- Fork the repository
- Create a feature branch (
git checkout -b feature-name) - Commit your changes (
git commit -m "Add feature") - Push to the branch (
git push origin feature-name) - Open a Pull Request
Reporting Issues
If you encounter a bug or want to request a feature, please open an issue:
https://github.com/letscms/videohub-python/issues
License
This project is licensed under the MIT License.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file videohub_python-1.2.4.tar.gz.
File metadata
- Download URL: videohub_python-1.2.4.tar.gz
- Upload date:
- Size: 12.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.15
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
89cca9f2bffd27345aa9c2ba46922f2f0b2d10eeeda0c61173ff11d5e64dada3
|
|
| MD5 |
6de3740462e149760c515f9816415032
|
|
| BLAKE2b-256 |
2d3ba39e35b25967b9b9164f9cbc42372edacc510235cbb1633cff7f616435e0
|
File details
Details for the file videohub_python-1.2.4-py3-none-any.whl.
File metadata
- Download URL: videohub_python-1.2.4-py3-none-any.whl
- Upload date:
- Size: 13.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.15
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
731aa76d2134137bc5c7db9028e683312da2977d3795078d01ddb69966687dcb
|
|
| MD5 |
28a6ac8b65514b0621f1ae5262b45ea2
|
|
| BLAKE2b-256 |
10503a0c7e01b8baada533ff58b93eb807c335b02b60a656e7d52d58b914ea5d
|