emailguard-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.
- emailguard_sdk-1.0.0/PKG-INFO +204 -0
- emailguard_sdk-1.0.0/README.md +186 -0
- emailguard_sdk-1.0.0/emailguard_sdk/__init__.py +123 -0
- emailguard_sdk-1.0.0/emailguard_sdk/api/__init__.py +12 -0
- emailguard_sdk-1.0.0/emailguard_sdk/api/billing_api.py +348 -0
- emailguard_sdk-1.0.0/emailguard_sdk/api/channels_api.py +1409 -0
- emailguard_sdk-1.0.0/emailguard_sdk/api/email_api.py +303 -0
- emailguard_sdk-1.0.0/emailguard_sdk/api/events_api.py +288 -0
- emailguard_sdk-1.0.0/emailguard_sdk/api/invites_api.py +845 -0
- emailguard_sdk-1.0.0/emailguard_sdk/api/members_api.py +866 -0
- emailguard_sdk-1.0.0/emailguard_sdk/api/rules_api.py +1142 -0
- emailguard_sdk-1.0.0/emailguard_sdk/api/teams_api.py +577 -0
- emailguard_sdk-1.0.0/emailguard_sdk/api_client.py +805 -0
- emailguard_sdk-1.0.0/emailguard_sdk/api_response.py +21 -0
- emailguard_sdk-1.0.0/emailguard_sdk/configuration.py +661 -0
- emailguard_sdk-1.0.0/emailguard_sdk/exceptions.py +219 -0
- emailguard_sdk-1.0.0/emailguard_sdk/models/__init__.py +47 -0
- emailguard_sdk-1.0.0/emailguard_sdk/models/base_response.py +91 -0
- emailguard_sdk-1.0.0/emailguard_sdk/models/billing_usage_event.py +97 -0
- emailguard_sdk-1.0.0/emailguard_sdk/models/billing_usage_item.py +107 -0
- emailguard_sdk-1.0.0/emailguard_sdk/models/billing_usage_response.py +101 -0
- emailguard_sdk-1.0.0/emailguard_sdk/models/create_notification_channel_input.py +93 -0
- emailguard_sdk-1.0.0/emailguard_sdk/models/create_notification_rule_input.py +108 -0
- emailguard_sdk-1.0.0/emailguard_sdk/models/email_detect_data.py +115 -0
- emailguard_sdk-1.0.0/emailguard_sdk/models/email_detect_response.py +97 -0
- emailguard_sdk-1.0.0/emailguard_sdk/models/get_notification_channel_response.py +97 -0
- emailguard_sdk-1.0.0/emailguard_sdk/models/get_notification_channels_response.py +101 -0
- emailguard_sdk-1.0.0/emailguard_sdk/models/get_notification_events_response.py +93 -0
- emailguard_sdk-1.0.0/emailguard_sdk/models/get_notification_rules_response.py +101 -0
- emailguard_sdk-1.0.0/emailguard_sdk/models/get_public_team_response.py +97 -0
- emailguard_sdk-1.0.0/emailguard_sdk/models/id_data_response.py +97 -0
- emailguard_sdk-1.0.0/emailguard_sdk/models/id_data_struct.py +89 -0
- emailguard_sdk-1.0.0/emailguard_sdk/models/invite_team_member_input.py +91 -0
- emailguard_sdk-1.0.0/emailguard_sdk/models/list_public_team_invites_response.py +101 -0
- emailguard_sdk-1.0.0/emailguard_sdk/models/list_public_team_members_response.py +101 -0
- emailguard_sdk-1.0.0/emailguard_sdk/models/message_response.py +91 -0
- emailguard_sdk-1.0.0/emailguard_sdk/models/notification_channel_response.py +99 -0
- emailguard_sdk-1.0.0/emailguard_sdk/models/notification_rule_channel_input.py +93 -0
- emailguard_sdk-1.0.0/emailguard_sdk/models/notification_rule_channel_response.py +99 -0
- emailguard_sdk-1.0.0/emailguard_sdk/models/notification_rule_response.py +111 -0
- emailguard_sdk-1.0.0/emailguard_sdk/models/public_team_invite_response.py +95 -0
- emailguard_sdk-1.0.0/emailguard_sdk/models/public_team_member_response.py +105 -0
- emailguard_sdk-1.0.0/emailguard_sdk/models/public_team_response.py +99 -0
- emailguard_sdk-1.0.0/emailguard_sdk/models/update_notification_channel_input.py +91 -0
- emailguard_sdk-1.0.0/emailguard_sdk/models/update_notification_rule_input.py +107 -0
- emailguard_sdk-1.0.0/emailguard_sdk/models/update_team_input.py +95 -0
- emailguard_sdk-1.0.0/emailguard_sdk/models/update_team_member_input.py +93 -0
- emailguard_sdk-1.0.0/emailguard_sdk/py.typed +0 -0
- emailguard_sdk-1.0.0/emailguard_sdk/rest.py +264 -0
- emailguard_sdk-1.0.0/emailguard_sdk.egg-info/PKG-INFO +204 -0
- emailguard_sdk-1.0.0/emailguard_sdk.egg-info/SOURCES.txt +94 -0
- emailguard_sdk-1.0.0/emailguard_sdk.egg-info/dependency_links.txt +1 -0
- emailguard_sdk-1.0.0/emailguard_sdk.egg-info/requires.txt +4 -0
- emailguard_sdk-1.0.0/emailguard_sdk.egg-info/top_level.txt +1 -0
- emailguard_sdk-1.0.0/pyproject.toml +94 -0
- emailguard_sdk-1.0.0/setup.cfg +7 -0
- emailguard_sdk-1.0.0/setup.py +48 -0
- emailguard_sdk-1.0.0/test/test_base_response.py +54 -0
- emailguard_sdk-1.0.0/test/test_billing_api.py +39 -0
- emailguard_sdk-1.0.0/test/test_billing_usage_event.py +61 -0
- emailguard_sdk-1.0.0/test/test_billing_usage_item.py +68 -0
- emailguard_sdk-1.0.0/test/test_billing_usage_response.py +70 -0
- emailguard_sdk-1.0.0/test/test_channels_api.py +67 -0
- emailguard_sdk-1.0.0/test/test_create_notification_channel_input.py +56 -0
- emailguard_sdk-1.0.0/test/test_create_notification_rule_input.py +74 -0
- emailguard_sdk-1.0.0/test/test_email_api.py +39 -0
- emailguard_sdk-1.0.0/test/test_email_detect_data.py +65 -0
- emailguard_sdk-1.0.0/test/test_email_detect_response.py +69 -0
- emailguard_sdk-1.0.0/test/test_events_api.py +39 -0
- emailguard_sdk-1.0.0/test/test_get_notification_channel_response.py +61 -0
- emailguard_sdk-1.0.0/test/test_get_notification_channels_response.py +63 -0
- emailguard_sdk-1.0.0/test/test_get_notification_events_response.py +57 -0
- emailguard_sdk-1.0.0/test/test_get_notification_rules_response.py +75 -0
- emailguard_sdk-1.0.0/test/test_get_public_team_response.py +61 -0
- emailguard_sdk-1.0.0/test/test_id_data_response.py +56 -0
- emailguard_sdk-1.0.0/test/test_id_data_struct.py +52 -0
- emailguard_sdk-1.0.0/test/test_invite_team_member_input.py +55 -0
- emailguard_sdk-1.0.0/test/test_invites_api.py +53 -0
- emailguard_sdk-1.0.0/test/test_list_public_team_invites_response.py +61 -0
- emailguard_sdk-1.0.0/test/test_list_public_team_members_response.py +66 -0
- emailguard_sdk-1.0.0/test/test_members_api.py +53 -0
- emailguard_sdk-1.0.0/test/test_message_response.py +54 -0
- emailguard_sdk-1.0.0/test/test_notification_channel_response.py +57 -0
- emailguard_sdk-1.0.0/test/test_notification_rule_channel_input.py +54 -0
- emailguard_sdk-1.0.0/test/test_notification_rule_channel_response.py +57 -0
- emailguard_sdk-1.0.0/test/test_notification_rule_response.py +69 -0
- emailguard_sdk-1.0.0/test/test_public_team_invite_response.py +59 -0
- emailguard_sdk-1.0.0/test/test_public_team_member_response.py +67 -0
- emailguard_sdk-1.0.0/test/test_public_team_response.py +57 -0
- emailguard_sdk-1.0.0/test/test_rules_api.py +60 -0
- emailguard_sdk-1.0.0/test/test_teams_api.py +46 -0
- emailguard_sdk-1.0.0/test/test_update_notification_channel_input.py +53 -0
- emailguard_sdk-1.0.0/test/test_update_notification_rule_input.py +64 -0
- emailguard_sdk-1.0.0/test/test_update_team_input.py +56 -0
- emailguard_sdk-1.0.0/test/test_update_team_member_input.py +55 -0
|
@@ -0,0 +1,204 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: emailguard_sdk
|
|
3
|
+
Version: 1.0.0
|
|
4
|
+
Summary: EmailGuard Public API
|
|
5
|
+
Home-page: https://github.com/emailguard/emailguard-python
|
|
6
|
+
Author: EmailGuard
|
|
7
|
+
Author-email: EmailGuard <dev@emailguard.co>
|
|
8
|
+
Project-URL: Repository, https://github.com/emailguard/emailguard-python
|
|
9
|
+
Keywords: OpenAPI,OpenAPI-Generator,EmailGuard Public API
|
|
10
|
+
Requires-Python: >=3.9
|
|
11
|
+
Description-Content-Type: text/markdown
|
|
12
|
+
Requires-Dist: urllib3<3.0.0,>=2.1.0
|
|
13
|
+
Requires-Dist: python-dateutil>=2.8.2
|
|
14
|
+
Requires-Dist: pydantic>=2.11
|
|
15
|
+
Requires-Dist: typing-extensions>=4.7.1
|
|
16
|
+
Dynamic: author
|
|
17
|
+
Dynamic: home-page
|
|
18
|
+
|
|
19
|
+
# emailguard-sdk
|
|
20
|
+
Team-scoped REST API at /api/v1. Authenticate with `Authorization: Bearer egsk_live_...` or `X-API-Key`. Forks may register custom routes under /api/v1/tools/* (requires `tools:read` / `tools:write` scopes). Async tool jobs return a `job_id` — poll `GET .../{jobId}/results` until complete. See /docs/api-reference.
|
|
21
|
+
|
|
22
|
+
This Python package is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project:
|
|
23
|
+
|
|
24
|
+
- API version: 1.0
|
|
25
|
+
- Package version: 1.0.0
|
|
26
|
+
- Generator version: 7.23.0
|
|
27
|
+
- Build package: org.openapitools.codegen.languages.PythonClientCodegen
|
|
28
|
+
For more information, please visit [https://emailguard.co](https://emailguard.co)
|
|
29
|
+
|
|
30
|
+
## Requirements.
|
|
31
|
+
|
|
32
|
+
Python 3.10+
|
|
33
|
+
|
|
34
|
+
## Installation & Usage
|
|
35
|
+
### pip install
|
|
36
|
+
|
|
37
|
+
If the python package is hosted on a repository, you can install directly using:
|
|
38
|
+
|
|
39
|
+
```sh
|
|
40
|
+
pip install git+https://github.com/emailguard/emailguard-python.git
|
|
41
|
+
```
|
|
42
|
+
(you may need to run `pip` with root permission: `sudo pip install git+https://github.com/emailguard/emailguard-python.git`)
|
|
43
|
+
|
|
44
|
+
Then import the package:
|
|
45
|
+
```python
|
|
46
|
+
import emailguard_sdk
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
### Setuptools
|
|
50
|
+
|
|
51
|
+
Install via [Setuptools](http://pypi.python.org/pypi/setuptools).
|
|
52
|
+
|
|
53
|
+
```sh
|
|
54
|
+
python setup.py install --user
|
|
55
|
+
```
|
|
56
|
+
(or `sudo python setup.py install` to install the package for all users)
|
|
57
|
+
|
|
58
|
+
Then import the package:
|
|
59
|
+
```python
|
|
60
|
+
import emailguard_sdk
|
|
61
|
+
```
|
|
62
|
+
|
|
63
|
+
### Tests
|
|
64
|
+
|
|
65
|
+
Execute `pytest` to run the tests.
|
|
66
|
+
|
|
67
|
+
## Getting Started
|
|
68
|
+
|
|
69
|
+
Please follow the [installation procedure](#installation--usage) and then run the following:
|
|
70
|
+
|
|
71
|
+
```python
|
|
72
|
+
|
|
73
|
+
import emailguard_sdk
|
|
74
|
+
from emailguard_sdk.rest import ApiException
|
|
75
|
+
from pprint import pprint
|
|
76
|
+
|
|
77
|
+
# Defining the host is optional and defaults to http://api.emailguard.co
|
|
78
|
+
# See configuration.py for a list of all supported configuration parameters.
|
|
79
|
+
configuration = emailguard_sdk.Configuration(
|
|
80
|
+
host = "http://api.emailguard.co"
|
|
81
|
+
)
|
|
82
|
+
|
|
83
|
+
# The client must configure the authentication and authorization parameters
|
|
84
|
+
# in accordance with the API server security policy.
|
|
85
|
+
# Examples for each auth method are provided below, use the example that
|
|
86
|
+
# satisfies your auth use case.
|
|
87
|
+
|
|
88
|
+
# Configure API key authorization: ApiKeyAuth
|
|
89
|
+
configuration.api_key['ApiKeyAuth'] = os.environ["API_KEY"]
|
|
90
|
+
|
|
91
|
+
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
|
|
92
|
+
# configuration.api_key_prefix['ApiKeyAuth'] = 'Bearer'
|
|
93
|
+
|
|
94
|
+
|
|
95
|
+
# Enter a context with an instance of the API client
|
|
96
|
+
with emailguard_sdk.ApiClient(configuration) as api_client:
|
|
97
|
+
# Create an instance of the API class
|
|
98
|
+
api_instance = emailguard_sdk.BillingApi(api_client)
|
|
99
|
+
range = 'range_example' # str | Period selector: current, previous, or custom (optional)
|
|
100
|
+
start = 'start_example' # str | Custom range start (RFC3339 or YYYY-MM-DD); required when range=custom (optional)
|
|
101
|
+
end = 'end_example' # str | Custom range end (RFC3339 or YYYY-MM-DD); required when range=custom (optional)
|
|
102
|
+
|
|
103
|
+
try:
|
|
104
|
+
# Get billing usage
|
|
105
|
+
api_response = api_instance.api_v1_team_billing_usage_get(range=range, start=start, end=end)
|
|
106
|
+
print("The response of BillingApi->api_v1_team_billing_usage_get:\n")
|
|
107
|
+
pprint(api_response)
|
|
108
|
+
except ApiException as e:
|
|
109
|
+
print("Exception when calling BillingApi->api_v1_team_billing_usage_get: %s\n" % e)
|
|
110
|
+
|
|
111
|
+
```
|
|
112
|
+
|
|
113
|
+
## Documentation for API Endpoints
|
|
114
|
+
|
|
115
|
+
All URIs are relative to *http://api.emailguard.co*
|
|
116
|
+
|
|
117
|
+
Class | Method | HTTP request | Description
|
|
118
|
+
------------ | ------------- | ------------- | -------------
|
|
119
|
+
*BillingApi* | [**api_v1_team_billing_usage_get**](docs/BillingApi.md#api_v1_team_billing_usage_get) | **GET** /api/v1/team/billing/usage | Get billing usage
|
|
120
|
+
*ChannelsApi* | [**api_v1_team_notifications_channels_channel_id_delete**](docs/ChannelsApi.md#api_v1_team_notifications_channels_channel_id_delete) | **DELETE** /api/v1/team/notifications/channels/{channelId} | Delete notification channel
|
|
121
|
+
*ChannelsApi* | [**api_v1_team_notifications_channels_channel_id_put**](docs/ChannelsApi.md#api_v1_team_notifications_channels_channel_id_put) | **PUT** /api/v1/team/notifications/channels/{channelId} | Update notification channel
|
|
122
|
+
*ChannelsApi* | [**api_v1_team_notifications_channels_channel_id_test_post**](docs/ChannelsApi.md#api_v1_team_notifications_channels_channel_id_test_post) | **POST** /api/v1/team/notifications/channels/{channelId}/test | Test notification channel
|
|
123
|
+
*ChannelsApi* | [**api_v1_team_notifications_channels_get**](docs/ChannelsApi.md#api_v1_team_notifications_channels_get) | **GET** /api/v1/team/notifications/channels | List notification channels
|
|
124
|
+
*ChannelsApi* | [**api_v1_team_notifications_channels_post**](docs/ChannelsApi.md#api_v1_team_notifications_channels_post) | **POST** /api/v1/team/notifications/channels | Create notification channel
|
|
125
|
+
*EventsApi* | [**api_v1_team_notifications_events_get**](docs/EventsApi.md#api_v1_team_notifications_events_get) | **GET** /api/v1/team/notifications/events | List notification events
|
|
126
|
+
*InvitesApi* | [**api_v1_team_members_invites_get**](docs/InvitesApi.md#api_v1_team_members_invites_get) | **GET** /api/v1/team/members/invites | List pending team invites
|
|
127
|
+
*InvitesApi* | [**api_v1_team_members_invites_invite_id_delete**](docs/InvitesApi.md#api_v1_team_members_invites_invite_id_delete) | **DELETE** /api/v1/team/members/invites/{inviteId} | Cancel a pending invite
|
|
128
|
+
*InvitesApi* | [**api_v1_team_members_invites_post**](docs/InvitesApi.md#api_v1_team_members_invites_post) | **POST** /api/v1/team/members/invites | Invite a team member
|
|
129
|
+
*MembersApi* | [**api_v1_team_members_get**](docs/MembersApi.md#api_v1_team_members_get) | **GET** /api/v1/team/members | List team members
|
|
130
|
+
*MembersApi* | [**api_v1_team_members_user_id_delete**](docs/MembersApi.md#api_v1_team_members_user_id_delete) | **DELETE** /api/v1/team/members/{userId} | Remove a team member
|
|
131
|
+
*MembersApi* | [**api_v1_team_members_user_id_patch**](docs/MembersApi.md#api_v1_team_members_user_id_patch) | **PATCH** /api/v1/team/members/{userId} | Update a team member role
|
|
132
|
+
*RulesApi* | [**api_v1_team_notifications_rules_get**](docs/RulesApi.md#api_v1_team_notifications_rules_get) | **GET** /api/v1/team/notifications/rules | List notification rules
|
|
133
|
+
*RulesApi* | [**api_v1_team_notifications_rules_post**](docs/RulesApi.md#api_v1_team_notifications_rules_post) | **POST** /api/v1/team/notifications/rules | Create notification rule
|
|
134
|
+
*RulesApi* | [**api_v1_team_notifications_rules_rule_id_delete**](docs/RulesApi.md#api_v1_team_notifications_rules_rule_id_delete) | **DELETE** /api/v1/team/notifications/rules/{ruleId} | Delete notification rule
|
|
135
|
+
*RulesApi* | [**api_v1_team_notifications_rules_rule_id_put**](docs/RulesApi.md#api_v1_team_notifications_rules_rule_id_put) | **PUT** /api/v1/team/notifications/rules/{ruleId} | Update notification rule
|
|
136
|
+
*TeamsApi* | [**api_v1_team_get**](docs/TeamsApi.md#api_v1_team_get) | **GET** /api/v1/team | Get team
|
|
137
|
+
*TeamsApi* | [**api_v1_team_patch**](docs/TeamsApi.md#api_v1_team_patch) | **PATCH** /api/v1/team | Update team
|
|
138
|
+
*EmailApi* | [**api_v1_emails_detect_get**](docs/EmailApi.md#api_v1_emails_detect_get) | **GET** /api/v1/emails/detect | Detect email characteristics
|
|
139
|
+
|
|
140
|
+
|
|
141
|
+
## Documentation For Models
|
|
142
|
+
|
|
143
|
+
- [BaseResponse](docs/BaseResponse.md)
|
|
144
|
+
- [BillingUsageEvent](docs/BillingUsageEvent.md)
|
|
145
|
+
- [BillingUsageItem](docs/BillingUsageItem.md)
|
|
146
|
+
- [BillingUsageResponse](docs/BillingUsageResponse.md)
|
|
147
|
+
- [CreateNotificationChannelInput](docs/CreateNotificationChannelInput.md)
|
|
148
|
+
- [CreateNotificationRuleInput](docs/CreateNotificationRuleInput.md)
|
|
149
|
+
- [EmailDetectData](docs/EmailDetectData.md)
|
|
150
|
+
- [EmailDetectResponse](docs/EmailDetectResponse.md)
|
|
151
|
+
- [GetNotificationChannelResponse](docs/GetNotificationChannelResponse.md)
|
|
152
|
+
- [GetNotificationChannelsResponse](docs/GetNotificationChannelsResponse.md)
|
|
153
|
+
- [GetNotificationEventsResponse](docs/GetNotificationEventsResponse.md)
|
|
154
|
+
- [GetNotificationRulesResponse](docs/GetNotificationRulesResponse.md)
|
|
155
|
+
- [GetPublicTeamResponse](docs/GetPublicTeamResponse.md)
|
|
156
|
+
- [IdDataResponse](docs/IdDataResponse.md)
|
|
157
|
+
- [IdDataStruct](docs/IdDataStruct.md)
|
|
158
|
+
- [InviteTeamMemberInput](docs/InviteTeamMemberInput.md)
|
|
159
|
+
- [ListPublicTeamInvitesResponse](docs/ListPublicTeamInvitesResponse.md)
|
|
160
|
+
- [ListPublicTeamMembersResponse](docs/ListPublicTeamMembersResponse.md)
|
|
161
|
+
- [MessageResponse](docs/MessageResponse.md)
|
|
162
|
+
- [NotificationChannelResponse](docs/NotificationChannelResponse.md)
|
|
163
|
+
- [NotificationRuleChannelInput](docs/NotificationRuleChannelInput.md)
|
|
164
|
+
- [NotificationRuleChannelResponse](docs/NotificationRuleChannelResponse.md)
|
|
165
|
+
- [NotificationRuleResponse](docs/NotificationRuleResponse.md)
|
|
166
|
+
- [PublicTeamInviteResponse](docs/PublicTeamInviteResponse.md)
|
|
167
|
+
- [PublicTeamMemberResponse](docs/PublicTeamMemberResponse.md)
|
|
168
|
+
- [PublicTeamResponse](docs/PublicTeamResponse.md)
|
|
169
|
+
- [UpdateNotificationChannelInput](docs/UpdateNotificationChannelInput.md)
|
|
170
|
+
- [UpdateNotificationRuleInput](docs/UpdateNotificationRuleInput.md)
|
|
171
|
+
- [UpdateTeamInput](docs/UpdateTeamInput.md)
|
|
172
|
+
- [UpdateTeamMemberInput](docs/UpdateTeamMemberInput.md)
|
|
173
|
+
|
|
174
|
+
|
|
175
|
+
<a id="documentation-for-authorization"></a>
|
|
176
|
+
## Documentation For Authorization
|
|
177
|
+
|
|
178
|
+
|
|
179
|
+
Authentication schemes defined for the API:
|
|
180
|
+
<a id="ApiKeyAuth"></a>
|
|
181
|
+
### ApiKeyAuth
|
|
182
|
+
|
|
183
|
+
- **Type**: API key
|
|
184
|
+
- **API key parameter name**: Authorization
|
|
185
|
+
- **Location**: HTTP header
|
|
186
|
+
|
|
187
|
+
<a id="BasicAuth"></a>
|
|
188
|
+
### BasicAuth
|
|
189
|
+
|
|
190
|
+
- **Type**: HTTP basic authentication
|
|
191
|
+
|
|
192
|
+
<a id="BearerAuth"></a>
|
|
193
|
+
### BearerAuth
|
|
194
|
+
|
|
195
|
+
- **Type**: API key
|
|
196
|
+
- **API key parameter name**: Authorization
|
|
197
|
+
- **Location**: HTTP header
|
|
198
|
+
|
|
199
|
+
|
|
200
|
+
## Author
|
|
201
|
+
|
|
202
|
+
dev@emailguard.co
|
|
203
|
+
|
|
204
|
+
|
|
@@ -0,0 +1,186 @@
|
|
|
1
|
+
# emailguard-sdk
|
|
2
|
+
Team-scoped REST API at /api/v1. Authenticate with `Authorization: Bearer egsk_live_...` or `X-API-Key`. Forks may register custom routes under /api/v1/tools/* (requires `tools:read` / `tools:write` scopes). Async tool jobs return a `job_id` — poll `GET .../{jobId}/results` until complete. See /docs/api-reference.
|
|
3
|
+
|
|
4
|
+
This Python package is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project:
|
|
5
|
+
|
|
6
|
+
- API version: 1.0
|
|
7
|
+
- Package version: 1.0.0
|
|
8
|
+
- Generator version: 7.23.0
|
|
9
|
+
- Build package: org.openapitools.codegen.languages.PythonClientCodegen
|
|
10
|
+
For more information, please visit [https://emailguard.co](https://emailguard.co)
|
|
11
|
+
|
|
12
|
+
## Requirements.
|
|
13
|
+
|
|
14
|
+
Python 3.10+
|
|
15
|
+
|
|
16
|
+
## Installation & Usage
|
|
17
|
+
### pip install
|
|
18
|
+
|
|
19
|
+
If the python package is hosted on a repository, you can install directly using:
|
|
20
|
+
|
|
21
|
+
```sh
|
|
22
|
+
pip install git+https://github.com/emailguard/emailguard-python.git
|
|
23
|
+
```
|
|
24
|
+
(you may need to run `pip` with root permission: `sudo pip install git+https://github.com/emailguard/emailguard-python.git`)
|
|
25
|
+
|
|
26
|
+
Then import the package:
|
|
27
|
+
```python
|
|
28
|
+
import emailguard_sdk
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
### Setuptools
|
|
32
|
+
|
|
33
|
+
Install via [Setuptools](http://pypi.python.org/pypi/setuptools).
|
|
34
|
+
|
|
35
|
+
```sh
|
|
36
|
+
python setup.py install --user
|
|
37
|
+
```
|
|
38
|
+
(or `sudo python setup.py install` to install the package for all users)
|
|
39
|
+
|
|
40
|
+
Then import the package:
|
|
41
|
+
```python
|
|
42
|
+
import emailguard_sdk
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
### Tests
|
|
46
|
+
|
|
47
|
+
Execute `pytest` to run the tests.
|
|
48
|
+
|
|
49
|
+
## Getting Started
|
|
50
|
+
|
|
51
|
+
Please follow the [installation procedure](#installation--usage) and then run the following:
|
|
52
|
+
|
|
53
|
+
```python
|
|
54
|
+
|
|
55
|
+
import emailguard_sdk
|
|
56
|
+
from emailguard_sdk.rest import ApiException
|
|
57
|
+
from pprint import pprint
|
|
58
|
+
|
|
59
|
+
# Defining the host is optional and defaults to http://api.emailguard.co
|
|
60
|
+
# See configuration.py for a list of all supported configuration parameters.
|
|
61
|
+
configuration = emailguard_sdk.Configuration(
|
|
62
|
+
host = "http://api.emailguard.co"
|
|
63
|
+
)
|
|
64
|
+
|
|
65
|
+
# The client must configure the authentication and authorization parameters
|
|
66
|
+
# in accordance with the API server security policy.
|
|
67
|
+
# Examples for each auth method are provided below, use the example that
|
|
68
|
+
# satisfies your auth use case.
|
|
69
|
+
|
|
70
|
+
# Configure API key authorization: ApiKeyAuth
|
|
71
|
+
configuration.api_key['ApiKeyAuth'] = os.environ["API_KEY"]
|
|
72
|
+
|
|
73
|
+
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
|
|
74
|
+
# configuration.api_key_prefix['ApiKeyAuth'] = 'Bearer'
|
|
75
|
+
|
|
76
|
+
|
|
77
|
+
# Enter a context with an instance of the API client
|
|
78
|
+
with emailguard_sdk.ApiClient(configuration) as api_client:
|
|
79
|
+
# Create an instance of the API class
|
|
80
|
+
api_instance = emailguard_sdk.BillingApi(api_client)
|
|
81
|
+
range = 'range_example' # str | Period selector: current, previous, or custom (optional)
|
|
82
|
+
start = 'start_example' # str | Custom range start (RFC3339 or YYYY-MM-DD); required when range=custom (optional)
|
|
83
|
+
end = 'end_example' # str | Custom range end (RFC3339 or YYYY-MM-DD); required when range=custom (optional)
|
|
84
|
+
|
|
85
|
+
try:
|
|
86
|
+
# Get billing usage
|
|
87
|
+
api_response = api_instance.api_v1_team_billing_usage_get(range=range, start=start, end=end)
|
|
88
|
+
print("The response of BillingApi->api_v1_team_billing_usage_get:\n")
|
|
89
|
+
pprint(api_response)
|
|
90
|
+
except ApiException as e:
|
|
91
|
+
print("Exception when calling BillingApi->api_v1_team_billing_usage_get: %s\n" % e)
|
|
92
|
+
|
|
93
|
+
```
|
|
94
|
+
|
|
95
|
+
## Documentation for API Endpoints
|
|
96
|
+
|
|
97
|
+
All URIs are relative to *http://api.emailguard.co*
|
|
98
|
+
|
|
99
|
+
Class | Method | HTTP request | Description
|
|
100
|
+
------------ | ------------- | ------------- | -------------
|
|
101
|
+
*BillingApi* | [**api_v1_team_billing_usage_get**](docs/BillingApi.md#api_v1_team_billing_usage_get) | **GET** /api/v1/team/billing/usage | Get billing usage
|
|
102
|
+
*ChannelsApi* | [**api_v1_team_notifications_channels_channel_id_delete**](docs/ChannelsApi.md#api_v1_team_notifications_channels_channel_id_delete) | **DELETE** /api/v1/team/notifications/channels/{channelId} | Delete notification channel
|
|
103
|
+
*ChannelsApi* | [**api_v1_team_notifications_channels_channel_id_put**](docs/ChannelsApi.md#api_v1_team_notifications_channels_channel_id_put) | **PUT** /api/v1/team/notifications/channels/{channelId} | Update notification channel
|
|
104
|
+
*ChannelsApi* | [**api_v1_team_notifications_channels_channel_id_test_post**](docs/ChannelsApi.md#api_v1_team_notifications_channels_channel_id_test_post) | **POST** /api/v1/team/notifications/channels/{channelId}/test | Test notification channel
|
|
105
|
+
*ChannelsApi* | [**api_v1_team_notifications_channels_get**](docs/ChannelsApi.md#api_v1_team_notifications_channels_get) | **GET** /api/v1/team/notifications/channels | List notification channels
|
|
106
|
+
*ChannelsApi* | [**api_v1_team_notifications_channels_post**](docs/ChannelsApi.md#api_v1_team_notifications_channels_post) | **POST** /api/v1/team/notifications/channels | Create notification channel
|
|
107
|
+
*EventsApi* | [**api_v1_team_notifications_events_get**](docs/EventsApi.md#api_v1_team_notifications_events_get) | **GET** /api/v1/team/notifications/events | List notification events
|
|
108
|
+
*InvitesApi* | [**api_v1_team_members_invites_get**](docs/InvitesApi.md#api_v1_team_members_invites_get) | **GET** /api/v1/team/members/invites | List pending team invites
|
|
109
|
+
*InvitesApi* | [**api_v1_team_members_invites_invite_id_delete**](docs/InvitesApi.md#api_v1_team_members_invites_invite_id_delete) | **DELETE** /api/v1/team/members/invites/{inviteId} | Cancel a pending invite
|
|
110
|
+
*InvitesApi* | [**api_v1_team_members_invites_post**](docs/InvitesApi.md#api_v1_team_members_invites_post) | **POST** /api/v1/team/members/invites | Invite a team member
|
|
111
|
+
*MembersApi* | [**api_v1_team_members_get**](docs/MembersApi.md#api_v1_team_members_get) | **GET** /api/v1/team/members | List team members
|
|
112
|
+
*MembersApi* | [**api_v1_team_members_user_id_delete**](docs/MembersApi.md#api_v1_team_members_user_id_delete) | **DELETE** /api/v1/team/members/{userId} | Remove a team member
|
|
113
|
+
*MembersApi* | [**api_v1_team_members_user_id_patch**](docs/MembersApi.md#api_v1_team_members_user_id_patch) | **PATCH** /api/v1/team/members/{userId} | Update a team member role
|
|
114
|
+
*RulesApi* | [**api_v1_team_notifications_rules_get**](docs/RulesApi.md#api_v1_team_notifications_rules_get) | **GET** /api/v1/team/notifications/rules | List notification rules
|
|
115
|
+
*RulesApi* | [**api_v1_team_notifications_rules_post**](docs/RulesApi.md#api_v1_team_notifications_rules_post) | **POST** /api/v1/team/notifications/rules | Create notification rule
|
|
116
|
+
*RulesApi* | [**api_v1_team_notifications_rules_rule_id_delete**](docs/RulesApi.md#api_v1_team_notifications_rules_rule_id_delete) | **DELETE** /api/v1/team/notifications/rules/{ruleId} | Delete notification rule
|
|
117
|
+
*RulesApi* | [**api_v1_team_notifications_rules_rule_id_put**](docs/RulesApi.md#api_v1_team_notifications_rules_rule_id_put) | **PUT** /api/v1/team/notifications/rules/{ruleId} | Update notification rule
|
|
118
|
+
*TeamsApi* | [**api_v1_team_get**](docs/TeamsApi.md#api_v1_team_get) | **GET** /api/v1/team | Get team
|
|
119
|
+
*TeamsApi* | [**api_v1_team_patch**](docs/TeamsApi.md#api_v1_team_patch) | **PATCH** /api/v1/team | Update team
|
|
120
|
+
*EmailApi* | [**api_v1_emails_detect_get**](docs/EmailApi.md#api_v1_emails_detect_get) | **GET** /api/v1/emails/detect | Detect email characteristics
|
|
121
|
+
|
|
122
|
+
|
|
123
|
+
## Documentation For Models
|
|
124
|
+
|
|
125
|
+
- [BaseResponse](docs/BaseResponse.md)
|
|
126
|
+
- [BillingUsageEvent](docs/BillingUsageEvent.md)
|
|
127
|
+
- [BillingUsageItem](docs/BillingUsageItem.md)
|
|
128
|
+
- [BillingUsageResponse](docs/BillingUsageResponse.md)
|
|
129
|
+
- [CreateNotificationChannelInput](docs/CreateNotificationChannelInput.md)
|
|
130
|
+
- [CreateNotificationRuleInput](docs/CreateNotificationRuleInput.md)
|
|
131
|
+
- [EmailDetectData](docs/EmailDetectData.md)
|
|
132
|
+
- [EmailDetectResponse](docs/EmailDetectResponse.md)
|
|
133
|
+
- [GetNotificationChannelResponse](docs/GetNotificationChannelResponse.md)
|
|
134
|
+
- [GetNotificationChannelsResponse](docs/GetNotificationChannelsResponse.md)
|
|
135
|
+
- [GetNotificationEventsResponse](docs/GetNotificationEventsResponse.md)
|
|
136
|
+
- [GetNotificationRulesResponse](docs/GetNotificationRulesResponse.md)
|
|
137
|
+
- [GetPublicTeamResponse](docs/GetPublicTeamResponse.md)
|
|
138
|
+
- [IdDataResponse](docs/IdDataResponse.md)
|
|
139
|
+
- [IdDataStruct](docs/IdDataStruct.md)
|
|
140
|
+
- [InviteTeamMemberInput](docs/InviteTeamMemberInput.md)
|
|
141
|
+
- [ListPublicTeamInvitesResponse](docs/ListPublicTeamInvitesResponse.md)
|
|
142
|
+
- [ListPublicTeamMembersResponse](docs/ListPublicTeamMembersResponse.md)
|
|
143
|
+
- [MessageResponse](docs/MessageResponse.md)
|
|
144
|
+
- [NotificationChannelResponse](docs/NotificationChannelResponse.md)
|
|
145
|
+
- [NotificationRuleChannelInput](docs/NotificationRuleChannelInput.md)
|
|
146
|
+
- [NotificationRuleChannelResponse](docs/NotificationRuleChannelResponse.md)
|
|
147
|
+
- [NotificationRuleResponse](docs/NotificationRuleResponse.md)
|
|
148
|
+
- [PublicTeamInviteResponse](docs/PublicTeamInviteResponse.md)
|
|
149
|
+
- [PublicTeamMemberResponse](docs/PublicTeamMemberResponse.md)
|
|
150
|
+
- [PublicTeamResponse](docs/PublicTeamResponse.md)
|
|
151
|
+
- [UpdateNotificationChannelInput](docs/UpdateNotificationChannelInput.md)
|
|
152
|
+
- [UpdateNotificationRuleInput](docs/UpdateNotificationRuleInput.md)
|
|
153
|
+
- [UpdateTeamInput](docs/UpdateTeamInput.md)
|
|
154
|
+
- [UpdateTeamMemberInput](docs/UpdateTeamMemberInput.md)
|
|
155
|
+
|
|
156
|
+
|
|
157
|
+
<a id="documentation-for-authorization"></a>
|
|
158
|
+
## Documentation For Authorization
|
|
159
|
+
|
|
160
|
+
|
|
161
|
+
Authentication schemes defined for the API:
|
|
162
|
+
<a id="ApiKeyAuth"></a>
|
|
163
|
+
### ApiKeyAuth
|
|
164
|
+
|
|
165
|
+
- **Type**: API key
|
|
166
|
+
- **API key parameter name**: Authorization
|
|
167
|
+
- **Location**: HTTP header
|
|
168
|
+
|
|
169
|
+
<a id="BasicAuth"></a>
|
|
170
|
+
### BasicAuth
|
|
171
|
+
|
|
172
|
+
- **Type**: HTTP basic authentication
|
|
173
|
+
|
|
174
|
+
<a id="BearerAuth"></a>
|
|
175
|
+
### BearerAuth
|
|
176
|
+
|
|
177
|
+
- **Type**: API key
|
|
178
|
+
- **API key parameter name**: Authorization
|
|
179
|
+
- **Location**: HTTP header
|
|
180
|
+
|
|
181
|
+
|
|
182
|
+
## Author
|
|
183
|
+
|
|
184
|
+
dev@emailguard.co
|
|
185
|
+
|
|
186
|
+
|
|
@@ -0,0 +1,123 @@
|
|
|
1
|
+
# coding: utf-8
|
|
2
|
+
|
|
3
|
+
# flake8: noqa
|
|
4
|
+
|
|
5
|
+
"""
|
|
6
|
+
EmailGuard Public API
|
|
7
|
+
|
|
8
|
+
Team-scoped REST API at /api/v1. Authenticate with `Authorization: Bearer egsk_live_...` or `X-API-Key`. Forks may register custom routes under /api/v1/tools/* (requires `tools:read` / `tools:write` scopes). Async tool jobs return a `job_id` — poll `GET .../{jobId}/results` until complete. See /docs/api-reference.
|
|
9
|
+
|
|
10
|
+
The version of the OpenAPI document: 1.0
|
|
11
|
+
Contact: dev@emailguard.co
|
|
12
|
+
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
|
13
|
+
|
|
14
|
+
Do not edit the class manually.
|
|
15
|
+
""" # noqa: E501
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
__version__ = "1.0.0"
|
|
19
|
+
|
|
20
|
+
# Define package exports
|
|
21
|
+
__all__ = [
|
|
22
|
+
"BillingApi",
|
|
23
|
+
"ChannelsApi",
|
|
24
|
+
"EventsApi",
|
|
25
|
+
"InvitesApi",
|
|
26
|
+
"MembersApi",
|
|
27
|
+
"RulesApi",
|
|
28
|
+
"TeamsApi",
|
|
29
|
+
"EmailApi",
|
|
30
|
+
"ApiResponse",
|
|
31
|
+
"ApiClient",
|
|
32
|
+
"Configuration",
|
|
33
|
+
"OpenApiException",
|
|
34
|
+
"ApiTypeError",
|
|
35
|
+
"ApiValueError",
|
|
36
|
+
"ApiKeyError",
|
|
37
|
+
"ApiAttributeError",
|
|
38
|
+
"ApiException",
|
|
39
|
+
"BaseResponse",
|
|
40
|
+
"BillingUsageEvent",
|
|
41
|
+
"BillingUsageItem",
|
|
42
|
+
"BillingUsageResponse",
|
|
43
|
+
"CreateNotificationChannelInput",
|
|
44
|
+
"CreateNotificationRuleInput",
|
|
45
|
+
"EmailDetectData",
|
|
46
|
+
"EmailDetectResponse",
|
|
47
|
+
"GetNotificationChannelResponse",
|
|
48
|
+
"GetNotificationChannelsResponse",
|
|
49
|
+
"GetNotificationEventsResponse",
|
|
50
|
+
"GetNotificationRulesResponse",
|
|
51
|
+
"GetPublicTeamResponse",
|
|
52
|
+
"IdDataResponse",
|
|
53
|
+
"IdDataStruct",
|
|
54
|
+
"InviteTeamMemberInput",
|
|
55
|
+
"ListPublicTeamInvitesResponse",
|
|
56
|
+
"ListPublicTeamMembersResponse",
|
|
57
|
+
"MessageResponse",
|
|
58
|
+
"NotificationChannelResponse",
|
|
59
|
+
"NotificationRuleChannelInput",
|
|
60
|
+
"NotificationRuleChannelResponse",
|
|
61
|
+
"NotificationRuleResponse",
|
|
62
|
+
"PublicTeamInviteResponse",
|
|
63
|
+
"PublicTeamMemberResponse",
|
|
64
|
+
"PublicTeamResponse",
|
|
65
|
+
"UpdateNotificationChannelInput",
|
|
66
|
+
"UpdateNotificationRuleInput",
|
|
67
|
+
"UpdateTeamInput",
|
|
68
|
+
"UpdateTeamMemberInput",
|
|
69
|
+
]
|
|
70
|
+
|
|
71
|
+
# import apis into sdk package
|
|
72
|
+
from emailguard_sdk.api.billing_api import BillingApi as BillingApi
|
|
73
|
+
from emailguard_sdk.api.channels_api import ChannelsApi as ChannelsApi
|
|
74
|
+
from emailguard_sdk.api.events_api import EventsApi as EventsApi
|
|
75
|
+
from emailguard_sdk.api.invites_api import InvitesApi as InvitesApi
|
|
76
|
+
from emailguard_sdk.api.members_api import MembersApi as MembersApi
|
|
77
|
+
from emailguard_sdk.api.rules_api import RulesApi as RulesApi
|
|
78
|
+
from emailguard_sdk.api.teams_api import TeamsApi as TeamsApi
|
|
79
|
+
from emailguard_sdk.api.email_api import EmailApi as EmailApi
|
|
80
|
+
|
|
81
|
+
# import ApiClient
|
|
82
|
+
from emailguard_sdk.api_response import ApiResponse as ApiResponse
|
|
83
|
+
from emailguard_sdk.api_client import ApiClient as ApiClient
|
|
84
|
+
from emailguard_sdk.configuration import Configuration as Configuration
|
|
85
|
+
from emailguard_sdk.exceptions import OpenApiException as OpenApiException
|
|
86
|
+
from emailguard_sdk.exceptions import ApiTypeError as ApiTypeError
|
|
87
|
+
from emailguard_sdk.exceptions import ApiValueError as ApiValueError
|
|
88
|
+
from emailguard_sdk.exceptions import ApiKeyError as ApiKeyError
|
|
89
|
+
from emailguard_sdk.exceptions import ApiAttributeError as ApiAttributeError
|
|
90
|
+
from emailguard_sdk.exceptions import ApiException as ApiException
|
|
91
|
+
|
|
92
|
+
# import models into sdk package
|
|
93
|
+
from emailguard_sdk.models.base_response import BaseResponse as BaseResponse
|
|
94
|
+
from emailguard_sdk.models.billing_usage_event import BillingUsageEvent as BillingUsageEvent
|
|
95
|
+
from emailguard_sdk.models.billing_usage_item import BillingUsageItem as BillingUsageItem
|
|
96
|
+
from emailguard_sdk.models.billing_usage_response import BillingUsageResponse as BillingUsageResponse
|
|
97
|
+
from emailguard_sdk.models.create_notification_channel_input import CreateNotificationChannelInput as CreateNotificationChannelInput
|
|
98
|
+
from emailguard_sdk.models.create_notification_rule_input import CreateNotificationRuleInput as CreateNotificationRuleInput
|
|
99
|
+
from emailguard_sdk.models.email_detect_data import EmailDetectData as EmailDetectData
|
|
100
|
+
from emailguard_sdk.models.email_detect_response import EmailDetectResponse as EmailDetectResponse
|
|
101
|
+
from emailguard_sdk.models.get_notification_channel_response import GetNotificationChannelResponse as GetNotificationChannelResponse
|
|
102
|
+
from emailguard_sdk.models.get_notification_channels_response import GetNotificationChannelsResponse as GetNotificationChannelsResponse
|
|
103
|
+
from emailguard_sdk.models.get_notification_events_response import GetNotificationEventsResponse as GetNotificationEventsResponse
|
|
104
|
+
from emailguard_sdk.models.get_notification_rules_response import GetNotificationRulesResponse as GetNotificationRulesResponse
|
|
105
|
+
from emailguard_sdk.models.get_public_team_response import GetPublicTeamResponse as GetPublicTeamResponse
|
|
106
|
+
from emailguard_sdk.models.id_data_response import IdDataResponse as IdDataResponse
|
|
107
|
+
from emailguard_sdk.models.id_data_struct import IdDataStruct as IdDataStruct
|
|
108
|
+
from emailguard_sdk.models.invite_team_member_input import InviteTeamMemberInput as InviteTeamMemberInput
|
|
109
|
+
from emailguard_sdk.models.list_public_team_invites_response import ListPublicTeamInvitesResponse as ListPublicTeamInvitesResponse
|
|
110
|
+
from emailguard_sdk.models.list_public_team_members_response import ListPublicTeamMembersResponse as ListPublicTeamMembersResponse
|
|
111
|
+
from emailguard_sdk.models.message_response import MessageResponse as MessageResponse
|
|
112
|
+
from emailguard_sdk.models.notification_channel_response import NotificationChannelResponse as NotificationChannelResponse
|
|
113
|
+
from emailguard_sdk.models.notification_rule_channel_input import NotificationRuleChannelInput as NotificationRuleChannelInput
|
|
114
|
+
from emailguard_sdk.models.notification_rule_channel_response import NotificationRuleChannelResponse as NotificationRuleChannelResponse
|
|
115
|
+
from emailguard_sdk.models.notification_rule_response import NotificationRuleResponse as NotificationRuleResponse
|
|
116
|
+
from emailguard_sdk.models.public_team_invite_response import PublicTeamInviteResponse as PublicTeamInviteResponse
|
|
117
|
+
from emailguard_sdk.models.public_team_member_response import PublicTeamMemberResponse as PublicTeamMemberResponse
|
|
118
|
+
from emailguard_sdk.models.public_team_response import PublicTeamResponse as PublicTeamResponse
|
|
119
|
+
from emailguard_sdk.models.update_notification_channel_input import UpdateNotificationChannelInput as UpdateNotificationChannelInput
|
|
120
|
+
from emailguard_sdk.models.update_notification_rule_input import UpdateNotificationRuleInput as UpdateNotificationRuleInput
|
|
121
|
+
from emailguard_sdk.models.update_team_input import UpdateTeamInput as UpdateTeamInput
|
|
122
|
+
from emailguard_sdk.models.update_team_member_input import UpdateTeamMemberInput as UpdateTeamMemberInput
|
|
123
|
+
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
# flake8: noqa
|
|
2
|
+
|
|
3
|
+
# import apis into api package
|
|
4
|
+
from emailguard_sdk.api.billing_api import BillingApi
|
|
5
|
+
from emailguard_sdk.api.channels_api import ChannelsApi
|
|
6
|
+
from emailguard_sdk.api.events_api import EventsApi
|
|
7
|
+
from emailguard_sdk.api.invites_api import InvitesApi
|
|
8
|
+
from emailguard_sdk.api.members_api import MembersApi
|
|
9
|
+
from emailguard_sdk.api.rules_api import RulesApi
|
|
10
|
+
from emailguard_sdk.api.teams_api import TeamsApi
|
|
11
|
+
from emailguard_sdk.api.email_api import EmailApi
|
|
12
|
+
|