Skip to main content

Python wrapper for Zoom Video API

Project description

Zoom Logo

WARNING: Version 1.0.0 introduces breaking change. The library now only supports OAUTH tokens, since Zoom is deprecating the JWT support as of June 1, 2023

Also the project now uses break versioning, meaning that upgrading from 1.0.x to 1.0.y will always be safe, upgrade to 1.y.0 might break something small, and upgrade to y.0.0. will break almost everything. That was a versioning spec in one sentence, by the way.

Python wrapper for Zoom API

PyPI - Python Version Code style: black PyPI PyPI - License PyPI - Downloads

This library requires contributors and maintainers since Python stopped being my primary language a couple of years ago. I do use it in some of my older projects, so I have to update it from time to time.

Links:

Installation

Using pip:

pip install -U pyzoom

Using poetry:

poetry add pyzoom

OAUTH Authorization Wizard

pyzoom can handle the entire oauth flow for you. Yes, including starting a web server to receive the callback. And you can use it eiter interactively from the terminal, or from within the code. To run from code:

from pyzoom import oauth_wizard

tokens = oauth_wizard("APP_CLIENT_ID", "APP_CLIENT_SECRET")

To run from terminal (in your virtual environment):

python -c "from pyzoom import oauth_wizard; oauth_wizard()"

This will launch the wizard in interactive mode, asking for input of your client id and secret, and will print the credentials after everything is done.

Requesting Tokens

Once your user has accepted integration on the zoom side and you received the code from the redirect:

from pyzoom import request_tokens

tokens = request_tokens("APP_CLIENT_ID", "APP_CLIENT_SECRET", "APP_REDIRECT_URL", "CALLBACK_CODE"):

The result of a successful request will be a map with the tokens.

Refreshing tokens

from pyzoom import refresh_tokens

tokens = refresh_tokens("APP_CLIEN_ID", "APP_CLIENT_SECRET", "USER_REFRESH_TOKEN")

The result of a successful request will be a map with the new tokens. Remember, that the refresh token will also be updated, which will invalidate the token you just used.

Usage

Basic instantiation:

from pyzoom import ZoomClient

client = ZoomClient('YOUR_ZOOM_ACCESS_TOKEN')

Optionally you can specify a different base URL either upon instantiation or any time later:

client = ZoomClient ('YOU_ZOOM_ACCCESS_TOKEN', base_url="https://api.zoomgov.us/v2")

Instantiation from environment variables

You can also create an instance of client when access key in environment variables ZOOM_ACCESS_TOKEN. Since the access token expires after one hour, this method is not a good idea any more.

from pyzoom import ZoomClient

client = ZoomClient.from_environment()

Meetings

Create meeting, update meeting and add registrant

from pyzoom import ZoomClient
from datetime import datetime as dt

client = ZoomClient.from_environment()

# Creating a meeting
meeting = client.meetings.create_meeting('Auto created 1', start_time=dt.now().isoformat(), duration_min=60, password='not-secure')

# Update a meeting
meeting = client.meetings.update_meeting('Auto updated 1', meeting_id = meeting.id ,start_time=dt.now().isoformat(), duration_min=60,password='not-secure')

# Adding registrants
client.meetings.add_meeting_registrant(meeting.id, first_name='John', last_name='Doe', email='john.doe@example.com')

You can use client.meetings.add_and_confirm_registrant to also confirm auto added registrants to a closed meeting.

Raw API methods

You can also use the library for making raw requests to the API:

from pyzoom import ZoomClient

client = ZoomClient.from_environment()

# Get self
response = client.raw.get('/users/me')

# Get all pages of meeting participants
result_dict = client.raw.get_all_pages('/past_meetings/{meetingUUID}/participants')

Packaging notice

This project uses the excellent poetry for packaging. Please read about it and let's all start using pyproject.toml files as a standard. Read more:

Support

Buy Me A Coffee

Disclaimer

This library is not related to Zoom Video Communications, Inc. It's an open-source project that aims to simplify working with this suddenly very popular service.

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

pyzoom-1.0.3.tar.gz (11.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pyzoom-1.0.3-py3-none-any.whl (10.4 kB view details)

Uploaded Python 3

File details

Details for the file pyzoom-1.0.3.tar.gz.

File metadata

  • Download URL: pyzoom-1.0.3.tar.gz
  • Upload date:
  • Size: 11.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.5.0 CPython/3.7.16 Linux/5.15.0-1037-azure

File hashes

Hashes for pyzoom-1.0.3.tar.gz
Algorithm Hash digest
SHA256 9840964e1c3491303d5b045138995d570efdbff198bbebbdd7a595bcb31266e8
MD5 5f42fb218576ebe2c583ff7ea067f8e1
BLAKE2b-256 e841bb77f593f5f67331628b497ae53cdc7ed2af0b30b641f690f1b6ebe5d902

See more details on using hashes here.

File details

Details for the file pyzoom-1.0.3-py3-none-any.whl.

File metadata

  • Download URL: pyzoom-1.0.3-py3-none-any.whl
  • Upload date:
  • Size: 10.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.5.0 CPython/3.7.16 Linux/5.15.0-1037-azure

File hashes

Hashes for pyzoom-1.0.3-py3-none-any.whl
Algorithm Hash digest
SHA256 b54ecedce13d9140628bdac081036d9ca5ed4c826ca3fd7518d431202cd06bdb
MD5 b46cf2bee0b07d9aec643f827ab01926
BLAKE2b-256 10192fb6c2ee8cb711926e3a44e87c9e8b580991780426adf5d8fdab48c39d7f

See more details on using hashes here.

Supported by

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