Vonage Application API Package
This package contains the code to use Vonage's Application API in Python.
It includes methods for managing applications.
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 Applications
With no custom options specified, this method will get the first 100 applications. It returns a tuple consisting of a list of ApplicationData objects and an int showing the page number of the next page of results.
from vonage_application import ListApplicationsFilter, ApplicationData
applications, next_page = vonage_client.application.list_applications()
# With options
options = ListApplicationsFilter(page_size=3, page=2)
applications, next_page = vonage_client.application.list_applications(options)
Create a New Application
from vonage_application import ApplicationConfig
app_data = vonage_client.application.create_application()
# Create with custom options (can also be done with a dict)
from vonage_application import ApplicationConfig, Keys, Voice, VoiceWebhooks
voice = Voice(
webhooks=VoiceWebhooks(
event_url=VoiceUrl(
address='https://example.com/event',
http_method='POST',
connect_timeout=500,
socket_timeout=3000,
),
),
signed_callbacks=True,
)
capabilities = Capabilities(voice=voice)
keys = Keys(public_key='MY_PUBLIC_KEY')
config = ApplicationConfig(
name='My Customised Application',
capabilities=capabilities,
keys=keys,
)
app_data = vonage_client.application.create_application(config)
Get an Application
app_data = client.application.get_application('MY_APP_ID')
app_data_as_dict = app.model_dump(exclude_none=True)
Update an Application
To update an application, pass config for the updated field(s) in an ApplicationConfig object
from vonage_application import ApplicationConfig, Keys, Voice, VoiceWebhooks
config = ApplicationConfig(name='My Updated Application')
app_data = vonage_client.application.update_application('MY_APP_ID', config)
Delete an Application
vonage_client.applications.delete_application('MY_APP_ID')
Metadata
Release files for vonage-application 2.0.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 | |
|---|---|---|---|
| vonage_application-2.0.2.tar.gz | 7.3 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| vonage_application-2.0.2-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 15.4 kB
Release files / vonage_application-2.0.2.tar.gz
| Download URL | vonage_application-2.0.2.tar.gz |
|---|---|
| Size | 7.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
90493467117084fad4dccaf4215c7c69db3b49490a22ffc3e1cf41d8b96f3b60
|
|
BLAKE2b-256 checksum How to use checksums |
58711295a035f2111afad96906b26f17765d3e17374d367b595fd972b1df8707
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.12.3
|
Release files / vonage_application-2.0.2-py3-none-any.whl
| Download URL | vonage_application-2.0.2-py3-none-any.whl |
|---|---|
| Size | 8.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
d623d4be45cbcc9b9e46421fd11f7e142ad263ffa328b69c53d7f4af8204464c
|
|
BLAKE2b-256 checksum How to use checksums |
3e41e2de517fbcb308e013de9a200790eed13cc6f18c5975b351314c12ddb2fd
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.12.3
|