test
Project description
Getting Started with Webhooks and Callbacks API
Introduction
A comprehensive API demonstrating webhooks and callbacks patterns.
Webhooks
Webhooks allow your application to receive real-time notifications when certain events occur.
Callbacks
Callbacks are used for asynchronous operations where the API will call back to your provided URL when the operation completes.
Install the Package
The package is compatible with Python versions 3.7+.
Install the package from PyPi using the following pip command:
pip install package-ruby-test==1.0.1
You can also view the package at: https://pypi.python.org/pypi/package-ruby-test/1.0.1
Initialize the API Client
Note: Documentation for the client can be found here.
The following parameters are configurable for the API Client:
| Parameter | Type | Description |
|---|---|---|
| http_client_instance | Union[Session, HttpClientProvider] |
The Http Client passed from the sdk user for making requests |
| override_http_client_configuration | bool |
The value which determines to override properties of the passed Http Client from the sdk user |
| http_call_back | HttpCallBack |
The callback value that is invoked before and after an HTTP call is made to an endpoint |
| timeout | float |
The value to use for connection timeout. Default: 50 |
| max_retries | int |
The number of times to retry an endpoint call if it fails. Default: 0 |
| backoff_factor | float |
A backoff factor to apply between attempts after the second try. Default: 2 |
| retry_statuses | Array of int |
The http statuses on which retry is to be done. Default: [408, 413, 429, 500, 502, 503, 504, 521, 522, 524, 408, 413, 429, 500, 502, 503, 504, 521, 522, 524] |
| retry_methods | Array of string |
The http methods on which retry is to be done. Default: ["GET", "PUT", "GET", "PUT"] |
| proxy_settings | ProxySettings |
Optional proxy configuration to route HTTP requests through a proxy server. |
| logging_configuration | LoggingConfiguration |
The SDK logging configuration for API calls |
| api_key_credentials | ApiKeyCredentials |
The credential object for Custom Header Signature |
| bearer_auth_credentials | BearerAuthCredentials |
The credential object for OAuth 2 Bearer token |
The API client can be initialized as follows:
Code-Based Client Initialization
import logging
from webhooksandcallbacksapi.configuration import Environment
from webhooksandcallbacksapi.http.auth.api_key import ApiKeyCredentials
from webhooksandcallbacksapi.http.auth.bearer_auth import BearerAuthCredentials
from webhooksandcallbacksapi.logging.configuration.api_logging_configuration import LoggingConfiguration
from webhooksandcallbacksapi.logging.configuration.api_logging_configuration import RequestLoggingConfiguration
from webhooksandcallbacksapi.logging.configuration.api_logging_configuration import ResponseLoggingConfiguration
from webhooksandcallbacksapi.webhooksandcallbacksapi_client import WebhooksandcallbacksapiClient
client = WebhooksandcallbacksapiClient(
api_key_credentials=ApiKeyCredentials(
x_api_key='X-API-Key'
),
bearer_auth_credentials=BearerAuthCredentials(
access_token='AccessToken'
),
environment=Environment.PRODUCTION,
logging_configuration=LoggingConfiguration(
log_level=logging.INFO,
request_logging_config=RequestLoggingConfiguration(
log_body=True
),
response_logging_config=ResponseLoggingConfiguration(
log_headers=True
)
)
)
Environment-Based Client Initialization
from webhooksandcallbacksapi.webhooksandcallbacksapi_client import WebhooksandcallbacksapiClient
# Specify the path to your .env file if it’s located outside the project’s root directory.
client = WebhooksandcallbacksapiClient.from_environment(dotenv_path='/path/to/.env')
See the Environment-Based Client Initialization section for details.
Authorization
This API uses the following authentication schemes.
List of APIs
Webhooks
SDK Infrastructure
Configuration
- ProxySettings
- Environment-Based Client Initialization
- AbstractLogger
- LoggingConfiguration
- RequestLoggingConfiguration
- ResponseLoggingConfiguration
HTTP
Utilities
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file package_ruby_test-1.0.1.tar.gz.
File metadata
- Download URL: package_ruby_test-1.0.1.tar.gz
- Upload date:
- Size: 40.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.9.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a7268ebeb5c52a01334835ecac006ea5406729331925d81bbbbc14d932275053
|
|
| MD5 |
1a4d9dc0f1029a588f9604b806dce834
|
|
| BLAKE2b-256 |
19de5453b1ae5fad870c05a7b1f4d870de98bc25f6a03ad6b5d6a25187f60b37
|
File details
Details for the file package_ruby_test-1.0.1-py3-none-any.whl.
File metadata
- Download URL: package_ruby_test-1.0.1-py3-none-any.whl
- Upload date:
- Size: 103.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.9.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
53e315def3ad70c7509c24373aec2ad71ce71dbb4eaed76d935f18942204cef8
|
|
| MD5 |
bc09475fdc493dfe150418468f718200
|
|
| BLAKE2b-256 |
8592f4e74bf1e81d6c11f0966750c75bd1c52799cd68b76c09bd357e68337656
|