Vonage Users Package
This package contains the code to use Vonage's Users API in Python.
It includes methods for managing users.
Usage
It is recommended to use this as part of the main vonage package. The examples below assume you've created an instance of the vonage.Vonage class called vonage_client.
List Users
With no custom options specified, this method will get the last 100 users. It returns a tuple consisting of a list of UserSummary objects and a string describing the cursor to the next page of results.
from vonage_users import ListUsersRequest
users, _ = vonage_client.users.list_users()
# With options
params = ListUsersRequest(
page_size=10,
cursor=my_cursor,
order='desc',
)
users, next_cursor = vonage_client.users.list_users(params)
Create a New User
from vonage_users import User, Channels, SmsChannel
user_options = User(
name='my_user_name',
display_name='My User Name',
properties={'custom_key': 'custom_value'},
channels=Channels(sms=[SmsChannel(number='1234567890')]),
)
user = vonage_client.users.create_user(user_options)
Get a User
user = client.users.get_user('USR-87e3e6b0-cd7b-45ef-a0a7-bcd5566a672b')
user_as_dict = user.model_dump(exclude_none=True)
Update a User
from vonage_users import User, Channels, SmsChannel, WhatsappChannel
user_options = User(
name='my_user_name',
display_name='My User Name',
properties={'custom_key': 'custom_value'},
channels=Channels(sms=[SmsChannel(number='1234567890')], whatsapp=[WhatsappChannel(number='9876543210')]),
)
user = vonage_client.users.update_user(id, user_options)
Delete a User
vonage_client.users.delete_user(id)
Metadata
Release files for vonage-users 1.2.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| vonage_users-1.2.2.tar.gz | 6.5 kB | Without provenance | Details for vonage_users-1.2.2.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| vonage_users-1.2.2-py3-none-any.whl | Python 3 | none | any | Details for vonage_users-1.2.2-py3-none-any.whl |
Total release size: 13.2 kB
Release files / vonage_users-1.2.2.tar.gz
| Download URL | vonage_users-1.2.2.tar.gz |
|---|---|
| Size | 6.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
8885955f1add802459fde9fc26595b88d4e4b21e63ee0f35213dba835331df79
|
|
BLAKE2b-256 checksum How to use checksums |
f40c609709adaa680062a9676d4cadff2656f1184fce0dfd7392893333574e8e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.12.3
|
Release files / vonage_users-1.2.2-py3-none-any.whl
| Download URL | vonage_users-1.2.2-py3-none-any.whl |
|---|---|
| Size | 6.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
3701b3887c4f41d9acad5ef468619bd2dfb2fb49a4b37ac8ca50fae55c708c47
|
|
BLAKE2b-256 checksum How to use checksums |
6726de4911a656e0ee22a257db074d424114b916d3636e21c1a06d642e491f92
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.12.3
|
Security for vonage-users 1.2.2
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.