Skip to main content

Wrapper to OpenVidu REST APIs

Project description

OpenVidu Connect

The project aims to connect to the OpenVidu Server. It tries to wrap all the headers and APIs into attributes and methods of a class. OpenVidu Connect provides support for Sync and Async API calls. (Enabled with context manager for both sync and async runs.)

What do we have in store?

  • Future annotations are used to get the maximum output for support in IDEs
  • Built on top of httpx (Get httpx: pip install httpx)

Code Examples

  • Sync Class (OpenViduClient) Example
from openviduconnect import OpenViduClient

ov = OpenViduClient("<HOST>", "<SECRET>")
response = ov.get_sessions()
print(response)

######
# OR #
######

with OpenViduClient("<HOST>", "<SECRET>") as ov:
    response = ov.get_sessions()
print(response)
  • Async Class (AsyncOpenViduClient) Example
from openviduconnect import AsyncOpenViduClient

aov = AsyncOpenViduClient("<HOST>", "<SECRET>")
"""Async Stuff"""
response = await aov.get_sessions()
print(response)

######
# OR #
######

async with AsyncOpenViduClient("<HOST>", "<SECRET>") as aov:
    response = await aov.get_sessions()
print(response)
  • We have all forms of specific errors respective to the documentation of the REST APIs
from openviduconnect.exceptions import SessionBodyParameterError
"""SessionBodyParameterError is just an example there are many more"""

print(SessionBodyParameterError.status)  # Provides HTTP Response Status Code

Support

  • Runs with Python 3.7 and beyond
  • At this point it only supports OpenVidu 2.17.0
  • Will try to maintain versions of openviduconnect for different OepnVidu versions

Known issues?

  • Documentation
  • Others. You tell me

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

openviduconnect-1.0.1.tar.gz (6.8 kB view hashes)

Uploaded Source

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page