Skip to main content

A Python 3 interface to the XirSys API

Badges

https://img.shields.io/travis/kavdev/python-xirsys/master.svg?style=flat-square https://img.shields.io/codecov/c/github/kavdev/python-xirsys/master.svg?style=flat-square https://img.shields.io/requires/github/kavdev/python-xirsys.svg?style=flat-square https://img.shields.io/codacy/75dbe2685efe47c3aa203a53154c9e7e.svg?style=flat-square https://img.shields.io/pypi/v/python-xirsys.svg?style=flat-square https://img.shields.io/pypi/dw/python-xirsys.svg?style=flat-square https://img.shields.io/github/issues/kavdev/python-xirsys.svg?style=flat-square https://img.shields.io/github/license/kavdev/python-xirsys.svg?style=flat-square

Usage

Install python-xirsys:

pip install python-xirsys

Build a Connection object:

from python_xirsys import Connection

connection = Connection(username="<xirsys_username>", secret_key="<xirsys_secret_key>"

Grab XirSys signaling server:

>>> SignalingServer.list_all(connection=connection)
<SignalingServer [server_address]>
>>> server = SignalingServer.list_all(connection=connection)
>>> server.address
'<server_address>'

Generate a XirSys WebSocket token:

>>> from python_xirsys.objects import SignalingServer
>>> SignalingServer.generate_token(connection=connection, domain="domain.com", application="application", room="room", secure=True)
'<token>'

Grab a list of XirSys ICE servers:

>>> from python_xirsys.objects import ICEServer
>>> ICEServer.list_all(connection=connection, domain="domain.com", application="application", room="room", secure=True, timeout=30)
[<ICEServer [url]>, ...]
>>> ice_servers = ICEServer.list_all(connection=connection, domain="domain.com", application="application", room="room", secure=True, timeout=30)
>>> ice_server = ice_servers[0]
>>> ice_server.url
'<url>'
>>> ice_server.server_type
'stun'
>>> ice_server.username
None
>>> ice_server.credential
None
>>> ice_server = ice_servers[1]
>>> ice_server.url
'<url>'
>>> ice_server.server_type
'turn'
>>> ice_server.username
'<username>'
>>> ice_server.credential
'<credential>'

Manage XirSys domains:

>>> from python_xirsys.objects import Domain
>>> Domain.create(connection=connection, domain="test.com")
<Domain [test.com]>
>>> Domain.list_all(connection=connection)
[<Domain [domain.com]>, <Domain [test.com]>]
>>> domains = Domain.list_all(connection=connection)
>>> domain = domains[domains.index("test.com")]
>>> domain.applications
[<Application [default]>, ...]
>>> domain.disable()

Manage XirSys applications:

>>> from python_xirsys.objects import Application
>>> domains = Domain.list_all(connection=connection)
>>> domain = domains[domains.index("domain.com")]
>>> Application.create(connection=connection, domain=domain, application="test")
<Application [test]>
>>> Application.list_all(connection=connection, domain=domain)
[<Application [default]>, <Application [test]>]
>>> Application.list_all(connection=connection, domain="domain.com")
[<Application [default]>, <Application [test]>]
>>> applications = Application.list_all(connection=connection, domain=domain)
>>> application = applications[applications.index("test")]
>>> application.rooms
[<Room [default]>, ...]
>>> application.disable()

Manage XirSys rooms:

>>> from python_xirsys.objects import Room
>>> Room.create(connection=connection, domain="domain.com", application="default", room="test_room")
<Room [test_room]>
>>> rooms = Room.list_all(connection=connection, domain="domain.com", application="default")
[<Room [default]>, <Room [test_room]>]
>>> room = rooms[rooms.index("test_room")]
>>> application.room()

Running the Tests

pip install -r requirements/test.txt
./runtests.py

Changes

0.1.1 (2016-05-30)

  • Object names are now coerced to strings when initialized to avoid a TypeError

0.1.0 (2016-05-26)

  • Initial release

Metadata

Release files for python-xirsys 0.1.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for python-xirsys 0.1.1
File Size Uploaded Provenance Actions
python-xirsys-0.1.1.tar.gz 7.7 kB Without provenance Details for python-xirsys-0.1.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for python-xirsys 0.1.1
File Interpreter ABI Platform Actions
python_xirsys-0.1.1-py2.py3-none-any.whl Python 2, Python 3 none any Details for python_xirsys-0.1.1-py2.py3-none-any.whl

Total release size: 15.5 kB

Release files / python-xirsys-0.1.1.tar.gz

Download URL python-xirsys-0.1.1.tar.gz
Size 7.7 kB
Tags Source
SHA-256 checksum
How to use checksums
ba4998fdc4008a9148a4d94c49ae41188adbb877ac742593041171452ff2346a
BLAKE2b-256 checksum
How to use checksums
603999736afdacda786deb0b4b7a4c629d68f1183915a134ba0ed53c26dbe87d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release files / python_xirsys-0.1.1-py2.py3-none-any.whl

Download URL python_xirsys-0.1.1-py2.py3-none-any.whl
Size 7.9 kB
Tags Python 2 Python 3
SHA-256 checksum
How to use checksums
25392a1827b83473e115e9b344c0fe642f1db8a70b3f0ea1f08843644fecc2aa
BLAKE2b-256 checksum
How to use checksums
fcf15aa9b2af0973c94eebc152e07413a123b99fc32d97bbe2773a6e37f4b22f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Security for python-xirsys 0.1.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page