signupcheck-sdk 0.1.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.
- signupcheck_sdk-0.1.0/PKG-INFO +86 -0
- signupcheck_sdk-0.1.0/README.md +64 -0
- signupcheck_sdk-0.1.0/pyproject.toml +40 -0
- signupcheck_sdk-0.1.0/setup.cfg +4 -0
- signupcheck_sdk-0.1.0/signupcheck/__init__.py +179 -0
- signupcheck_sdk-0.1.0/signupcheck/api/__init__.py +12 -0
- signupcheck_sdk-0.1.0/signupcheck/api/account_api.py +286 -0
- signupcheck_sdk-0.1.0/signupcheck/api/checks_api.py +595 -0
- signupcheck_sdk-0.1.0/signupcheck/api/decision_engine_api.py +317 -0
- signupcheck_sdk-0.1.0/signupcheck/api/feedback_api.py +323 -0
- signupcheck_sdk-0.1.0/signupcheck/api/lists_api.py +1940 -0
- signupcheck_sdk-0.1.0/signupcheck/api/observability_api.py +978 -0
- signupcheck_sdk-0.1.0/signupcheck/api/rules_api.py +1694 -0
- signupcheck_sdk-0.1.0/signupcheck/api/v1_api.py +275 -0
- signupcheck_sdk-0.1.0/signupcheck/api_client.py +809 -0
- signupcheck_sdk-0.1.0/signupcheck/api_response.py +21 -0
- signupcheck_sdk-0.1.0/signupcheck/configuration.py +637 -0
- signupcheck_sdk-0.1.0/signupcheck/exceptions.py +219 -0
- signupcheck_sdk-0.1.0/signupcheck/models/__init__.py +75 -0
- signupcheck_sdk-0.1.0/signupcheck/models/decision_counts.py +108 -0
- signupcheck_sdk-0.1.0/signupcheck/models/device_fingerprint.py +102 -0
- signupcheck_sdk-0.1.0/signupcheck/models/email_signals.py +130 -0
- signupcheck_sdk-0.1.0/signupcheck/models/error.py +107 -0
- signupcheck_sdk-0.1.0/signupcheck/models/evaluate_signup_request.py +127 -0
- signupcheck_sdk-0.1.0/signupcheck/models/evaluate_signup_response.py +134 -0
- signupcheck_sdk-0.1.0/signupcheck/models/feedback_request.py +114 -0
- signupcheck_sdk-0.1.0/signupcheck/models/get_me200_response.py +118 -0
- signupcheck_sdk-0.1.0/signupcheck/models/get_me401_response.py +104 -0
- signupcheck_sdk-0.1.0/signupcheck/models/ip_signals.py +125 -0
- signupcheck_sdk-0.1.0/signupcheck/models/list_create.py +126 -0
- signupcheck_sdk-0.1.0/signupcheck/models/list_item_create.py +114 -0
- signupcheck_sdk-0.1.0/signupcheck/models/list_signals.py +109 -0
- signupcheck_sdk-0.1.0/signupcheck/models/metrics_response.py +141 -0
- signupcheck_sdk-0.1.0/signupcheck/models/reason.py +107 -0
- signupcheck_sdk-0.1.0/signupcheck/models/recommended_action.py +111 -0
- signupcheck_sdk-0.1.0/signupcheck/models/rule_create.py +111 -0
- signupcheck_sdk-0.1.0/signupcheck/models/rule_test_request.py +102 -0
- signupcheck_sdk-0.1.0/signupcheck/models/rule_test_response.py +124 -0
- signupcheck_sdk-0.1.0/signupcheck/models/rule_update.py +111 -0
- signupcheck_sdk-0.1.0/signupcheck/models/rules_signals.py +110 -0
- signupcheck_sdk-0.1.0/signupcheck/models/signals.py +130 -0
- signupcheck_sdk-0.1.0/signupcheck/models/top_item.py +105 -0
- signupcheck_sdk-0.1.0/signupcheck/models/triggered_rule.py +112 -0
- signupcheck_sdk-0.1.0/signupcheck/models/v1_email_check_response.py +139 -0
- signupcheck_sdk-0.1.0/signupcheck/models/v1_email_classification.py +116 -0
- signupcheck_sdk-0.1.0/signupcheck/models/v1_email_deliverability.py +107 -0
- signupcheck_sdk-0.1.0/signupcheck/models/v1_email_dns.py +106 -0
- signupcheck_sdk-0.1.0/signupcheck/models/v1_email_masked.py +117 -0
- signupcheck_sdk-0.1.0/signupcheck/models/v1_email_meta.py +108 -0
- signupcheck_sdk-0.1.0/signupcheck/models/v1_email_mx.py +105 -0
- signupcheck_sdk-0.1.0/signupcheck/models/v1_email_normalized.py +117 -0
- signupcheck_sdk-0.1.0/signupcheck/models/v1_email_provider.py +115 -0
- signupcheck_sdk-0.1.0/signupcheck/models/v1_email_risk.py +109 -0
- signupcheck_sdk-0.1.0/signupcheck/models/v1_event_detail.py +143 -0
- signupcheck_sdk-0.1.0/signupcheck/models/v1_event_list.py +133 -0
- signupcheck_sdk-0.1.0/signupcheck/models/v1_feedback_response.py +122 -0
- signupcheck_sdk-0.1.0/signupcheck/models/v1_ip_anonymity.py +130 -0
- signupcheck_sdk-0.1.0/signupcheck/models/v1_ip_check_response.py +145 -0
- signupcheck_sdk-0.1.0/signupcheck/models/v1_ip_continent.py +115 -0
- signupcheck_sdk-0.1.0/signupcheck/models/v1_ip_coordinates.py +121 -0
- signupcheck_sdk-0.1.0/signupcheck/models/v1_ip_country.py +115 -0
- signupcheck_sdk-0.1.0/signupcheck/models/v1_ip_datacenter.py +110 -0
- signupcheck_sdk-0.1.0/signupcheck/models/v1_ip_geo.py +146 -0
- signupcheck_sdk-0.1.0/signupcheck/models/v1_ip_meta.py +108 -0
- signupcheck_sdk-0.1.0/signupcheck/models/v1_ip_network.py +136 -0
- signupcheck_sdk-0.1.0/signupcheck/models/v1_ip_normalized.py +105 -0
- signupcheck_sdk-0.1.0/signupcheck/models/v1_ip_proxy.py +110 -0
- signupcheck_sdk-0.1.0/signupcheck/models/v1_ip_region.py +122 -0
- signupcheck_sdk-0.1.0/signupcheck/models/v1_ip_reputation.py +115 -0
- signupcheck_sdk-0.1.0/signupcheck/models/v1_ip_risk.py +109 -0
- signupcheck_sdk-0.1.0/signupcheck/models/v1_ip_tor.py +104 -0
- signupcheck_sdk-0.1.0/signupcheck/models/v1_ipi_cloud_relay.py +107 -0
- signupcheck_sdk-0.1.0/signupcheck/models/v1_ipvpn.py +110 -0
- signupcheck_sdk-0.1.0/signupcheck/models/v1_list_item_response.py +117 -0
- signupcheck_sdk-0.1.0/signupcheck/models/v1_list_response.py +133 -0
- signupcheck_sdk-0.1.0/signupcheck/models/v1_rule_response.py +123 -0
- signupcheck_sdk-0.1.0/signupcheck/models/velocity_signals.py +106 -0
- signupcheck_sdk-0.1.0/signupcheck/py.typed +0 -0
- signupcheck_sdk-0.1.0/signupcheck/rest.py +264 -0
- signupcheck_sdk-0.1.0/signupcheck_sdk.egg-info/PKG-INFO +86 -0
- signupcheck_sdk-0.1.0/signupcheck_sdk.egg-info/SOURCES.txt +148 -0
- signupcheck_sdk-0.1.0/signupcheck_sdk.egg-info/dependency_links.txt +1 -0
- signupcheck_sdk-0.1.0/signupcheck_sdk.egg-info/requires.txt +10 -0
- signupcheck_sdk-0.1.0/signupcheck_sdk.egg-info/top_level.txt +1 -0
- signupcheck_sdk-0.1.0/test/test_account_api.py +39 -0
- signupcheck_sdk-0.1.0/test/test_checks_api.py +46 -0
- signupcheck_sdk-0.1.0/test/test_decision_counts.py +59 -0
- signupcheck_sdk-0.1.0/test/test_decision_engine_api.py +39 -0
- signupcheck_sdk-0.1.0/test/test_device_fingerprint.py +52 -0
- signupcheck_sdk-0.1.0/test/test_email_signals.py +72 -0
- signupcheck_sdk-0.1.0/test/test_error.py +56 -0
- signupcheck_sdk-0.1.0/test/test_evaluate_signup_request.py +67 -0
- signupcheck_sdk-0.1.0/test/test_evaluate_signup_response.py +179 -0
- signupcheck_sdk-0.1.0/test/test_feedback_api.py +39 -0
- signupcheck_sdk-0.1.0/test/test_feedback_request.py +56 -0
- signupcheck_sdk-0.1.0/test/test_get_me200_response.py +60 -0
- signupcheck_sdk-0.1.0/test/test_get_me401_response.py +53 -0
- signupcheck_sdk-0.1.0/test/test_ip_signals.py +78 -0
- signupcheck_sdk-0.1.0/test/test_list_create.py +57 -0
- signupcheck_sdk-0.1.0/test/test_list_item_create.py +56 -0
- signupcheck_sdk-0.1.0/test/test_list_signals.py +67 -0
- signupcheck_sdk-0.1.0/test/test_lists_api.py +81 -0
- signupcheck_sdk-0.1.0/test/test_metrics_response.py +97 -0
- signupcheck_sdk-0.1.0/test/test_observability_api.py +53 -0
- signupcheck_sdk-0.1.0/test/test_reason.py +56 -0
- signupcheck_sdk-0.1.0/test/test_recommended_action.py +54 -0
- signupcheck_sdk-0.1.0/test/test_rule_create.py +58 -0
- signupcheck_sdk-0.1.0/test/test_rule_test_request.py +53 -0
- signupcheck_sdk-0.1.0/test/test_rule_test_response.py +59 -0
- signupcheck_sdk-0.1.0/test/test_rule_update.py +56 -0
- signupcheck_sdk-0.1.0/test/test_rules_api.py +74 -0
- signupcheck_sdk-0.1.0/test/test_rules_signals.py +63 -0
- signupcheck_sdk-0.1.0/test/test_signals.py +155 -0
- signupcheck_sdk-0.1.0/test/test_top_item.py +55 -0
- signupcheck_sdk-0.1.0/test/test_triggered_rule.py +57 -0
- signupcheck_sdk-0.1.0/test/test_v1_api.py +38 -0
- signupcheck_sdk-0.1.0/test/test_v1_email_check_response.py +119 -0
- signupcheck_sdk-0.1.0/test/test_v1_email_classification.py +69 -0
- signupcheck_sdk-0.1.0/test/test_v1_email_deliverability.py +53 -0
- signupcheck_sdk-0.1.0/test/test_v1_email_dns.py +61 -0
- signupcheck_sdk-0.1.0/test/test_v1_email_masked.py +57 -0
- signupcheck_sdk-0.1.0/test/test_v1_email_meta.py +57 -0
- signupcheck_sdk-0.1.0/test/test_v1_email_mx.py +59 -0
- signupcheck_sdk-0.1.0/test/test_v1_email_normalized.py +57 -0
- signupcheck_sdk-0.1.0/test/test_v1_email_provider.py +55 -0
- signupcheck_sdk-0.1.0/test/test_v1_email_risk.py +63 -0
- signupcheck_sdk-0.1.0/test/test_v1_event_detail.py +68 -0
- signupcheck_sdk-0.1.0/test/test_v1_event_list.py +61 -0
- signupcheck_sdk-0.1.0/test/test_v1_feedback_response.py +58 -0
- signupcheck_sdk-0.1.0/test/test_v1_ip_anonymity.py +79 -0
- signupcheck_sdk-0.1.0/test/test_v1_ip_check_response.py +173 -0
- signupcheck_sdk-0.1.0/test/test_v1_ip_continent.py +55 -0
- signupcheck_sdk-0.1.0/test/test_v1_ip_coordinates.py +57 -0
- signupcheck_sdk-0.1.0/test/test_v1_ip_country.py +55 -0
- signupcheck_sdk-0.1.0/test/test_v1_ip_datacenter.py +55 -0
- signupcheck_sdk-0.1.0/test/test_v1_ip_geo.py +85 -0
- signupcheck_sdk-0.1.0/test/test_v1_ip_meta.py +57 -0
- signupcheck_sdk-0.1.0/test/test_v1_ip_network.py +61 -0
- signupcheck_sdk-0.1.0/test/test_v1_ip_normalized.py +55 -0
- signupcheck_sdk-0.1.0/test/test_v1_ip_proxy.py +55 -0
- signupcheck_sdk-0.1.0/test/test_v1_ip_region.py +57 -0
- signupcheck_sdk-0.1.0/test/test_v1_ip_reputation.py +63 -0
- signupcheck_sdk-0.1.0/test/test_v1_ip_risk.py +63 -0
- signupcheck_sdk-0.1.0/test/test_v1_ip_tor.py +55 -0
- signupcheck_sdk-0.1.0/test/test_v1_ipi_cloud_relay.py +53 -0
- signupcheck_sdk-0.1.0/test/test_v1_ipvpn.py +55 -0
- signupcheck_sdk-0.1.0/test/test_v1_list_item_response.py +60 -0
- signupcheck_sdk-0.1.0/test/test_v1_list_response.py +61 -0
- signupcheck_sdk-0.1.0/test/test_v1_rule_response.py +61 -0
- signupcheck_sdk-0.1.0/test/test_velocity_signals.py +57 -0
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: signupcheck-sdk
|
|
3
|
+
Version: 0.1.0
|
|
4
|
+
Summary: Python client for the SignupCheck anti-abuse API
|
|
5
|
+
Author-email: Visian Systems <support@signupcheck.com>
|
|
6
|
+
License-Expression: MIT
|
|
7
|
+
Project-URL: Homepage, https://signupcheck.com
|
|
8
|
+
Project-URL: Repository, https://gitlab.com/visian/infra-structure/signupcheck-sdk
|
|
9
|
+
Project-URL: Issues, https://gitlab.com/visian/infra-structure/signupcheck-sdk/-/issues
|
|
10
|
+
Keywords: signupcheck,anti-abuse,api,sdk,openapi
|
|
11
|
+
Requires-Python: >=3.9
|
|
12
|
+
Description-Content-Type: text/markdown
|
|
13
|
+
Requires-Dist: urllib3<3.0.0,>=2.1.0
|
|
14
|
+
Requires-Dist: python-dateutil>=2.8.2
|
|
15
|
+
Requires-Dist: pydantic>=2.11
|
|
16
|
+
Requires-Dist: typing-extensions>=4.7.1
|
|
17
|
+
Provides-Extra: dev
|
|
18
|
+
Requires-Dist: pytest>=7.2.1; extra == "dev"
|
|
19
|
+
Requires-Dist: pytest-cov>=2.8.1; extra == "dev"
|
|
20
|
+
Requires-Dist: build>=1.0.0; extra == "dev"
|
|
21
|
+
Requires-Dist: twine>=5.0.0; extra == "dev"
|
|
22
|
+
|
|
23
|
+
# signupcheck-sdk
|
|
24
|
+
|
|
25
|
+
Python client for the [SignupCheck](https://signupcheck.com) anti-abuse API — block disposable emails, VPNs, proxies, bots, and malicious IPs at signup.
|
|
26
|
+
|
|
27
|
+
## Install
|
|
28
|
+
|
|
29
|
+
```bash
|
|
30
|
+
pip install signupcheck-sdk
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
Requires Python 3.9+.
|
|
34
|
+
|
|
35
|
+
## Quick start
|
|
36
|
+
|
|
37
|
+
```python
|
|
38
|
+
import os
|
|
39
|
+
import signupcheck
|
|
40
|
+
from signupcheck.models.evaluate_signup_request import EvaluateSignupRequest
|
|
41
|
+
|
|
42
|
+
cfg = signupcheck.Configuration(host="https://api.signupcheck.com")
|
|
43
|
+
cfg.api_key["API Key"] = os.environ["SIGNUPCHECK_API_KEY"]
|
|
44
|
+
|
|
45
|
+
with signupcheck.ApiClient(cfg) as client:
|
|
46
|
+
api = signupcheck.DecisionEngineApi(client)
|
|
47
|
+
resp = api.evaluate_signup(EvaluateSignupRequest(
|
|
48
|
+
email="user@example.com",
|
|
49
|
+
ip="1.2.3.4",
|
|
50
|
+
))
|
|
51
|
+
print(resp.decision, resp.risk_score)
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
The client reads the API key via the `X-API-Key` header. To use Bearer auth instead:
|
|
55
|
+
|
|
56
|
+
```python
|
|
57
|
+
cfg.api_key["Bearer"] = os.environ["SIGNUPCHECK_API_KEY"]
|
|
58
|
+
cfg.api_key_prefix["Bearer"] = "Bearer"
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
## Available APIs
|
|
62
|
+
|
|
63
|
+
| Class | Endpoint prefix | Purpose |
|
|
64
|
+
|--------------------|--------------------------|----------------------------------------|
|
|
65
|
+
| `DecisionEngineApi`| `/v1/evaluate/signup` | ALLOW / CHALLENGE / BLOCK decision |
|
|
66
|
+
| `ChecksApi` | `/v1/evaluate/{email,ip}`| Standalone email / IP risk checks |
|
|
67
|
+
| `ListsApi` | `/v1/lists` | Manage allow / block lists |
|
|
68
|
+
| `RulesApi` | `/v1/rules` | Manage custom rules |
|
|
69
|
+
| `FeedbackApi` | `/v1/feedback/signup` | Submit outcome feedback |
|
|
70
|
+
| `ObservabilityApi` | `/v1/events`, `/v1/metrics/signup` | Query events and metrics |
|
|
71
|
+
| `AccountApi` | `/v1/me` | Validate API key (no credit charge) |
|
|
72
|
+
|
|
73
|
+
## Development
|
|
74
|
+
|
|
75
|
+
This package is generated from the OpenAPI spec in the [signupcheck API repo](https://gitlab.com/visian/infra-structure/signupcheck). To regenerate after a schema change, run `make sdk-python` in the API repo.
|
|
76
|
+
|
|
77
|
+
Local build and test from this directory:
|
|
78
|
+
|
|
79
|
+
```bash
|
|
80
|
+
make build # python -m build → dist/
|
|
81
|
+
make check # twine check dist/*
|
|
82
|
+
```
|
|
83
|
+
|
|
84
|
+
## License
|
|
85
|
+
|
|
86
|
+
Proprietary. See the repository for terms.
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
# signupcheck-sdk
|
|
2
|
+
|
|
3
|
+
Python client for the [SignupCheck](https://signupcheck.com) anti-abuse API — block disposable emails, VPNs, proxies, bots, and malicious IPs at signup.
|
|
4
|
+
|
|
5
|
+
## Install
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
pip install signupcheck-sdk
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
Requires Python 3.9+.
|
|
12
|
+
|
|
13
|
+
## Quick start
|
|
14
|
+
|
|
15
|
+
```python
|
|
16
|
+
import os
|
|
17
|
+
import signupcheck
|
|
18
|
+
from signupcheck.models.evaluate_signup_request import EvaluateSignupRequest
|
|
19
|
+
|
|
20
|
+
cfg = signupcheck.Configuration(host="https://api.signupcheck.com")
|
|
21
|
+
cfg.api_key["API Key"] = os.environ["SIGNUPCHECK_API_KEY"]
|
|
22
|
+
|
|
23
|
+
with signupcheck.ApiClient(cfg) as client:
|
|
24
|
+
api = signupcheck.DecisionEngineApi(client)
|
|
25
|
+
resp = api.evaluate_signup(EvaluateSignupRequest(
|
|
26
|
+
email="user@example.com",
|
|
27
|
+
ip="1.2.3.4",
|
|
28
|
+
))
|
|
29
|
+
print(resp.decision, resp.risk_score)
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
The client reads the API key via the `X-API-Key` header. To use Bearer auth instead:
|
|
33
|
+
|
|
34
|
+
```python
|
|
35
|
+
cfg.api_key["Bearer"] = os.environ["SIGNUPCHECK_API_KEY"]
|
|
36
|
+
cfg.api_key_prefix["Bearer"] = "Bearer"
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
## Available APIs
|
|
40
|
+
|
|
41
|
+
| Class | Endpoint prefix | Purpose |
|
|
42
|
+
|--------------------|--------------------------|----------------------------------------|
|
|
43
|
+
| `DecisionEngineApi`| `/v1/evaluate/signup` | ALLOW / CHALLENGE / BLOCK decision |
|
|
44
|
+
| `ChecksApi` | `/v1/evaluate/{email,ip}`| Standalone email / IP risk checks |
|
|
45
|
+
| `ListsApi` | `/v1/lists` | Manage allow / block lists |
|
|
46
|
+
| `RulesApi` | `/v1/rules` | Manage custom rules |
|
|
47
|
+
| `FeedbackApi` | `/v1/feedback/signup` | Submit outcome feedback |
|
|
48
|
+
| `ObservabilityApi` | `/v1/events`, `/v1/metrics/signup` | Query events and metrics |
|
|
49
|
+
| `AccountApi` | `/v1/me` | Validate API key (no credit charge) |
|
|
50
|
+
|
|
51
|
+
## Development
|
|
52
|
+
|
|
53
|
+
This package is generated from the OpenAPI spec in the [signupcheck API repo](https://gitlab.com/visian/infra-structure/signupcheck). To regenerate after a schema change, run `make sdk-python` in the API repo.
|
|
54
|
+
|
|
55
|
+
Local build and test from this directory:
|
|
56
|
+
|
|
57
|
+
```bash
|
|
58
|
+
make build # python -m build → dist/
|
|
59
|
+
make check # twine check dist/*
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
## License
|
|
63
|
+
|
|
64
|
+
Proprietary. See the repository for terms.
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
[project]
|
|
2
|
+
name = "signupcheck-sdk"
|
|
3
|
+
version = "0.1.0"
|
|
4
|
+
description = "Python client for the SignupCheck anti-abuse API"
|
|
5
|
+
readme = "README.md"
|
|
6
|
+
requires-python = ">=3.9"
|
|
7
|
+
license = "MIT"
|
|
8
|
+
authors = [{ name = "Visian Systems", email = "support@signupcheck.com" }]
|
|
9
|
+
keywords = ["signupcheck", "anti-abuse", "api", "sdk", "openapi"]
|
|
10
|
+
|
|
11
|
+
dependencies = [
|
|
12
|
+
"urllib3>=2.1.0,<3.0.0",
|
|
13
|
+
"python-dateutil>=2.8.2",
|
|
14
|
+
"pydantic>=2.11",
|
|
15
|
+
"typing-extensions>=4.7.1",
|
|
16
|
+
]
|
|
17
|
+
|
|
18
|
+
[project.optional-dependencies]
|
|
19
|
+
dev = [
|
|
20
|
+
"pytest>=7.2.1",
|
|
21
|
+
"pytest-cov>=2.8.1",
|
|
22
|
+
"build>=1.0.0",
|
|
23
|
+
"twine>=5.0.0",
|
|
24
|
+
]
|
|
25
|
+
|
|
26
|
+
[project.urls]
|
|
27
|
+
Homepage = "https://signupcheck.com"
|
|
28
|
+
Repository = "https://gitlab.com/visian/infra-structure/signupcheck-sdk"
|
|
29
|
+
Issues = "https://gitlab.com/visian/infra-structure/signupcheck-sdk/-/issues"
|
|
30
|
+
|
|
31
|
+
[build-system]
|
|
32
|
+
requires = ["setuptools>=68", "wheel"]
|
|
33
|
+
build-backend = "setuptools.build_meta"
|
|
34
|
+
|
|
35
|
+
[tool.setuptools.packages.find]
|
|
36
|
+
include = ["signupcheck*"]
|
|
37
|
+
exclude = ["test*", "tests*", "docs*"]
|
|
38
|
+
|
|
39
|
+
[tool.setuptools.package-data]
|
|
40
|
+
signupcheck = ["py.typed"]
|
|
@@ -0,0 +1,179 @@
|
|
|
1
|
+
# coding: utf-8
|
|
2
|
+
|
|
3
|
+
# flake8: noqa
|
|
4
|
+
|
|
5
|
+
"""
|
|
6
|
+
SignupCheck
|
|
7
|
+
|
|
8
|
+
# Anti-Abuse API for SaaS Sign-ups Block disposable emails, VPNs, proxies, bots, and malicious IPs. ## Authentication All API endpoints require authentication via API key: ``` X-API-Key: your-api-key-here ``` Or via Bearer token: ``` Authorization: Bearer your-api-key-here ``` ## Endpoints | Endpoint | Method | Description | |----------|--------|-------------| | `/v1/evaluate/signup` | POST | Core decision engine - returns ALLOW/CHALLENGE/BLOCK | | `/v1/evaluate/email` | GET | Standalone email risk check | | `/v1/evaluate/ip` | GET | Standalone IP risk check | | `/v1/lists` | GET/POST | Manage allow/block lists | | `/v1/rules` | GET/POST | Manage custom rules | | `/v1/feedback/signup` | POST | Submit feedback for model improvement | | `/v1/events` | GET | Query signup events | | `/v1/metrics/signup` | GET | Get signup metrics | ## Decision Engine The core `/v1/evaluate/signup` endpoint evaluates signup attempts and returns one of three decisions: - **ALLOW** (risk score < 50) - Safe to proceed - **CHALLENGE** (risk score 50-79) - Require additional verification - **BLOCK** (risk score >= 80) - Reject signup ## Rate Limits - 1000 requests per minute per API key - 10,000 requests per hour per API key
|
|
9
|
+
|
|
10
|
+
The version of the OpenAPI document: v1
|
|
11
|
+
Contact: support@signupcheck.com
|
|
12
|
+
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
|
13
|
+
|
|
14
|
+
Do not edit the class manually.
|
|
15
|
+
""" # noqa: E501
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
__version__ = "0.1.0"
|
|
19
|
+
|
|
20
|
+
# Define package exports
|
|
21
|
+
__all__ = [
|
|
22
|
+
"AccountApi",
|
|
23
|
+
"ChecksApi",
|
|
24
|
+
"DecisionEngineApi",
|
|
25
|
+
"FeedbackApi",
|
|
26
|
+
"ListsApi",
|
|
27
|
+
"ObservabilityApi",
|
|
28
|
+
"RulesApi",
|
|
29
|
+
"V1Api",
|
|
30
|
+
"ApiResponse",
|
|
31
|
+
"ApiClient",
|
|
32
|
+
"Configuration",
|
|
33
|
+
"OpenApiException",
|
|
34
|
+
"ApiTypeError",
|
|
35
|
+
"ApiValueError",
|
|
36
|
+
"ApiKeyError",
|
|
37
|
+
"ApiAttributeError",
|
|
38
|
+
"ApiException",
|
|
39
|
+
"DecisionCounts",
|
|
40
|
+
"DeviceFingerprint",
|
|
41
|
+
"EmailSignals",
|
|
42
|
+
"Error",
|
|
43
|
+
"EvaluateSignupRequest",
|
|
44
|
+
"EvaluateSignupResponse",
|
|
45
|
+
"FeedbackRequest",
|
|
46
|
+
"GetMe200Response",
|
|
47
|
+
"GetMe401Response",
|
|
48
|
+
"IPSignals",
|
|
49
|
+
"ListCreate",
|
|
50
|
+
"ListItemCreate",
|
|
51
|
+
"ListSignals",
|
|
52
|
+
"MetricsResponse",
|
|
53
|
+
"Reason",
|
|
54
|
+
"RecommendedAction",
|
|
55
|
+
"RuleCreate",
|
|
56
|
+
"RuleTestRequest",
|
|
57
|
+
"RuleTestResponse",
|
|
58
|
+
"RuleUpdate",
|
|
59
|
+
"RulesSignals",
|
|
60
|
+
"Signals",
|
|
61
|
+
"TopItem",
|
|
62
|
+
"TriggeredRule",
|
|
63
|
+
"V1EmailCheckResponse",
|
|
64
|
+
"V1EmailClassification",
|
|
65
|
+
"V1EmailDNS",
|
|
66
|
+
"V1EmailDeliverability",
|
|
67
|
+
"V1EmailMX",
|
|
68
|
+
"V1EmailMasked",
|
|
69
|
+
"V1EmailMeta",
|
|
70
|
+
"V1EmailNormalized",
|
|
71
|
+
"V1EmailProvider",
|
|
72
|
+
"V1EmailRisk",
|
|
73
|
+
"V1EventDetail",
|
|
74
|
+
"V1EventList",
|
|
75
|
+
"V1FeedbackResponse",
|
|
76
|
+
"V1IPAnonymity",
|
|
77
|
+
"V1IPCheckResponse",
|
|
78
|
+
"V1IPContinent",
|
|
79
|
+
"V1IPCoordinates",
|
|
80
|
+
"V1IPCountry",
|
|
81
|
+
"V1IPDatacenter",
|
|
82
|
+
"V1IPGeo",
|
|
83
|
+
"V1IPMeta",
|
|
84
|
+
"V1IPNetwork",
|
|
85
|
+
"V1IPNormalized",
|
|
86
|
+
"V1IPProxy",
|
|
87
|
+
"V1IPRegion",
|
|
88
|
+
"V1IPReputation",
|
|
89
|
+
"V1IPRisk",
|
|
90
|
+
"V1IPTor",
|
|
91
|
+
"V1IPVPN",
|
|
92
|
+
"V1IPiCloudRelay",
|
|
93
|
+
"V1ListItemResponse",
|
|
94
|
+
"V1ListResponse",
|
|
95
|
+
"V1RuleResponse",
|
|
96
|
+
"VelocitySignals",
|
|
97
|
+
]
|
|
98
|
+
|
|
99
|
+
# import apis into sdk package
|
|
100
|
+
from signupcheck.api.account_api import AccountApi as AccountApi
|
|
101
|
+
from signupcheck.api.checks_api import ChecksApi as ChecksApi
|
|
102
|
+
from signupcheck.api.decision_engine_api import DecisionEngineApi as DecisionEngineApi
|
|
103
|
+
from signupcheck.api.feedback_api import FeedbackApi as FeedbackApi
|
|
104
|
+
from signupcheck.api.lists_api import ListsApi as ListsApi
|
|
105
|
+
from signupcheck.api.observability_api import ObservabilityApi as ObservabilityApi
|
|
106
|
+
from signupcheck.api.rules_api import RulesApi as RulesApi
|
|
107
|
+
from signupcheck.api.v1_api import V1Api as V1Api
|
|
108
|
+
|
|
109
|
+
# import ApiClient
|
|
110
|
+
from signupcheck.api_response import ApiResponse as ApiResponse
|
|
111
|
+
from signupcheck.api_client import ApiClient as ApiClient
|
|
112
|
+
from signupcheck.configuration import Configuration as Configuration
|
|
113
|
+
from signupcheck.exceptions import OpenApiException as OpenApiException
|
|
114
|
+
from signupcheck.exceptions import ApiTypeError as ApiTypeError
|
|
115
|
+
from signupcheck.exceptions import ApiValueError as ApiValueError
|
|
116
|
+
from signupcheck.exceptions import ApiKeyError as ApiKeyError
|
|
117
|
+
from signupcheck.exceptions import ApiAttributeError as ApiAttributeError
|
|
118
|
+
from signupcheck.exceptions import ApiException as ApiException
|
|
119
|
+
|
|
120
|
+
# import models into sdk package
|
|
121
|
+
from signupcheck.models.decision_counts import DecisionCounts as DecisionCounts
|
|
122
|
+
from signupcheck.models.device_fingerprint import DeviceFingerprint as DeviceFingerprint
|
|
123
|
+
from signupcheck.models.email_signals import EmailSignals as EmailSignals
|
|
124
|
+
from signupcheck.models.error import Error as Error
|
|
125
|
+
from signupcheck.models.evaluate_signup_request import EvaluateSignupRequest as EvaluateSignupRequest
|
|
126
|
+
from signupcheck.models.evaluate_signup_response import EvaluateSignupResponse as EvaluateSignupResponse
|
|
127
|
+
from signupcheck.models.feedback_request import FeedbackRequest as FeedbackRequest
|
|
128
|
+
from signupcheck.models.get_me200_response import GetMe200Response as GetMe200Response
|
|
129
|
+
from signupcheck.models.get_me401_response import GetMe401Response as GetMe401Response
|
|
130
|
+
from signupcheck.models.ip_signals import IPSignals as IPSignals
|
|
131
|
+
from signupcheck.models.list_create import ListCreate as ListCreate
|
|
132
|
+
from signupcheck.models.list_item_create import ListItemCreate as ListItemCreate
|
|
133
|
+
from signupcheck.models.list_signals import ListSignals as ListSignals
|
|
134
|
+
from signupcheck.models.metrics_response import MetricsResponse as MetricsResponse
|
|
135
|
+
from signupcheck.models.reason import Reason as Reason
|
|
136
|
+
from signupcheck.models.recommended_action import RecommendedAction as RecommendedAction
|
|
137
|
+
from signupcheck.models.rule_create import RuleCreate as RuleCreate
|
|
138
|
+
from signupcheck.models.rule_test_request import RuleTestRequest as RuleTestRequest
|
|
139
|
+
from signupcheck.models.rule_test_response import RuleTestResponse as RuleTestResponse
|
|
140
|
+
from signupcheck.models.rule_update import RuleUpdate as RuleUpdate
|
|
141
|
+
from signupcheck.models.rules_signals import RulesSignals as RulesSignals
|
|
142
|
+
from signupcheck.models.signals import Signals as Signals
|
|
143
|
+
from signupcheck.models.top_item import TopItem as TopItem
|
|
144
|
+
from signupcheck.models.triggered_rule import TriggeredRule as TriggeredRule
|
|
145
|
+
from signupcheck.models.v1_email_check_response import V1EmailCheckResponse as V1EmailCheckResponse
|
|
146
|
+
from signupcheck.models.v1_email_classification import V1EmailClassification as V1EmailClassification
|
|
147
|
+
from signupcheck.models.v1_email_dns import V1EmailDNS as V1EmailDNS
|
|
148
|
+
from signupcheck.models.v1_email_deliverability import V1EmailDeliverability as V1EmailDeliverability
|
|
149
|
+
from signupcheck.models.v1_email_mx import V1EmailMX as V1EmailMX
|
|
150
|
+
from signupcheck.models.v1_email_masked import V1EmailMasked as V1EmailMasked
|
|
151
|
+
from signupcheck.models.v1_email_meta import V1EmailMeta as V1EmailMeta
|
|
152
|
+
from signupcheck.models.v1_email_normalized import V1EmailNormalized as V1EmailNormalized
|
|
153
|
+
from signupcheck.models.v1_email_provider import V1EmailProvider as V1EmailProvider
|
|
154
|
+
from signupcheck.models.v1_email_risk import V1EmailRisk as V1EmailRisk
|
|
155
|
+
from signupcheck.models.v1_event_detail import V1EventDetail as V1EventDetail
|
|
156
|
+
from signupcheck.models.v1_event_list import V1EventList as V1EventList
|
|
157
|
+
from signupcheck.models.v1_feedback_response import V1FeedbackResponse as V1FeedbackResponse
|
|
158
|
+
from signupcheck.models.v1_ip_anonymity import V1IPAnonymity as V1IPAnonymity
|
|
159
|
+
from signupcheck.models.v1_ip_check_response import V1IPCheckResponse as V1IPCheckResponse
|
|
160
|
+
from signupcheck.models.v1_ip_continent import V1IPContinent as V1IPContinent
|
|
161
|
+
from signupcheck.models.v1_ip_coordinates import V1IPCoordinates as V1IPCoordinates
|
|
162
|
+
from signupcheck.models.v1_ip_country import V1IPCountry as V1IPCountry
|
|
163
|
+
from signupcheck.models.v1_ip_datacenter import V1IPDatacenter as V1IPDatacenter
|
|
164
|
+
from signupcheck.models.v1_ip_geo import V1IPGeo as V1IPGeo
|
|
165
|
+
from signupcheck.models.v1_ip_meta import V1IPMeta as V1IPMeta
|
|
166
|
+
from signupcheck.models.v1_ip_network import V1IPNetwork as V1IPNetwork
|
|
167
|
+
from signupcheck.models.v1_ip_normalized import V1IPNormalized as V1IPNormalized
|
|
168
|
+
from signupcheck.models.v1_ip_proxy import V1IPProxy as V1IPProxy
|
|
169
|
+
from signupcheck.models.v1_ip_region import V1IPRegion as V1IPRegion
|
|
170
|
+
from signupcheck.models.v1_ip_reputation import V1IPReputation as V1IPReputation
|
|
171
|
+
from signupcheck.models.v1_ip_risk import V1IPRisk as V1IPRisk
|
|
172
|
+
from signupcheck.models.v1_ip_tor import V1IPTor as V1IPTor
|
|
173
|
+
from signupcheck.models.v1_ipvpn import V1IPVPN as V1IPVPN
|
|
174
|
+
from signupcheck.models.v1_ipi_cloud_relay import V1IPiCloudRelay as V1IPiCloudRelay
|
|
175
|
+
from signupcheck.models.v1_list_item_response import V1ListItemResponse as V1ListItemResponse
|
|
176
|
+
from signupcheck.models.v1_list_response import V1ListResponse as V1ListResponse
|
|
177
|
+
from signupcheck.models.v1_rule_response import V1RuleResponse as V1RuleResponse
|
|
178
|
+
from signupcheck.models.velocity_signals import VelocitySignals as VelocitySignals
|
|
179
|
+
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
# flake8: noqa
|
|
2
|
+
|
|
3
|
+
# import apis into api package
|
|
4
|
+
from signupcheck.api.account_api import AccountApi
|
|
5
|
+
from signupcheck.api.checks_api import ChecksApi
|
|
6
|
+
from signupcheck.api.decision_engine_api import DecisionEngineApi
|
|
7
|
+
from signupcheck.api.feedback_api import FeedbackApi
|
|
8
|
+
from signupcheck.api.lists_api import ListsApi
|
|
9
|
+
from signupcheck.api.observability_api import ObservabilityApi
|
|
10
|
+
from signupcheck.api.rules_api import RulesApi
|
|
11
|
+
from signupcheck.api.v1_api import V1Api
|
|
12
|
+
|
|
@@ -0,0 +1,286 @@
|
|
|
1
|
+
"""
|
|
2
|
+
SignupCheck
|
|
3
|
+
|
|
4
|
+
# Anti-Abuse API for SaaS Sign-ups Block disposable emails, VPNs, proxies, bots, and malicious IPs. ## Authentication All API endpoints require authentication via API key: ``` X-API-Key: your-api-key-here ``` Or via Bearer token: ``` Authorization: Bearer your-api-key-here ``` ## Endpoints | Endpoint | Method | Description | |----------|--------|-------------| | `/v1/evaluate/signup` | POST | Core decision engine - returns ALLOW/CHALLENGE/BLOCK | | `/v1/evaluate/email` | GET | Standalone email risk check | | `/v1/evaluate/ip` | GET | Standalone IP risk check | | `/v1/lists` | GET/POST | Manage allow/block lists | | `/v1/rules` | GET/POST | Manage custom rules | | `/v1/feedback/signup` | POST | Submit feedback for model improvement | | `/v1/events` | GET | Query signup events | | `/v1/metrics/signup` | GET | Get signup metrics | ## Decision Engine The core `/v1/evaluate/signup` endpoint evaluates signup attempts and returns one of three decisions: - **ALLOW** (risk score < 50) - Safe to proceed - **CHALLENGE** (risk score 50-79) - Require additional verification - **BLOCK** (risk score >= 80) - Reject signup ## Rate Limits - 1000 requests per minute per API key - 10,000 requests per hour per API key
|
|
5
|
+
|
|
6
|
+
The version of the OpenAPI document: v1
|
|
7
|
+
Contact: support@signupcheck.com
|
|
8
|
+
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
|
9
|
+
|
|
10
|
+
Do not edit the class manually.
|
|
11
|
+
""" # noqa: E501
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
import warnings
|
|
15
|
+
from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt
|
|
16
|
+
from typing import Any, Dict, List, Optional, Tuple, Union
|
|
17
|
+
from typing_extensions import Annotated
|
|
18
|
+
|
|
19
|
+
from signupcheck.models.get_me200_response import GetMe200Response
|
|
20
|
+
|
|
21
|
+
from signupcheck.api_client import ApiClient, RequestSerialized
|
|
22
|
+
from signupcheck.api_response import ApiResponse
|
|
23
|
+
from signupcheck.rest import RESTResponseType
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
class AccountApi:
|
|
27
|
+
"""NOTE: This class is auto generated by OpenAPI Generator
|
|
28
|
+
Ref: https://openapi-generator.tech
|
|
29
|
+
|
|
30
|
+
Do not edit the class manually.
|
|
31
|
+
"""
|
|
32
|
+
|
|
33
|
+
def __init__(self, api_client=None) -> None:
|
|
34
|
+
if api_client is None:
|
|
35
|
+
api_client = ApiClient.get_default()
|
|
36
|
+
self.api_client = api_client
|
|
37
|
+
|
|
38
|
+
|
|
39
|
+
@validate_call
|
|
40
|
+
def get_me(
|
|
41
|
+
self,
|
|
42
|
+
_request_timeout: Union[
|
|
43
|
+
None,
|
|
44
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
45
|
+
Tuple[
|
|
46
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
47
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
48
|
+
]
|
|
49
|
+
] = None,
|
|
50
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
51
|
+
_content_type: Optional[StrictStr] = None,
|
|
52
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
53
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
54
|
+
) -> GetMe200Response:
|
|
55
|
+
"""Validate API key
|
|
56
|
+
|
|
57
|
+
Validates the API key and returns account information. This endpoint does NOT consume API credits.
|
|
58
|
+
|
|
59
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
60
|
+
number provided, it will be total request
|
|
61
|
+
timeout. It can also be a pair (tuple) of
|
|
62
|
+
(connection, read) timeouts.
|
|
63
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
64
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
65
|
+
request; this effectively ignores the
|
|
66
|
+
authentication in the spec for a single request.
|
|
67
|
+
:type _request_auth: dict, optional
|
|
68
|
+
:param _content_type: force content-type for the request.
|
|
69
|
+
:type _content_type: str, Optional
|
|
70
|
+
:param _headers: set to override the headers for a single
|
|
71
|
+
request; this effectively ignores the headers
|
|
72
|
+
in the spec for a single request.
|
|
73
|
+
:type _headers: dict, optional
|
|
74
|
+
:param _host_index: set to override the host_index for a single
|
|
75
|
+
request; this effectively ignores the host_index
|
|
76
|
+
in the spec for a single request.
|
|
77
|
+
:type _host_index: int, optional
|
|
78
|
+
:return: Returns the result object.
|
|
79
|
+
""" # noqa: E501
|
|
80
|
+
|
|
81
|
+
_param = self._get_me_serialize(
|
|
82
|
+
_request_auth=_request_auth,
|
|
83
|
+
_content_type=_content_type,
|
|
84
|
+
_headers=_headers,
|
|
85
|
+
_host_index=_host_index
|
|
86
|
+
)
|
|
87
|
+
|
|
88
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
89
|
+
'200': "GetMe200Response",
|
|
90
|
+
'401': "GetMe401Response",
|
|
91
|
+
}
|
|
92
|
+
response_data = self.api_client.call_api(
|
|
93
|
+
*_param,
|
|
94
|
+
_request_timeout=_request_timeout
|
|
95
|
+
)
|
|
96
|
+
response_data.read()
|
|
97
|
+
return self.api_client.response_deserialize(
|
|
98
|
+
response_data=response_data,
|
|
99
|
+
response_types_map=_response_types_map,
|
|
100
|
+
).data
|
|
101
|
+
|
|
102
|
+
|
|
103
|
+
@validate_call
|
|
104
|
+
def get_me_with_http_info(
|
|
105
|
+
self,
|
|
106
|
+
_request_timeout: Union[
|
|
107
|
+
None,
|
|
108
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
109
|
+
Tuple[
|
|
110
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
111
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
112
|
+
]
|
|
113
|
+
] = None,
|
|
114
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
115
|
+
_content_type: Optional[StrictStr] = None,
|
|
116
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
117
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
118
|
+
) -> ApiResponse[GetMe200Response]:
|
|
119
|
+
"""Validate API key
|
|
120
|
+
|
|
121
|
+
Validates the API key and returns account information. This endpoint does NOT consume API credits.
|
|
122
|
+
|
|
123
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
124
|
+
number provided, it will be total request
|
|
125
|
+
timeout. It can also be a pair (tuple) of
|
|
126
|
+
(connection, read) timeouts.
|
|
127
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
128
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
129
|
+
request; this effectively ignores the
|
|
130
|
+
authentication in the spec for a single request.
|
|
131
|
+
:type _request_auth: dict, optional
|
|
132
|
+
:param _content_type: force content-type for the request.
|
|
133
|
+
:type _content_type: str, Optional
|
|
134
|
+
:param _headers: set to override the headers for a single
|
|
135
|
+
request; this effectively ignores the headers
|
|
136
|
+
in the spec for a single request.
|
|
137
|
+
:type _headers: dict, optional
|
|
138
|
+
:param _host_index: set to override the host_index for a single
|
|
139
|
+
request; this effectively ignores the host_index
|
|
140
|
+
in the spec for a single request.
|
|
141
|
+
:type _host_index: int, optional
|
|
142
|
+
:return: Returns the result object.
|
|
143
|
+
""" # noqa: E501
|
|
144
|
+
|
|
145
|
+
_param = self._get_me_serialize(
|
|
146
|
+
_request_auth=_request_auth,
|
|
147
|
+
_content_type=_content_type,
|
|
148
|
+
_headers=_headers,
|
|
149
|
+
_host_index=_host_index
|
|
150
|
+
)
|
|
151
|
+
|
|
152
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
153
|
+
'200': "GetMe200Response",
|
|
154
|
+
'401': "GetMe401Response",
|
|
155
|
+
}
|
|
156
|
+
response_data = self.api_client.call_api(
|
|
157
|
+
*_param,
|
|
158
|
+
_request_timeout=_request_timeout
|
|
159
|
+
)
|
|
160
|
+
response_data.read()
|
|
161
|
+
return self.api_client.response_deserialize(
|
|
162
|
+
response_data=response_data,
|
|
163
|
+
response_types_map=_response_types_map,
|
|
164
|
+
)
|
|
165
|
+
|
|
166
|
+
|
|
167
|
+
@validate_call
|
|
168
|
+
def get_me_without_preload_content(
|
|
169
|
+
self,
|
|
170
|
+
_request_timeout: Union[
|
|
171
|
+
None,
|
|
172
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
173
|
+
Tuple[
|
|
174
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
175
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
176
|
+
]
|
|
177
|
+
] = None,
|
|
178
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
179
|
+
_content_type: Optional[StrictStr] = None,
|
|
180
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
181
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
182
|
+
) -> RESTResponseType:
|
|
183
|
+
"""Validate API key
|
|
184
|
+
|
|
185
|
+
Validates the API key and returns account information. This endpoint does NOT consume API credits.
|
|
186
|
+
|
|
187
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
188
|
+
number provided, it will be total request
|
|
189
|
+
timeout. It can also be a pair (tuple) of
|
|
190
|
+
(connection, read) timeouts.
|
|
191
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
192
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
193
|
+
request; this effectively ignores the
|
|
194
|
+
authentication in the spec for a single request.
|
|
195
|
+
:type _request_auth: dict, optional
|
|
196
|
+
:param _content_type: force content-type for the request.
|
|
197
|
+
:type _content_type: str, Optional
|
|
198
|
+
:param _headers: set to override the headers for a single
|
|
199
|
+
request; this effectively ignores the headers
|
|
200
|
+
in the spec for a single request.
|
|
201
|
+
:type _headers: dict, optional
|
|
202
|
+
:param _host_index: set to override the host_index for a single
|
|
203
|
+
request; this effectively ignores the host_index
|
|
204
|
+
in the spec for a single request.
|
|
205
|
+
:type _host_index: int, optional
|
|
206
|
+
:return: Returns the result object.
|
|
207
|
+
""" # noqa: E501
|
|
208
|
+
|
|
209
|
+
_param = self._get_me_serialize(
|
|
210
|
+
_request_auth=_request_auth,
|
|
211
|
+
_content_type=_content_type,
|
|
212
|
+
_headers=_headers,
|
|
213
|
+
_host_index=_host_index
|
|
214
|
+
)
|
|
215
|
+
|
|
216
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
217
|
+
'200': "GetMe200Response",
|
|
218
|
+
'401': "GetMe401Response",
|
|
219
|
+
}
|
|
220
|
+
response_data = self.api_client.call_api(
|
|
221
|
+
*_param,
|
|
222
|
+
_request_timeout=_request_timeout
|
|
223
|
+
)
|
|
224
|
+
return response_data.response
|
|
225
|
+
|
|
226
|
+
|
|
227
|
+
def _get_me_serialize(
|
|
228
|
+
self,
|
|
229
|
+
_request_auth,
|
|
230
|
+
_content_type,
|
|
231
|
+
_headers,
|
|
232
|
+
_host_index,
|
|
233
|
+
) -> RequestSerialized:
|
|
234
|
+
|
|
235
|
+
_host = None
|
|
236
|
+
|
|
237
|
+
_collection_formats: Dict[str, str] = {
|
|
238
|
+
}
|
|
239
|
+
|
|
240
|
+
_path_params: Dict[str, str] = {}
|
|
241
|
+
_query_params: List[Tuple[str, str]] = []
|
|
242
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
243
|
+
_form_params: List[Tuple[str, str]] = []
|
|
244
|
+
_files: Dict[
|
|
245
|
+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
|
246
|
+
] = {}
|
|
247
|
+
_body_params: Optional[bytes] = None
|
|
248
|
+
|
|
249
|
+
# process the path parameters
|
|
250
|
+
# process the query parameters
|
|
251
|
+
# process the header parameters
|
|
252
|
+
# process the form parameters
|
|
253
|
+
# process the body parameter
|
|
254
|
+
|
|
255
|
+
|
|
256
|
+
# set the HTTP header `Accept`
|
|
257
|
+
if 'Accept' not in _header_params:
|
|
258
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
|
259
|
+
[
|
|
260
|
+
'application/json'
|
|
261
|
+
]
|
|
262
|
+
)
|
|
263
|
+
|
|
264
|
+
|
|
265
|
+
# authentication setting
|
|
266
|
+
_auth_settings: List[str] = [
|
|
267
|
+
'API Key',
|
|
268
|
+
'Bearer'
|
|
269
|
+
]
|
|
270
|
+
|
|
271
|
+
return self.api_client.param_serialize(
|
|
272
|
+
method='GET',
|
|
273
|
+
resource_path='/v1/me',
|
|
274
|
+
path_params=_path_params,
|
|
275
|
+
query_params=_query_params,
|
|
276
|
+
header_params=_header_params,
|
|
277
|
+
body=_body_params,
|
|
278
|
+
post_params=_form_params,
|
|
279
|
+
files=_files,
|
|
280
|
+
auth_settings=_auth_settings,
|
|
281
|
+
collection_formats=_collection_formats,
|
|
282
|
+
_host=_host,
|
|
283
|
+
_request_auth=_request_auth
|
|
284
|
+
)
|
|
285
|
+
|
|
286
|
+
|