twilio-api-sdk-sdk 1.0.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (55) hide show
  1. twilio_api_sdk_sdk-1.0.0/LICENSE +28 -0
  2. twilio_api_sdk_sdk-1.0.0/MANIFEST.in +2 -0
  3. twilio_api_sdk_sdk-1.0.0/PKG-INFO +140 -0
  4. twilio_api_sdk_sdk-1.0.0/README.md +123 -0
  5. twilio_api_sdk_sdk-1.0.0/pyproject.toml +25 -0
  6. twilio_api_sdk_sdk-1.0.0/setup.cfg +8 -0
  7. twilio_api_sdk_sdk-1.0.0/twilio_api_sdk_sdk.egg-info/PKG-INFO +140 -0
  8. twilio_api_sdk_sdk-1.0.0/twilio_api_sdk_sdk.egg-info/SOURCES.txt +54 -0
  9. twilio_api_sdk_sdk-1.0.0/twilio_api_sdk_sdk.egg-info/dependency_links.txt +1 -0
  10. twilio_api_sdk_sdk-1.0.0/twilio_api_sdk_sdk.egg-info/requires.txt +7 -0
  11. twilio_api_sdk_sdk-1.0.0/twilio_api_sdk_sdk.egg-info/top_level.txt +3 -0
  12. twilio_api_sdk_sdk-1.0.0/twilioaccounts/__init__.py +13 -0
  13. twilio_api_sdk_sdk-1.0.0/twilioaccounts/api_helper.py +19 -0
  14. twilio_api_sdk_sdk-1.0.0/twilioaccounts/apis/__init__.py +13 -0
  15. twilio_api_sdk_sdk-1.0.0/twilioaccounts/apis/accounts_v_1_auth_token_promotion_api.py +62 -0
  16. twilio_api_sdk_sdk-1.0.0/twilioaccounts/apis/accounts_v_1_aws_api.py +265 -0
  17. twilio_api_sdk_sdk-1.0.0/twilioaccounts/apis/accounts_v_1_bulk_consents_api.py +82 -0
  18. twilio_api_sdk_sdk-1.0.0/twilioaccounts/apis/accounts_v_1_bulk_contacts_api.py +76 -0
  19. twilio_api_sdk_sdk-1.0.0/twilioaccounts/apis/accounts_v_1_messaging_geopermissions_api.py +115 -0
  20. twilio_api_sdk_sdk-1.0.0/twilioaccounts/apis/accounts_v_1_public_key_api.py +264 -0
  21. twilio_api_sdk_sdk-1.0.0/twilioaccounts/apis/accounts_v_1_safelist_api.py +147 -0
  22. twilio_api_sdk_sdk-1.0.0/twilioaccounts/apis/accounts_v_1_secondary_auth_token_api.py +86 -0
  23. twilio_api_sdk_sdk-1.0.0/twilioaccounts/apis/base_api.py +72 -0
  24. twilio_api_sdk_sdk-1.0.0/twilioaccounts/configuration.py +249 -0
  25. twilio_api_sdk_sdk-1.0.0/twilioaccounts/exceptions/__init__.py +5 -0
  26. twilio_api_sdk_sdk-1.0.0/twilioaccounts/exceptions/api_exception.py +36 -0
  27. twilio_api_sdk_sdk-1.0.0/twilioaccounts/http/__init__.py +11 -0
  28. twilio_api_sdk_sdk-1.0.0/twilioaccounts/http/api_response.py +67 -0
  29. twilio_api_sdk_sdk-1.0.0/twilioaccounts/http/auth/__init__.py +5 -0
  30. twilio_api_sdk_sdk-1.0.0/twilioaccounts/http/auth/basic_auth.py +125 -0
  31. twilio_api_sdk_sdk-1.0.0/twilioaccounts/http/http_call_back.py +20 -0
  32. twilio_api_sdk_sdk-1.0.0/twilioaccounts/http/http_client_provider.py +23 -0
  33. twilio_api_sdk_sdk-1.0.0/twilioaccounts/http/http_method_enum.py +25 -0
  34. twilio_api_sdk_sdk-1.0.0/twilioaccounts/http/http_request.py +55 -0
  35. twilio_api_sdk_sdk-1.0.0/twilioaccounts/http/http_response.py +45 -0
  36. twilio_api_sdk_sdk-1.0.0/twilioaccounts/http/proxy_settings.py +50 -0
  37. twilio_api_sdk_sdk-1.0.0/twilioaccounts/logging/__init__.py +6 -0
  38. twilio_api_sdk_sdk-1.0.0/twilioaccounts/logging/configuration/__init__.py +5 -0
  39. twilio_api_sdk_sdk-1.0.0/twilioaccounts/logging/configuration/api_logging_configuration.py +398 -0
  40. twilio_api_sdk_sdk-1.0.0/twilioaccounts/logging/sdk_logger.py +28 -0
  41. twilio_api_sdk_sdk-1.0.0/twilioaccounts/models/__init__.py +15 -0
  42. twilio_api_sdk_sdk-1.0.0/twilioaccounts/models/accounts_v_1_auth_token_promotion.py +223 -0
  43. twilio_api_sdk_sdk-1.0.0/twilioaccounts/models/accounts_v_1_bulk_consents.py +113 -0
  44. twilio_api_sdk_sdk-1.0.0/twilioaccounts/models/accounts_v_1_bulk_contacts.py +113 -0
  45. twilio_api_sdk_sdk-1.0.0/twilioaccounts/models/accounts_v_1_credential_credential_aws.py +246 -0
  46. twilio_api_sdk_sdk-1.0.0/twilioaccounts/models/accounts_v_1_credential_credential_public_key.py +247 -0
  47. twilio_api_sdk_sdk-1.0.0/twilioaccounts/models/accounts_v_1_messaging_geopermissions.py +115 -0
  48. twilio_api_sdk_sdk-1.0.0/twilioaccounts/models/accounts_v_1_safelist.py +132 -0
  49. twilio_api_sdk_sdk-1.0.0/twilioaccounts/models/accounts_v_1_secondary_auth_token.py +223 -0
  50. twilio_api_sdk_sdk-1.0.0/twilioaccounts/models/list_credential_aws_response.py +136 -0
  51. twilio_api_sdk_sdk-1.0.0/twilioaccounts/models/list_credential_public_key_response.py +136 -0
  52. twilio_api_sdk_sdk-1.0.0/twilioaccounts/models/meta.py +246 -0
  53. twilio_api_sdk_sdk-1.0.0/twilioaccounts/twilioaccounts_client.py +131 -0
  54. twilio_api_sdk_sdk-1.0.0/twilioaccounts/utilities/__init__.py +6 -0
  55. twilio_api_sdk_sdk-1.0.0/twilioaccounts/utilities/file_wrapper.py +45 -0
@@ -0,0 +1,28 @@
1
+ License:
2
+ ========
3
+ The MIT License (MIT)
4
+ http://opensource.org/licenses/MIT
5
+
6
+ Copyright (c) 2014 - 2026 APIMATIC Limited
7
+
8
+ Permission is hereby granted, free of charge, to any person obtaining a copy
9
+ of this software and associated documentation files (the "Software"), to deal
10
+ in the Software without restriction, including without limitation the rights
11
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
12
+ copies of the Software, and to permit persons to whom the Software is
13
+ furnished to do so, subject to the following conditions:
14
+
15
+ The above copyright notice and this permission notice shall be included in
16
+ all copies or substantial portions of the Software.
17
+
18
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
19
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
20
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
21
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
22
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
23
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
24
+ THE SOFTWARE.
25
+
26
+ Trade Mark:
27
+ ==========
28
+ APIMATIC is a trade mark for APIMATIC Limited
@@ -0,0 +1,2 @@
1
+ include LICENSE
2
+ include README.md
@@ -0,0 +1,140 @@
1
+ Metadata-Version: 2.4
2
+ Name: twilio-api-sdk-sdk
3
+ Version: 1.0.0
4
+ Summary: twilio api sdk
5
+ Author-email: Muhammad Rafay <muhammad.rafay@apimatic.io>
6
+ Project-URL: Documentation, https://www.twilio.com/en-us
7
+ Requires-Python: >=3.7
8
+ Description-Content-Type: text/markdown
9
+ License-File: LICENSE
10
+ Requires-Dist: apimatic-core>=0.2.24,~=0.2.0
11
+ Requires-Dist: apimatic-core-interfaces>=0.1.8,~=0.1.0
12
+ Requires-Dist: apimatic-requests-client-adapter>=0.1.10,~=0.1.0
13
+ Requires-Dist: python-dotenv<2.0,>=0.21
14
+ Provides-Extra: testutils
15
+ Requires-Dist: pytest>=7.2.2; extra == "testutils"
16
+ Dynamic: license-file
17
+
18
+
19
+ # Getting Started with Twilio - Accounts
20
+
21
+ ## Introduction
22
+
23
+ This is the public Twilio REST API.
24
+
25
+ ## Install the Package
26
+
27
+ The package is compatible with Python versions `3.7+`.
28
+ Install the package from PyPi using the following pip command:
29
+
30
+ ```bash
31
+ pip install twilio-api-sdk-sdk==1.0.0
32
+ ```
33
+
34
+ You can also view the package at:
35
+ https://pypi.python.org/pypi/twilio-api-sdk-sdk/1.0.0
36
+
37
+ ## Initialize the API Client
38
+
39
+ **_Note:_** Documentation for the client can be found [here.](https://www.github.com/sdks-io/twilio-api-sdk-python-sdk/tree/1.0.0/doc/client.md)
40
+
41
+ The following parameters are configurable for the API Client:
42
+
43
+ | Parameter | Type | Description |
44
+ | --- | --- | --- |
45
+ | http_client_instance | `Union[Session, HttpClientProvider]` | The Http Client passed from the sdk user for making requests |
46
+ | override_http_client_configuration | `bool` | The value which determines to override properties of the passed Http Client from the sdk user |
47
+ | http_call_back | `HttpCallBack` | The callback value that is invoked before and after an HTTP call is made to an endpoint |
48
+ | timeout | `float` | The value to use for connection timeout. <br> **Default: 30** |
49
+ | max_retries | `int` | The number of times to retry an endpoint call if it fails. <br> **Default: 0** |
50
+ | backoff_factor | `float` | A backoff factor to apply between attempts after the second try. <br> **Default: 2** |
51
+ | retry_statuses | `Array of int` | The http statuses on which retry is to be done. <br> **Default: [408, 413, 429, 500, 502, 503, 504, 521, 522, 524]** |
52
+ | retry_methods | `Array of string` | The http methods on which retry is to be done. <br> **Default: ["GET", "PUT"]** |
53
+ | proxy_settings | [`ProxySettings`](https://www.github.com/sdks-io/twilio-api-sdk-python-sdk/tree/1.0.0/doc/proxy-settings.md) | Optional proxy configuration to route HTTP requests through a proxy server. |
54
+ | logging_configuration | [`LoggingConfiguration`](https://www.github.com/sdks-io/twilio-api-sdk-python-sdk/tree/1.0.0/doc/logging-configuration.md) | The SDK logging configuration for API calls |
55
+ | basic_auth_credentials | [`BasicAuthCredentials`](https://www.github.com/sdks-io/twilio-api-sdk-python-sdk/tree/1.0.0/doc/auth/basic-authentication.md) | The credential object for Basic Authentication |
56
+
57
+ The API client can be initialized as follows:
58
+
59
+ ### Code-Based Client Initialization
60
+
61
+ ```python
62
+ import logging
63
+
64
+ from twilioaccounts.configuration import Environment
65
+ from twilioaccounts.http.auth.basic_auth import BasicAuthCredentials
66
+ from twilioaccounts.logging.configuration.api_logging_configuration import LoggingConfiguration
67
+ from twilioaccounts.logging.configuration.api_logging_configuration import RequestLoggingConfiguration
68
+ from twilioaccounts.logging.configuration.api_logging_configuration import ResponseLoggingConfiguration
69
+ from twilioaccounts.twilioaccounts_client import TwilioaccountsClient
70
+
71
+ client = TwilioaccountsClient(
72
+ basic_auth_credentials=BasicAuthCredentials(
73
+ username='BasicAuthUserName',
74
+ password='BasicAuthPassword'
75
+ ),
76
+ environment=Environment.PRODUCTION,
77
+ logging_configuration=LoggingConfiguration(
78
+ log_level=logging.INFO,
79
+ request_logging_config=RequestLoggingConfiguration(
80
+ log_body=True
81
+ ),
82
+ response_logging_config=ResponseLoggingConfiguration(
83
+ log_headers=True
84
+ )
85
+ )
86
+ )
87
+ ```
88
+
89
+ ### Environment-Based Client Initialization
90
+
91
+ ```python
92
+ from twilioaccounts.twilioaccounts_client import TwilioaccountsClient
93
+
94
+ # Specify the path to your .env file if it’s located outside the project’s root directory.
95
+ client = TwilioaccountsClient.from_environment(dotenv_path='/path/to/.env')
96
+ ```
97
+
98
+ See the [Environment-Based Client Initialization](https://www.github.com/sdks-io/twilio-api-sdk-python-sdk/tree/1.0.0/doc/environment-based-client-initialization.md) section for details.
99
+
100
+ ## Authorization
101
+
102
+ This API uses the following authentication schemes.
103
+
104
+ * [`accountSid_authToken (Basic Authentication)`](https://www.github.com/sdks-io/twilio-api-sdk-python-sdk/tree/1.0.0/doc/auth/basic-authentication.md)
105
+
106
+ ## List of APIs
107
+
108
+ * [Accounts V1 Auth Token Promotion](https://www.github.com/sdks-io/twilio-api-sdk-python-sdk/tree/1.0.0/doc/controllers/accounts-v1-auth-token-promotion.md)
109
+ * [Accounts V1 Aws](https://www.github.com/sdks-io/twilio-api-sdk-python-sdk/tree/1.0.0/doc/controllers/accounts-v1-aws.md)
110
+ * [Accounts V1 Bulk Consents](https://www.github.com/sdks-io/twilio-api-sdk-python-sdk/tree/1.0.0/doc/controllers/accounts-v1-bulk-consents.md)
111
+ * [Accounts V1 Bulk Contacts](https://www.github.com/sdks-io/twilio-api-sdk-python-sdk/tree/1.0.0/doc/controllers/accounts-v1-bulk-contacts.md)
112
+ * [Accounts V1 Messaging Geopermissions](https://www.github.com/sdks-io/twilio-api-sdk-python-sdk/tree/1.0.0/doc/controllers/accounts-v1-messaging-geopermissions.md)
113
+ * [Accounts V1 Public Key](https://www.github.com/sdks-io/twilio-api-sdk-python-sdk/tree/1.0.0/doc/controllers/accounts-v1-public-key.md)
114
+ * [Accounts V1 Safelist](https://www.github.com/sdks-io/twilio-api-sdk-python-sdk/tree/1.0.0/doc/controllers/accounts-v1-safelist.md)
115
+ * [Accounts V1 Secondary Auth Token](https://www.github.com/sdks-io/twilio-api-sdk-python-sdk/tree/1.0.0/doc/controllers/accounts-v1-secondary-auth-token.md)
116
+
117
+ ## SDK Infrastructure
118
+
119
+ ### Configuration
120
+
121
+ * [ProxySettings](https://www.github.com/sdks-io/twilio-api-sdk-python-sdk/tree/1.0.0/doc/proxy-settings.md)
122
+ * [Environment-Based Client Initialization](https://www.github.com/sdks-io/twilio-api-sdk-python-sdk/tree/1.0.0/doc/environment-based-client-initialization.md)
123
+ * [AbstractLogger](https://www.github.com/sdks-io/twilio-api-sdk-python-sdk/tree/1.0.0/doc/abstract-logger.md)
124
+ * [LoggingConfiguration](https://www.github.com/sdks-io/twilio-api-sdk-python-sdk/tree/1.0.0/doc/logging-configuration.md)
125
+ * [RequestLoggingConfiguration](https://www.github.com/sdks-io/twilio-api-sdk-python-sdk/tree/1.0.0/doc/request-logging-configuration.md)
126
+ * [ResponseLoggingConfiguration](https://www.github.com/sdks-io/twilio-api-sdk-python-sdk/tree/1.0.0/doc/response-logging-configuration.md)
127
+
128
+ ### HTTP
129
+
130
+ * [HttpResponse](https://www.github.com/sdks-io/twilio-api-sdk-python-sdk/tree/1.0.0/doc/http-response.md)
131
+ * [HttpRequest](https://www.github.com/sdks-io/twilio-api-sdk-python-sdk/tree/1.0.0/doc/http-request.md)
132
+
133
+ ### Utilities
134
+
135
+ * [ApiResponse](https://www.github.com/sdks-io/twilio-api-sdk-python-sdk/tree/1.0.0/doc/api-response.md)
136
+ * [ApiHelper](https://www.github.com/sdks-io/twilio-api-sdk-python-sdk/tree/1.0.0/doc/api-helper.md)
137
+ * [HttpDateTime](https://www.github.com/sdks-io/twilio-api-sdk-python-sdk/tree/1.0.0/doc/http-date-time.md)
138
+ * [RFC3339DateTime](https://www.github.com/sdks-io/twilio-api-sdk-python-sdk/tree/1.0.0/doc/rfc3339-date-time.md)
139
+ * [UnixDateTime](https://www.github.com/sdks-io/twilio-api-sdk-python-sdk/tree/1.0.0/doc/unix-date-time.md)
140
+
@@ -0,0 +1,123 @@
1
+
2
+ # Getting Started with Twilio - Accounts
3
+
4
+ ## Introduction
5
+
6
+ This is the public Twilio REST API.
7
+
8
+ ## Install the Package
9
+
10
+ The package is compatible with Python versions `3.7+`.
11
+ Install the package from PyPi using the following pip command:
12
+
13
+ ```bash
14
+ pip install twilio-api-sdk-sdk==1.0.0
15
+ ```
16
+
17
+ You can also view the package at:
18
+ https://pypi.python.org/pypi/twilio-api-sdk-sdk/1.0.0
19
+
20
+ ## Initialize the API Client
21
+
22
+ **_Note:_** Documentation for the client can be found [here.](https://www.github.com/sdks-io/twilio-api-sdk-python-sdk/tree/1.0.0/doc/client.md)
23
+
24
+ The following parameters are configurable for the API Client:
25
+
26
+ | Parameter | Type | Description |
27
+ | --- | --- | --- |
28
+ | http_client_instance | `Union[Session, HttpClientProvider]` | The Http Client passed from the sdk user for making requests |
29
+ | override_http_client_configuration | `bool` | The value which determines to override properties of the passed Http Client from the sdk user |
30
+ | http_call_back | `HttpCallBack` | The callback value that is invoked before and after an HTTP call is made to an endpoint |
31
+ | timeout | `float` | The value to use for connection timeout. <br> **Default: 30** |
32
+ | max_retries | `int` | The number of times to retry an endpoint call if it fails. <br> **Default: 0** |
33
+ | backoff_factor | `float` | A backoff factor to apply between attempts after the second try. <br> **Default: 2** |
34
+ | retry_statuses | `Array of int` | The http statuses on which retry is to be done. <br> **Default: [408, 413, 429, 500, 502, 503, 504, 521, 522, 524]** |
35
+ | retry_methods | `Array of string` | The http methods on which retry is to be done. <br> **Default: ["GET", "PUT"]** |
36
+ | proxy_settings | [`ProxySettings`](https://www.github.com/sdks-io/twilio-api-sdk-python-sdk/tree/1.0.0/doc/proxy-settings.md) | Optional proxy configuration to route HTTP requests through a proxy server. |
37
+ | logging_configuration | [`LoggingConfiguration`](https://www.github.com/sdks-io/twilio-api-sdk-python-sdk/tree/1.0.0/doc/logging-configuration.md) | The SDK logging configuration for API calls |
38
+ | basic_auth_credentials | [`BasicAuthCredentials`](https://www.github.com/sdks-io/twilio-api-sdk-python-sdk/tree/1.0.0/doc/auth/basic-authentication.md) | The credential object for Basic Authentication |
39
+
40
+ The API client can be initialized as follows:
41
+
42
+ ### Code-Based Client Initialization
43
+
44
+ ```python
45
+ import logging
46
+
47
+ from twilioaccounts.configuration import Environment
48
+ from twilioaccounts.http.auth.basic_auth import BasicAuthCredentials
49
+ from twilioaccounts.logging.configuration.api_logging_configuration import LoggingConfiguration
50
+ from twilioaccounts.logging.configuration.api_logging_configuration import RequestLoggingConfiguration
51
+ from twilioaccounts.logging.configuration.api_logging_configuration import ResponseLoggingConfiguration
52
+ from twilioaccounts.twilioaccounts_client import TwilioaccountsClient
53
+
54
+ client = TwilioaccountsClient(
55
+ basic_auth_credentials=BasicAuthCredentials(
56
+ username='BasicAuthUserName',
57
+ password='BasicAuthPassword'
58
+ ),
59
+ environment=Environment.PRODUCTION,
60
+ logging_configuration=LoggingConfiguration(
61
+ log_level=logging.INFO,
62
+ request_logging_config=RequestLoggingConfiguration(
63
+ log_body=True
64
+ ),
65
+ response_logging_config=ResponseLoggingConfiguration(
66
+ log_headers=True
67
+ )
68
+ )
69
+ )
70
+ ```
71
+
72
+ ### Environment-Based Client Initialization
73
+
74
+ ```python
75
+ from twilioaccounts.twilioaccounts_client import TwilioaccountsClient
76
+
77
+ # Specify the path to your .env file if it’s located outside the project’s root directory.
78
+ client = TwilioaccountsClient.from_environment(dotenv_path='/path/to/.env')
79
+ ```
80
+
81
+ See the [Environment-Based Client Initialization](https://www.github.com/sdks-io/twilio-api-sdk-python-sdk/tree/1.0.0/doc/environment-based-client-initialization.md) section for details.
82
+
83
+ ## Authorization
84
+
85
+ This API uses the following authentication schemes.
86
+
87
+ * [`accountSid_authToken (Basic Authentication)`](https://www.github.com/sdks-io/twilio-api-sdk-python-sdk/tree/1.0.0/doc/auth/basic-authentication.md)
88
+
89
+ ## List of APIs
90
+
91
+ * [Accounts V1 Auth Token Promotion](https://www.github.com/sdks-io/twilio-api-sdk-python-sdk/tree/1.0.0/doc/controllers/accounts-v1-auth-token-promotion.md)
92
+ * [Accounts V1 Aws](https://www.github.com/sdks-io/twilio-api-sdk-python-sdk/tree/1.0.0/doc/controllers/accounts-v1-aws.md)
93
+ * [Accounts V1 Bulk Consents](https://www.github.com/sdks-io/twilio-api-sdk-python-sdk/tree/1.0.0/doc/controllers/accounts-v1-bulk-consents.md)
94
+ * [Accounts V1 Bulk Contacts](https://www.github.com/sdks-io/twilio-api-sdk-python-sdk/tree/1.0.0/doc/controllers/accounts-v1-bulk-contacts.md)
95
+ * [Accounts V1 Messaging Geopermissions](https://www.github.com/sdks-io/twilio-api-sdk-python-sdk/tree/1.0.0/doc/controllers/accounts-v1-messaging-geopermissions.md)
96
+ * [Accounts V1 Public Key](https://www.github.com/sdks-io/twilio-api-sdk-python-sdk/tree/1.0.0/doc/controllers/accounts-v1-public-key.md)
97
+ * [Accounts V1 Safelist](https://www.github.com/sdks-io/twilio-api-sdk-python-sdk/tree/1.0.0/doc/controllers/accounts-v1-safelist.md)
98
+ * [Accounts V1 Secondary Auth Token](https://www.github.com/sdks-io/twilio-api-sdk-python-sdk/tree/1.0.0/doc/controllers/accounts-v1-secondary-auth-token.md)
99
+
100
+ ## SDK Infrastructure
101
+
102
+ ### Configuration
103
+
104
+ * [ProxySettings](https://www.github.com/sdks-io/twilio-api-sdk-python-sdk/tree/1.0.0/doc/proxy-settings.md)
105
+ * [Environment-Based Client Initialization](https://www.github.com/sdks-io/twilio-api-sdk-python-sdk/tree/1.0.0/doc/environment-based-client-initialization.md)
106
+ * [AbstractLogger](https://www.github.com/sdks-io/twilio-api-sdk-python-sdk/tree/1.0.0/doc/abstract-logger.md)
107
+ * [LoggingConfiguration](https://www.github.com/sdks-io/twilio-api-sdk-python-sdk/tree/1.0.0/doc/logging-configuration.md)
108
+ * [RequestLoggingConfiguration](https://www.github.com/sdks-io/twilio-api-sdk-python-sdk/tree/1.0.0/doc/request-logging-configuration.md)
109
+ * [ResponseLoggingConfiguration](https://www.github.com/sdks-io/twilio-api-sdk-python-sdk/tree/1.0.0/doc/response-logging-configuration.md)
110
+
111
+ ### HTTP
112
+
113
+ * [HttpResponse](https://www.github.com/sdks-io/twilio-api-sdk-python-sdk/tree/1.0.0/doc/http-response.md)
114
+ * [HttpRequest](https://www.github.com/sdks-io/twilio-api-sdk-python-sdk/tree/1.0.0/doc/http-request.md)
115
+
116
+ ### Utilities
117
+
118
+ * [ApiResponse](https://www.github.com/sdks-io/twilio-api-sdk-python-sdk/tree/1.0.0/doc/api-response.md)
119
+ * [ApiHelper](https://www.github.com/sdks-io/twilio-api-sdk-python-sdk/tree/1.0.0/doc/api-helper.md)
120
+ * [HttpDateTime](https://www.github.com/sdks-io/twilio-api-sdk-python-sdk/tree/1.0.0/doc/http-date-time.md)
121
+ * [RFC3339DateTime](https://www.github.com/sdks-io/twilio-api-sdk-python-sdk/tree/1.0.0/doc/rfc3339-date-time.md)
122
+ * [UnixDateTime](https://www.github.com/sdks-io/twilio-api-sdk-python-sdk/tree/1.0.0/doc/unix-date-time.md)
123
+
@@ -0,0 +1,25 @@
1
+ [build-system]
2
+ requires = ["setuptools>=61.0"]
3
+ build-backend = "setuptools.build_meta"
4
+ [project]
5
+ name = "twilio-api-sdk-sdk"
6
+ description = "twilio api sdk"
7
+ version = "1.0.0"
8
+ readme = "README.md"
9
+ keywords = []
10
+ dependencies = ["apimatic-core~=0.2.0, >= 0.2.24", "apimatic-core-interfaces~=0.1.0, >= 0.1.8", "apimatic-requests-client-adapter~=0.1.0, >= 0.1.10", "python-dotenv>=0.21, <2.0"]
11
+ classifiers = []
12
+ requires-python = ">=3.7"
13
+ [[project.authors]]
14
+ name = "Muhammad Rafay"
15
+ email = "muhammad.rafay@apimatic.io"
16
+
17
+ [project.urls]
18
+ Documentation = "https://www.twilio.com/en-us"
19
+ [project.optional-dependencies]
20
+ testutils = ["pytest>=7.2.2"]
21
+ [tool]
22
+ [tool.setuptools]
23
+ [tool.setuptools.packages]
24
+ [tool.setuptools.packages.find]
25
+ exclude = ["tests", "tests.*"]
@@ -0,0 +1,8 @@
1
+ [meta-data]
2
+ license_files =
3
+ LICENSE
4
+
5
+ [egg_info]
6
+ tag_build =
7
+ tag_date = 0
8
+
@@ -0,0 +1,140 @@
1
+ Metadata-Version: 2.4
2
+ Name: twilio-api-sdk-sdk
3
+ Version: 1.0.0
4
+ Summary: twilio api sdk
5
+ Author-email: Muhammad Rafay <muhammad.rafay@apimatic.io>
6
+ Project-URL: Documentation, https://www.twilio.com/en-us
7
+ Requires-Python: >=3.7
8
+ Description-Content-Type: text/markdown
9
+ License-File: LICENSE
10
+ Requires-Dist: apimatic-core>=0.2.24,~=0.2.0
11
+ Requires-Dist: apimatic-core-interfaces>=0.1.8,~=0.1.0
12
+ Requires-Dist: apimatic-requests-client-adapter>=0.1.10,~=0.1.0
13
+ Requires-Dist: python-dotenv<2.0,>=0.21
14
+ Provides-Extra: testutils
15
+ Requires-Dist: pytest>=7.2.2; extra == "testutils"
16
+ Dynamic: license-file
17
+
18
+
19
+ # Getting Started with Twilio - Accounts
20
+
21
+ ## Introduction
22
+
23
+ This is the public Twilio REST API.
24
+
25
+ ## Install the Package
26
+
27
+ The package is compatible with Python versions `3.7+`.
28
+ Install the package from PyPi using the following pip command:
29
+
30
+ ```bash
31
+ pip install twilio-api-sdk-sdk==1.0.0
32
+ ```
33
+
34
+ You can also view the package at:
35
+ https://pypi.python.org/pypi/twilio-api-sdk-sdk/1.0.0
36
+
37
+ ## Initialize the API Client
38
+
39
+ **_Note:_** Documentation for the client can be found [here.](https://www.github.com/sdks-io/twilio-api-sdk-python-sdk/tree/1.0.0/doc/client.md)
40
+
41
+ The following parameters are configurable for the API Client:
42
+
43
+ | Parameter | Type | Description |
44
+ | --- | --- | --- |
45
+ | http_client_instance | `Union[Session, HttpClientProvider]` | The Http Client passed from the sdk user for making requests |
46
+ | override_http_client_configuration | `bool` | The value which determines to override properties of the passed Http Client from the sdk user |
47
+ | http_call_back | `HttpCallBack` | The callback value that is invoked before and after an HTTP call is made to an endpoint |
48
+ | timeout | `float` | The value to use for connection timeout. <br> **Default: 30** |
49
+ | max_retries | `int` | The number of times to retry an endpoint call if it fails. <br> **Default: 0** |
50
+ | backoff_factor | `float` | A backoff factor to apply between attempts after the second try. <br> **Default: 2** |
51
+ | retry_statuses | `Array of int` | The http statuses on which retry is to be done. <br> **Default: [408, 413, 429, 500, 502, 503, 504, 521, 522, 524]** |
52
+ | retry_methods | `Array of string` | The http methods on which retry is to be done. <br> **Default: ["GET", "PUT"]** |
53
+ | proxy_settings | [`ProxySettings`](https://www.github.com/sdks-io/twilio-api-sdk-python-sdk/tree/1.0.0/doc/proxy-settings.md) | Optional proxy configuration to route HTTP requests through a proxy server. |
54
+ | logging_configuration | [`LoggingConfiguration`](https://www.github.com/sdks-io/twilio-api-sdk-python-sdk/tree/1.0.0/doc/logging-configuration.md) | The SDK logging configuration for API calls |
55
+ | basic_auth_credentials | [`BasicAuthCredentials`](https://www.github.com/sdks-io/twilio-api-sdk-python-sdk/tree/1.0.0/doc/auth/basic-authentication.md) | The credential object for Basic Authentication |
56
+
57
+ The API client can be initialized as follows:
58
+
59
+ ### Code-Based Client Initialization
60
+
61
+ ```python
62
+ import logging
63
+
64
+ from twilioaccounts.configuration import Environment
65
+ from twilioaccounts.http.auth.basic_auth import BasicAuthCredentials
66
+ from twilioaccounts.logging.configuration.api_logging_configuration import LoggingConfiguration
67
+ from twilioaccounts.logging.configuration.api_logging_configuration import RequestLoggingConfiguration
68
+ from twilioaccounts.logging.configuration.api_logging_configuration import ResponseLoggingConfiguration
69
+ from twilioaccounts.twilioaccounts_client import TwilioaccountsClient
70
+
71
+ client = TwilioaccountsClient(
72
+ basic_auth_credentials=BasicAuthCredentials(
73
+ username='BasicAuthUserName',
74
+ password='BasicAuthPassword'
75
+ ),
76
+ environment=Environment.PRODUCTION,
77
+ logging_configuration=LoggingConfiguration(
78
+ log_level=logging.INFO,
79
+ request_logging_config=RequestLoggingConfiguration(
80
+ log_body=True
81
+ ),
82
+ response_logging_config=ResponseLoggingConfiguration(
83
+ log_headers=True
84
+ )
85
+ )
86
+ )
87
+ ```
88
+
89
+ ### Environment-Based Client Initialization
90
+
91
+ ```python
92
+ from twilioaccounts.twilioaccounts_client import TwilioaccountsClient
93
+
94
+ # Specify the path to your .env file if it’s located outside the project’s root directory.
95
+ client = TwilioaccountsClient.from_environment(dotenv_path='/path/to/.env')
96
+ ```
97
+
98
+ See the [Environment-Based Client Initialization](https://www.github.com/sdks-io/twilio-api-sdk-python-sdk/tree/1.0.0/doc/environment-based-client-initialization.md) section for details.
99
+
100
+ ## Authorization
101
+
102
+ This API uses the following authentication schemes.
103
+
104
+ * [`accountSid_authToken (Basic Authentication)`](https://www.github.com/sdks-io/twilio-api-sdk-python-sdk/tree/1.0.0/doc/auth/basic-authentication.md)
105
+
106
+ ## List of APIs
107
+
108
+ * [Accounts V1 Auth Token Promotion](https://www.github.com/sdks-io/twilio-api-sdk-python-sdk/tree/1.0.0/doc/controllers/accounts-v1-auth-token-promotion.md)
109
+ * [Accounts V1 Aws](https://www.github.com/sdks-io/twilio-api-sdk-python-sdk/tree/1.0.0/doc/controllers/accounts-v1-aws.md)
110
+ * [Accounts V1 Bulk Consents](https://www.github.com/sdks-io/twilio-api-sdk-python-sdk/tree/1.0.0/doc/controllers/accounts-v1-bulk-consents.md)
111
+ * [Accounts V1 Bulk Contacts](https://www.github.com/sdks-io/twilio-api-sdk-python-sdk/tree/1.0.0/doc/controllers/accounts-v1-bulk-contacts.md)
112
+ * [Accounts V1 Messaging Geopermissions](https://www.github.com/sdks-io/twilio-api-sdk-python-sdk/tree/1.0.0/doc/controllers/accounts-v1-messaging-geopermissions.md)
113
+ * [Accounts V1 Public Key](https://www.github.com/sdks-io/twilio-api-sdk-python-sdk/tree/1.0.0/doc/controllers/accounts-v1-public-key.md)
114
+ * [Accounts V1 Safelist](https://www.github.com/sdks-io/twilio-api-sdk-python-sdk/tree/1.0.0/doc/controllers/accounts-v1-safelist.md)
115
+ * [Accounts V1 Secondary Auth Token](https://www.github.com/sdks-io/twilio-api-sdk-python-sdk/tree/1.0.0/doc/controllers/accounts-v1-secondary-auth-token.md)
116
+
117
+ ## SDK Infrastructure
118
+
119
+ ### Configuration
120
+
121
+ * [ProxySettings](https://www.github.com/sdks-io/twilio-api-sdk-python-sdk/tree/1.0.0/doc/proxy-settings.md)
122
+ * [Environment-Based Client Initialization](https://www.github.com/sdks-io/twilio-api-sdk-python-sdk/tree/1.0.0/doc/environment-based-client-initialization.md)
123
+ * [AbstractLogger](https://www.github.com/sdks-io/twilio-api-sdk-python-sdk/tree/1.0.0/doc/abstract-logger.md)
124
+ * [LoggingConfiguration](https://www.github.com/sdks-io/twilio-api-sdk-python-sdk/tree/1.0.0/doc/logging-configuration.md)
125
+ * [RequestLoggingConfiguration](https://www.github.com/sdks-io/twilio-api-sdk-python-sdk/tree/1.0.0/doc/request-logging-configuration.md)
126
+ * [ResponseLoggingConfiguration](https://www.github.com/sdks-io/twilio-api-sdk-python-sdk/tree/1.0.0/doc/response-logging-configuration.md)
127
+
128
+ ### HTTP
129
+
130
+ * [HttpResponse](https://www.github.com/sdks-io/twilio-api-sdk-python-sdk/tree/1.0.0/doc/http-response.md)
131
+ * [HttpRequest](https://www.github.com/sdks-io/twilio-api-sdk-python-sdk/tree/1.0.0/doc/http-request.md)
132
+
133
+ ### Utilities
134
+
135
+ * [ApiResponse](https://www.github.com/sdks-io/twilio-api-sdk-python-sdk/tree/1.0.0/doc/api-response.md)
136
+ * [ApiHelper](https://www.github.com/sdks-io/twilio-api-sdk-python-sdk/tree/1.0.0/doc/api-helper.md)
137
+ * [HttpDateTime](https://www.github.com/sdks-io/twilio-api-sdk-python-sdk/tree/1.0.0/doc/http-date-time.md)
138
+ * [RFC3339DateTime](https://www.github.com/sdks-io/twilio-api-sdk-python-sdk/tree/1.0.0/doc/rfc3339-date-time.md)
139
+ * [UnixDateTime](https://www.github.com/sdks-io/twilio-api-sdk-python-sdk/tree/1.0.0/doc/unix-date-time.md)
140
+
@@ -0,0 +1,54 @@
1
+ LICENSE
2
+ MANIFEST.in
3
+ README.md
4
+ pyproject.toml
5
+ setup.cfg
6
+ twilio_api_sdk_sdk.egg-info/PKG-INFO
7
+ twilio_api_sdk_sdk.egg-info/SOURCES.txt
8
+ twilio_api_sdk_sdk.egg-info/dependency_links.txt
9
+ twilio_api_sdk_sdk.egg-info/requires.txt
10
+ twilio_api_sdk_sdk.egg-info/top_level.txt
11
+ twilioaccounts/__init__.py
12
+ twilioaccounts/api_helper.py
13
+ twilioaccounts/configuration.py
14
+ twilioaccounts/twilioaccounts_client.py
15
+ twilioaccounts/apis/__init__.py
16
+ twilioaccounts/apis/accounts_v_1_auth_token_promotion_api.py
17
+ twilioaccounts/apis/accounts_v_1_aws_api.py
18
+ twilioaccounts/apis/accounts_v_1_bulk_consents_api.py
19
+ twilioaccounts/apis/accounts_v_1_bulk_contacts_api.py
20
+ twilioaccounts/apis/accounts_v_1_messaging_geopermissions_api.py
21
+ twilioaccounts/apis/accounts_v_1_public_key_api.py
22
+ twilioaccounts/apis/accounts_v_1_safelist_api.py
23
+ twilioaccounts/apis/accounts_v_1_secondary_auth_token_api.py
24
+ twilioaccounts/apis/base_api.py
25
+ twilioaccounts/exceptions/__init__.py
26
+ twilioaccounts/exceptions/api_exception.py
27
+ twilioaccounts/http/__init__.py
28
+ twilioaccounts/http/api_response.py
29
+ twilioaccounts/http/http_call_back.py
30
+ twilioaccounts/http/http_client_provider.py
31
+ twilioaccounts/http/http_method_enum.py
32
+ twilioaccounts/http/http_request.py
33
+ twilioaccounts/http/http_response.py
34
+ twilioaccounts/http/proxy_settings.py
35
+ twilioaccounts/http/auth/__init__.py
36
+ twilioaccounts/http/auth/basic_auth.py
37
+ twilioaccounts/logging/__init__.py
38
+ twilioaccounts/logging/sdk_logger.py
39
+ twilioaccounts/logging/configuration/__init__.py
40
+ twilioaccounts/logging/configuration/api_logging_configuration.py
41
+ twilioaccounts/models/__init__.py
42
+ twilioaccounts/models/accounts_v_1_auth_token_promotion.py
43
+ twilioaccounts/models/accounts_v_1_bulk_consents.py
44
+ twilioaccounts/models/accounts_v_1_bulk_contacts.py
45
+ twilioaccounts/models/accounts_v_1_credential_credential_aws.py
46
+ twilioaccounts/models/accounts_v_1_credential_credential_public_key.py
47
+ twilioaccounts/models/accounts_v_1_messaging_geopermissions.py
48
+ twilioaccounts/models/accounts_v_1_safelist.py
49
+ twilioaccounts/models/accounts_v_1_secondary_auth_token.py
50
+ twilioaccounts/models/list_credential_aws_response.py
51
+ twilioaccounts/models/list_credential_public_key_response.py
52
+ twilioaccounts/models/meta.py
53
+ twilioaccounts/utilities/__init__.py
54
+ twilioaccounts/utilities/file_wrapper.py
@@ -0,0 +1,7 @@
1
+ apimatic-core>=0.2.24,~=0.2.0
2
+ apimatic-core-interfaces>=0.1.8,~=0.1.0
3
+ apimatic-requests-client-adapter>=0.1.10,~=0.1.0
4
+ python-dotenv<2.0,>=0.21
5
+
6
+ [testutils]
7
+ pytest>=7.2.2
@@ -0,0 +1,3 @@
1
+ dist
2
+ doc
3
+ twilioaccounts
@@ -0,0 +1,13 @@
1
+ # ruff: noqa: D104 | Missing docstring in public package
2
+ # ruff: noqa: RUF022 | `__all__` is not sorted
3
+ __all__ = [
4
+ "api_helper",
5
+ "apis",
6
+ "configuration",
7
+ "exceptions",
8
+ "http",
9
+ "logging",
10
+ "models",
11
+ "twilioaccounts_client",
12
+ "utilities",
13
+ ]
@@ -0,0 +1,19 @@
1
+ """
2
+ twilioaccounts
3
+
4
+ This file was automatically generated by APIMATIC v3.0 (
5
+ https://www.apimatic.io ).
6
+ """
7
+
8
+ from apimatic_core.utilities.api_helper import ApiHelper as CoreApiHelper
9
+
10
+
11
+ class APIHelper(CoreApiHelper):
12
+ """
13
+ A Helper Class for various functions associated with API Calls.
14
+
15
+ This class contains static methods for operations that need to be
16
+ performed during API requests. All of the methods inside this class are
17
+ static methods, there is no need to ever initialise an instance of this
18
+ class.
19
+ """
@@ -0,0 +1,13 @@
1
+ # ruff: noqa: D104 | Missing docstring in public package
2
+ # ruff: noqa: RUF022 | `__all__` is not sorted
3
+ __all__ = [
4
+ "accounts_v_1_auth_token_promotion_api",
5
+ "accounts_v_1_aws_api",
6
+ "accounts_v_1_bulk_consents_api",
7
+ "accounts_v_1_bulk_contacts_api",
8
+ "accounts_v_1_messaging_geopermissions_api",
9
+ "accounts_v_1_public_key_api",
10
+ "accounts_v_1_safelist_api",
11
+ "accounts_v_1_secondary_auth_token_api",
12
+ "base_api",
13
+ ]
@@ -0,0 +1,62 @@
1
+ """twilioaccounts.
2
+
3
+ This file was automatically generated by APIMATIC v3.0 ( https://www.apimatic.io ).
4
+ """
5
+
6
+ # ruff: noqa: D410, E501, E101, D206
7
+ from apimatic_core.authentication.multiple.single_auth import (
8
+ Single,
9
+ )
10
+ from apimatic_core.request_builder import RequestBuilder
11
+ from apimatic_core.response_handler import ResponseHandler
12
+ from apimatic_core.types.parameter import Parameter
13
+
14
+ from twilioaccounts.api_helper import APIHelper
15
+ from twilioaccounts.apis.base_api import BaseApi
16
+ from twilioaccounts.configuration import Server
17
+ from twilioaccounts.http.http_method_enum import (
18
+ HttpMethodEnum,
19
+ )
20
+ from twilioaccounts.models.accounts_v_1_auth_token_promotion import (
21
+ AccountsV1AuthTokenPromotion,
22
+ )
23
+
24
+
25
+ class AccountsV1AuthTokenPromotionApi(BaseApi):
26
+ """A Controller to access Endpoints in the twilioaccounts API."""
27
+
28
+ def __init__(self, config):
29
+ """Initialize AccountsV1AuthTokenPromotionApi object."""
30
+ super(AccountsV1AuthTokenPromotionApi, self).__init__(config)
31
+
32
+ def update_auth_token_promotion(self):
33
+ """Perform a POST request to /v1/AuthTokens/Promote.
34
+
35
+ Promote the secondary Auth Token to primary. After promoting the new token,
36
+ all requests to Twilio using your old primary Auth Token will result in an
37
+ error.
38
+
39
+ Returns:
40
+ ApiResponse: An object with the response value as well as other useful
41
+ information such as status codes and headers. OK
42
+
43
+ Raises:
44
+ ApiException: When an error occurs while fetching the data from the
45
+ remote API. This exception includes the HTTP Response code, an error
46
+ message, and the HTTP body that was received in the request.
47
+
48
+ """
49
+ return super().new_api_call_builder.request(
50
+ RequestBuilder().server(Server.DEFAULT)
51
+ .path("/v1/AuthTokens/Promote")
52
+ .http_method(HttpMethodEnum.POST)
53
+ .header_param(Parameter()
54
+ .key("accept")
55
+ .value("application/json"))
56
+ .auth(Single("accountSid_authToken")),
57
+ ).response(
58
+ ResponseHandler()
59
+ .deserializer(APIHelper.json_deserialize)
60
+ .deserialize_into(AccountsV1AuthTokenPromotion.from_dictionary)
61
+ .is_api_response(True),
62
+ ).execute()