Name | pyzoom JSON |
Version |
1.0.8
JSON |
| download |
home_page | https://github.com/licht1stein/pyzoom |
Summary | Python wrapper for Zoom Video API |
upload_time | 2024-03-11 10:53:05 |
maintainer | |
docs_url | None |
author | MB |
requires_python | >=3.7,<4.0 |
license | MIT |
keywords |
|
VCS |
 |
bugtrack_url |
|
requirements |
No requirements were recorded.
|
Travis-CI |
No Travis.
|
coveralls test coverage |
No coveralls.
|

**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**
**On the bright side, `pyzoom` can handle the entire OAUTH flow for you!**
# Python wrapper for Zoom API

[](https://github.com/psf/black)
[](https://pypi.org/project/pyzoom/)


[](https://www.buymeacoffee.com/licht1stein)
Links:
* [Api Reference](https://marketplace.zoom.us/docs/api-reference)
* [Using Zoom API](https://marketplace.zoom.us/docs/api-reference/using-zoom-apis)
## Installation
Using pip:
`pip install -U pyzoom`
Using [poetry](https://python-poetry.org/):
`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:
```python
from pyzoom import oauth_wizard
tokens = oauth_wizard("APP_CLIENT_ID", "APP_CLIENT_SECRET")
```
To run from terminal (in your virtual environment):
```sh
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
- starting the web server to capture callback code
- opening the browser for you to authorize on Zoom
- capturing the incoming code and running `request_tokens` with it
As the result it will print the credentials (if all was ok).
No external libraries were used to start the server and capture the code, only what's built into python.
### Requesting Tokens
Once your user has accepted integration on the zoom side and you received the code from the redirect:
```python
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
```python
from pyzoom import refresh_tokens
tokens = refresh_tokens("APP_CLIENT_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:
```python
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:
```python
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.*
```python
from pyzoom import ZoomClient
client = ZoomClient.from_environment()
```
### Meetings
#### Create meeting, update meeting and add registrant
```python
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:
```python
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](https://python-poetry.org) for packaging. Please read about it and let's all start using
`pyproject.toml` files as a standard. Read more:
* [PEP 518 -- Specifying Minimum Build System Requirements for Python Projects](https://www.python.org/dev/peps/pep-0518/)
* [What the heck is pyproject.toml?](https://snarky.ca/what-the-heck-is-pyproject-toml/)
* [Clarifying PEP 518 (a.k.a. pyproject.toml)](https://snarky.ca/clarifying-pep-518/)
### Support
<a href="https://www.buymeacoffee.com/licht1stein" target="_blank"><img src="https://cdn.buymeacoffee.com/buttons/default-orange.png" alt="Buy Me A Coffee" style="height: 30px !important;width: 130px !important;" ></a>
### Versioning
The project uses [break versioning](https://github.com/ptaoussanis/encore/blob/master/BREAK-VERSIONING.md), 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.
### 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.
Raw data
{
"_id": null,
"home_page": "https://github.com/licht1stein/pyzoom",
"name": "pyzoom",
"maintainer": "",
"docs_url": null,
"requires_python": ">=3.7,<4.0",
"maintainer_email": "",
"keywords": "",
"author": "MB",
"author_email": "mb@blaster.ai",
"download_url": "https://files.pythonhosted.org/packages/a2/9f/0ef7d403852150ee4d9e5478ffe31b70de45b4101db62ffb6512a7333347/pyzoom-1.0.8.tar.gz",
"platform": null,
"description": "\n\n**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**\n\n**On the bright side, `pyzoom` can handle the entire OAUTH flow for you!** \n\n\n# Python wrapper for Zoom API\n\n[](https://github.com/psf/black)\n[](https://pypi.org/project/pyzoom/)\n\n\n[](https://www.buymeacoffee.com/licht1stein)\n\n\nLinks:\n* [Api Reference](https://marketplace.zoom.us/docs/api-reference)\n* [Using Zoom API](https://marketplace.zoom.us/docs/api-reference/using-zoom-apis)\n\n## Installation\n\nUsing pip:\n\n`pip install -U pyzoom`\n\nUsing [poetry](https://python-poetry.org/):\n\n`poetry add pyzoom`\n\n## OAUTH Authorization Wizard\n`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:\n\n```python\nfrom pyzoom import oauth_wizard\n\ntokens = oauth_wizard(\"APP_CLIENT_ID\", \"APP_CLIENT_SECRET\")\n```\n\nTo run from terminal (in your virtual environment):\n\n```sh\npython -c \"from pyzoom import oauth_wizard; oauth_wizard()\"\n```\n\n\nThis will launch the wizard in interactive mode:\n- asking for input of your client id and secret\n- starting the web server to capture callback code \n- opening the browser for you to authorize on Zoom\n- capturing the incoming code and running `request_tokens` with it\n\nAs the result it will print the credentials (if all was ok).\n\nNo external libraries were used to start the server and capture the code, only what's built into python.\n\n### Requesting Tokens\nOnce your user has accepted integration on the zoom side and you received the code from the redirect:\n\n```python\nfrom pyzoom import request_tokens\n\ntokens = request_tokens(\"APP_CLIENT_ID\", \"APP_CLIENT_SECRET\", \"APP_REDIRECT_URL\", \"CALLBACK_CODE\"):\n```\nThe result of a successful request will be a map with the tokens. \n\n### Refreshing tokens\n\n```python\nfrom pyzoom import refresh_tokens\n\ntokens = refresh_tokens(\"APP_CLIENT_ID\", \"APP_CLIENT_SECRET\", \"USER_REFRESH_TOKEN\")\n```\nThe 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. \n\n## Usage\n\n### Basic instantiation:\n\n```python\nfrom pyzoom import ZoomClient\n\nclient = ZoomClient('YOUR_ZOOM_ACCESS_TOKEN')\n```\n\nOptionally you can specify a different base URL either upon instantiation or any time later:\n\n```python\nclient = ZoomClient ('YOU_ZOOM_ACCCESS_TOKEN', base_url=\"https://api.zoomgov.us/v2\")\n```\n\n### Instantiation from environment variables\n\nYou 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.*\n\n```python\nfrom pyzoom import ZoomClient\n\nclient = ZoomClient.from_environment()\n```\n\n\n### Meetings\n\n#### Create meeting, update meeting and add registrant\n```python\nfrom pyzoom import ZoomClient\nfrom datetime import datetime as dt\n\nclient = ZoomClient.from_environment()\n\n# Creating a meeting\nmeeting = client.meetings.create_meeting('Auto created 1', start_time=dt.now().isoformat(), duration_min=60, password='not-secure')\n\n# Update a meeting\nmeeting = client.meetings.update_meeting('Auto updated 1', meeting_id = meeting.id ,start_time=dt.now().isoformat(), duration_min=60,password='not-secure')\n\n# Adding registrants\nclient.meetings.add_meeting_registrant(meeting.id, first_name='John', last_name='Doe', email='john.doe@example.com')\n```\nYou can use `client.meetings.add_and_confirm_registrant` to also confirm auto added\nregistrants to a closed meeting.\n\n### Raw API methods\n\nYou can also use the library for making raw requests to the API:\n\n```python\nfrom pyzoom import ZoomClient\n\nclient = ZoomClient.from_environment()\n\n# Get self\nresponse = client.raw.get('/users/me')\n\n# Get all pages of meeting participants\nresult_dict = client.raw.get_all_pages('/past_meetings/{meetingUUID}/participants')\n```\n\n### Packaging notice\nThis project uses the excellent [poetry](https://python-poetry.org) for packaging. Please read about it and let's all start using\n`pyproject.toml` files as a standard. Read more:\n\n* [PEP 518 -- Specifying Minimum Build System Requirements for Python Projects](https://www.python.org/dev/peps/pep-0518/)\n\n* [What the heck is pyproject.toml?](https://snarky.ca/what-the-heck-is-pyproject-toml/)\n\n* [Clarifying PEP 518 (a.k.a. pyproject.toml)](https://snarky.ca/clarifying-pep-518/)\n\n\n### Support\n\n<a href=\"https://www.buymeacoffee.com/licht1stein\" target=\"_blank\"><img src=\"https://cdn.buymeacoffee.com/buttons/default-orange.png\" alt=\"Buy Me A Coffee\" style=\"height: 30px !important;width: 130px !important;\" ></a>\n\n### Versioning\nThe project uses [break versioning](https://github.com/ptaoussanis/encore/blob/master/BREAK-VERSIONING.md), 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.\n\n\n### Disclaimer\nThis library is not related to Zoom Video Communications, Inc. It's an open-source project that \naims to simplify working with this suddenly very popular service.\n",
"bugtrack_url": null,
"license": "MIT",
"summary": "Python wrapper for Zoom Video API",
"version": "1.0.8",
"project_urls": {
"Homepage": "https://github.com/licht1stein/pyzoom"
},
"split_keywords": [],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "c5e87738e449cd28a0ae68b916fe59dc1d93a4f63b3f9e8139875804bd7fddad",
"md5": "e339640483ca72ef92771b340ae2b043",
"sha256": "bcc1df2fee2954c64cdb230479ac12f7b8b23e99dc66d66118bd0e7c721dc83c"
},
"downloads": -1,
"filename": "pyzoom-1.0.8-py3-none-any.whl",
"has_sig": false,
"md5_digest": "e339640483ca72ef92771b340ae2b043",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.7,<4.0",
"size": 10544,
"upload_time": "2024-03-11T10:53:04",
"upload_time_iso_8601": "2024-03-11T10:53:04.255478Z",
"url": "https://files.pythonhosted.org/packages/c5/e8/7738e449cd28a0ae68b916fe59dc1d93a4f63b3f9e8139875804bd7fddad/pyzoom-1.0.8-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "a29f0ef7d403852150ee4d9e5478ffe31b70de45b4101db62ffb6512a7333347",
"md5": "48e7907a270f82aa4b2ceeb8a959a6e8",
"sha256": "6bd972ca537a2a13ff97401616f85bfb77096ed294dacb0a607c95fd57f4e919"
},
"downloads": -1,
"filename": "pyzoom-1.0.8.tar.gz",
"has_sig": false,
"md5_digest": "48e7907a270f82aa4b2ceeb8a959a6e8",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.7,<4.0",
"size": 11163,
"upload_time": "2024-03-11T10:53:05",
"upload_time_iso_8601": "2024-03-11T10:53:05.995189Z",
"url": "https://files.pythonhosted.org/packages/a2/9f/0ef7d403852150ee4d9e5478ffe31b70de45b4101db62ffb6512a7333347/pyzoom-1.0.8.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-03-11 10:53:05",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "licht1stein",
"github_project": "pyzoom",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"lcname": "pyzoom"
}