internetdata 2.15.2__tar.gz → 2.17.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.
- {internetdata-2.15.2 → internetdata-2.17.0}/PKG-INFO +23 -10
- {internetdata-2.15.2 → internetdata-2.17.0}/README.md +22 -9
- {internetdata-2.15.2 → internetdata-2.17.0}/scripts/generate.sh +27 -0
- {internetdata-2.15.2 → internetdata-2.17.0}/spec/openapi.yaml +269 -83
- {internetdata-2.15.2 → internetdata-2.17.0}/src/internetdata/__init__.py +13 -1
- {internetdata-2.15.2 → internetdata-2.17.0}/src/internetdata/_core.py +1 -1
- {internetdata-2.15.2 → internetdata-2.17.0}/src/internetdata/_generated/api/api_keys/account_create_apikey.py +8 -16
- {internetdata-2.15.2 → internetdata-2.17.0}/src/internetdata/_generated/api/api_keys/account_list_apikeys.py +20 -12
- {internetdata-2.15.2 → internetdata-2.17.0}/src/internetdata/_generated/api/database_v_2/download_database_v2.py +16 -8
- {internetdata-2.15.2 → internetdata-2.17.0}/src/internetdata/_generated/api/database_v_2/list_downloads.py +8 -8
- {internetdata-2.15.2 → internetdata-2.17.0}/src/internetdata/_generated/api/lookup/lookup_domain.py +24 -12
- {internetdata-2.15.2 → internetdata-2.17.0}/src/internetdata/_generated/api/organization/account_org.py +12 -16
- {internetdata-2.15.2 → internetdata-2.17.0}/src/internetdata/_generated/api/organization/account_org_members.py +16 -12
- {internetdata-2.15.2 → internetdata-2.17.0}/src/internetdata/_generated/models/__init__.py +12 -0
- {internetdata-2.15.2 → internetdata-2.17.0}/src/internetdata/_generated/models/asn.py +2 -2
- {internetdata-2.15.2 → internetdata-2.17.0}/src/internetdata/_generated/models/asn_lookup_response.py +2 -2
- internetdata-2.17.0/src/internetdata/_generated/models/cohosted_domains.py +79 -0
- internetdata-2.17.0/src/internetdata/_generated/models/database_format.py +19 -0
- internetdata-2.17.0/src/internetdata/_generated/models/database_license_type_type_1.py +20 -0
- internetdata-2.17.0/src/internetdata/_generated/models/database_license_type_type_2_type_1.py +20 -0
- internetdata-2.17.0/src/internetdata/_generated/models/database_license_type_type_3_type_1.py +20 -0
- internetdata-2.17.0/src/internetdata/_generated/models/domain_backlinks.py +71 -0
- internetdata-2.17.0/src/internetdata/_generated/models/domain_host.py +76 -0
- {internetdata-2.15.2 → internetdata-2.17.0}/src/internetdata/_generated/models/domain_lookup_response.py +102 -2
- internetdata-2.17.0/src/internetdata/_generated/models/domain_redirects.py +71 -0
- internetdata-2.17.0/src/internetdata/_generated/models/domain_web.py +101 -0
- internetdata-2.17.0/src/internetdata/_generated/models/domain_web_links.py +70 -0
- internetdata-2.17.0/src/internetdata/_generated/models/download_outcome.py +23 -0
- {internetdata-2.15.2 → internetdata-2.17.0}/src/internetdata/_generated/models/entitlement_plan.py +2 -2
- internetdata-2.17.0/src/internetdata/_generated/models/entitlement_plan_tier.py +21 -0
- {internetdata-2.15.2 → internetdata-2.17.0}/src/internetdata/_generated/models/lookup_response.py +2 -2
- internetdata-2.17.0/src/internetdata/_generated/models/standing.py +20 -0
- {internetdata-2.15.2 → internetdata-2.17.0}/src/internetdata/aio.py +7 -6
- {internetdata-2.15.2 → internetdata-2.17.0}/src/internetdata/client.py +9 -9
- {internetdata-2.15.2 → internetdata-2.17.0}/src/internetdata/middleware/core.py +1 -1
- {internetdata-2.15.2 → internetdata-2.17.0}/src/internetdata/models.py +106 -22
- {internetdata-2.15.2 → internetdata-2.17.0}/testdata/testdata.json +81 -4
- {internetdata-2.15.2 → internetdata-2.17.0}/tests/test_cache_life.py +1 -1
- {internetdata-2.15.2 → internetdata-2.17.0}/tests/test_client.py +17 -15
- {internetdata-2.15.2 → internetdata-2.17.0}/tests/test_conformance.py +82 -0
- {internetdata-2.15.2 → internetdata-2.17.0}/tests/test_lookup.py +41 -2
- internetdata-2.15.2/src/internetdata/_generated/models/database_format.py +0 -9
- internetdata-2.15.2/src/internetdata/_generated/models/database_license_type_type_1.py +0 -10
- internetdata-2.15.2/src/internetdata/_generated/models/database_license_type_type_2_type_1.py +0 -10
- internetdata-2.15.2/src/internetdata/_generated/models/database_license_type_type_3_type_1.py +0 -10
- internetdata-2.15.2/src/internetdata/_generated/models/download_outcome.py +0 -13
- internetdata-2.15.2/src/internetdata/_generated/models/entitlement_plan_tier.py +0 -11
- internetdata-2.15.2/src/internetdata/_generated/models/standing.py +0 -10
- {internetdata-2.15.2 → internetdata-2.17.0}/.gitignore +0 -0
- {internetdata-2.15.2 → internetdata-2.17.0}/LICENSE +0 -0
- {internetdata-2.15.2 → internetdata-2.17.0}/pyproject.toml +0 -0
- {internetdata-2.15.2 → internetdata-2.17.0}/scripts/download-spec.sh +0 -0
- {internetdata-2.15.2 → internetdata-2.17.0}/scripts/publish.sh +0 -0
- {internetdata-2.15.2 → internetdata-2.17.0}/scripts/v2_subset.py +0 -0
- {internetdata-2.15.2 → internetdata-2.17.0}/src/internetdata/_bogons.py +0 -0
- {internetdata-2.15.2 → internetdata-2.17.0}/src/internetdata/_generated/__init__.py +0 -0
- {internetdata-2.15.2 → internetdata-2.17.0}/src/internetdata/_generated/api/__init__.py +0 -0
- {internetdata-2.15.2 → internetdata-2.17.0}/src/internetdata/_generated/api/account/__init__.py +0 -0
- {internetdata-2.15.2 → internetdata-2.17.0}/src/internetdata/_generated/api/account/account_identity.py +0 -0
- {internetdata-2.15.2 → internetdata-2.17.0}/src/internetdata/_generated/api/api_keys/__init__.py +0 -0
- {internetdata-2.15.2 → internetdata-2.17.0}/src/internetdata/_generated/api/api_keys/account_reveal_apikey.py +0 -0
- {internetdata-2.15.2 → internetdata-2.17.0}/src/internetdata/_generated/api/api_keys/account_revoke_apikey.py +0 -0
- {internetdata-2.15.2 → internetdata-2.17.0}/src/internetdata/_generated/api/api_keys/account_rotate_apikey.py +0 -0
- {internetdata-2.15.2 → internetdata-2.17.0}/src/internetdata/_generated/api/authorization/__init__.py +0 -0
- {internetdata-2.15.2 → internetdata-2.17.0}/src/internetdata/_generated/api/authorization/oauth_authorize.py +0 -0
- {internetdata-2.15.2 → internetdata-2.17.0}/src/internetdata/_generated/api/authorization/oauth_device_authorization.py +0 -0
- {internetdata-2.15.2 → internetdata-2.17.0}/src/internetdata/_generated/api/authorization/oauth_metadata.py +0 -0
- {internetdata-2.15.2 → internetdata-2.17.0}/src/internetdata/_generated/api/authorization/oauth_register.py +0 -0
- {internetdata-2.15.2 → internetdata-2.17.0}/src/internetdata/_generated/api/authorization/oauth_revoke.py +0 -0
- {internetdata-2.15.2 → internetdata-2.17.0}/src/internetdata/_generated/api/authorization/oauth_token.py +0 -0
- {internetdata-2.15.2 → internetdata-2.17.0}/src/internetdata/_generated/api/database_v_2/__init__.py +0 -0
- {internetdata-2.15.2 → internetdata-2.17.0}/src/internetdata/_generated/api/database_v_2/database_checksum_v2.py +0 -0
- {internetdata-2.15.2 → internetdata-2.17.0}/src/internetdata/_generated/api/database_v_2/database_metadata_v2.py +0 -0
- {internetdata-2.15.2 → internetdata-2.17.0}/src/internetdata/_generated/api/database_v_2/list_databases.py +0 -0
- {internetdata-2.15.2 → internetdata-2.17.0}/src/internetdata/_generated/api/entitlement/__init__.py +0 -0
- {internetdata-2.15.2 → internetdata-2.17.0}/src/internetdata/_generated/api/entitlement/my_entitlement.py +0 -0
- {internetdata-2.15.2 → internetdata-2.17.0}/src/internetdata/_generated/api/lookup/__init__.py +0 -0
- {internetdata-2.15.2 → internetdata-2.17.0}/src/internetdata/_generated/api/lookup/lookup_asn.py +0 -0
- {internetdata-2.15.2 → internetdata-2.17.0}/src/internetdata/_generated/api/lookup/lookup_batch.py +0 -0
- {internetdata-2.15.2 → internetdata-2.17.0}/src/internetdata/_generated/api/lookup/lookup_ip.py +0 -0
- {internetdata-2.15.2 → internetdata-2.17.0}/src/internetdata/_generated/api/lookup/lookup_my_ip.py +0 -0
- {internetdata-2.15.2 → internetdata-2.17.0}/src/internetdata/_generated/api/organization/__init__.py +0 -0
- {internetdata-2.15.2 → internetdata-2.17.0}/src/internetdata/_generated/client.py +0 -0
- {internetdata-2.15.2 → internetdata-2.17.0}/src/internetdata/_generated/errors.py +0 -0
- {internetdata-2.15.2 → internetdata-2.17.0}/src/internetdata/_generated/models/abuse_contact.py +0 -0
- {internetdata-2.15.2 → internetdata-2.17.0}/src/internetdata/_generated/models/account_create_apikey_request.py +0 -0
- {internetdata-2.15.2 → internetdata-2.17.0}/src/internetdata/_generated/models/account_created_apikey.py +0 -0
- {internetdata-2.15.2 → internetdata-2.17.0}/src/internetdata/_generated/models/account_org.py +0 -0
- {internetdata-2.15.2 → internetdata-2.17.0}/src/internetdata/_generated/models/account_org_ref.py +0 -0
- {internetdata-2.15.2 → internetdata-2.17.0}/src/internetdata/_generated/models/account_org_wrap.py +0 -0
- {internetdata-2.15.2 → internetdata-2.17.0}/src/internetdata/_generated/models/account_rc.py +0 -0
- {internetdata-2.15.2 → internetdata-2.17.0}/src/internetdata/_generated/models/account_revealed_apikey.py +0 -0
- {internetdata-2.15.2 → internetdata-2.17.0}/src/internetdata/_generated/models/account_user.py +0 -0
- {internetdata-2.15.2 → internetdata-2.17.0}/src/internetdata/_generated/models/apikey_detail.py +0 -0
- {internetdata-2.15.2 → internetdata-2.17.0}/src/internetdata/_generated/models/apikey_list.py +0 -0
- {internetdata-2.15.2 → internetdata-2.17.0}/src/internetdata/_generated/models/asn_hosted_domains.py +0 -0
- {internetdata-2.15.2 → internetdata-2.17.0}/src/internetdata/_generated/models/asn_lookup_response_whois.py +0 -0
- {internetdata-2.15.2 → internetdata-2.17.0}/src/internetdata/_generated/models/asn_prefix.py +0 -0
- {internetdata-2.15.2 → internetdata-2.17.0}/src/internetdata/_generated/models/batch_lookup_error.py +0 -0
- {internetdata-2.15.2 → internetdata-2.17.0}/src/internetdata/_generated/models/batch_lookup_request.py +0 -0
- {internetdata-2.15.2 → internetdata-2.17.0}/src/internetdata/_generated/models/batch_lookup_response.py +0 -0
- {internetdata-2.15.2 → internetdata-2.17.0}/src/internetdata/_generated/models/batch_lookup_response_errors.py +0 -0
- {internetdata-2.15.2 → internetdata-2.17.0}/src/internetdata/_generated/models/batch_lookup_response_results.py +0 -0
- {internetdata-2.15.2 → internetdata-2.17.0}/src/internetdata/_generated/models/bit_torrent_detail.py +0 -0
- {internetdata-2.15.2 → internetdata-2.17.0}/src/internetdata/_generated/models/carrier_detail.py +0 -0
- {internetdata-2.15.2 → internetdata-2.17.0}/src/internetdata/_generated/models/class_detail.py +0 -0
- {internetdata-2.15.2 → internetdata-2.17.0}/src/internetdata/_generated/models/client_registration.py +0 -0
- {internetdata-2.15.2 → internetdata-2.17.0}/src/internetdata/_generated/models/client_registration_request.py +0 -0
- {internetdata-2.15.2 → internetdata-2.17.0}/src/internetdata/_generated/models/company.py +0 -0
- {internetdata-2.15.2 → internetdata-2.17.0}/src/internetdata/_generated/models/database.py +0 -0
- {internetdata-2.15.2 → internetdata-2.17.0}/src/internetdata/_generated/models/database_checksum_v2_response_200.py +0 -0
- {internetdata-2.15.2 → internetdata-2.17.0}/src/internetdata/_generated/models/database_metadata.py +0 -0
- {internetdata-2.15.2 → internetdata-2.17.0}/src/internetdata/_generated/models/database_metadata_column.py +0 -0
- {internetdata-2.15.2 → internetdata-2.17.0}/src/internetdata/_generated/models/database_metadata_sample.py +0 -0
- {internetdata-2.15.2 → internetdata-2.17.0}/src/internetdata/_generated/models/database_metadata_sample_additional_property_item.py +0 -0
- {internetdata-2.15.2 → internetdata-2.17.0}/src/internetdata/_generated/models/database_metadata_sample_size.py +0 -0
- {internetdata-2.15.2 → internetdata-2.17.0}/src/internetdata/_generated/models/database_metadata_schema.py +0 -0
- {internetdata-2.15.2 → internetdata-2.17.0}/src/internetdata/_generated/models/database_metadata_size.py +0 -0
- {internetdata-2.15.2 → internetdata-2.17.0}/src/internetdata/_generated/models/database_version.py +0 -0
- {internetdata-2.15.2 → internetdata-2.17.0}/src/internetdata/_generated/models/db_checksums.py +0 -0
- {internetdata-2.15.2 → internetdata-2.17.0}/src/internetdata/_generated/models/device_authorization.py +0 -0
- {internetdata-2.15.2 → internetdata-2.17.0}/src/internetdata/_generated/models/device_authorization_request.py +0 -0
- {internetdata-2.15.2 → internetdata-2.17.0}/src/internetdata/_generated/models/disposable_detail.py +0 -0
- {internetdata-2.15.2 → internetdata-2.17.0}/src/internetdata/_generated/models/dns_address_record.py +0 -0
- {internetdata-2.15.2 → internetdata-2.17.0}/src/internetdata/_generated/models/dns_cname_record.py +0 -0
- {internetdata-2.15.2 → internetdata-2.17.0}/src/internetdata/_generated/models/dns_mx_record.py +0 -0
- {internetdata-2.15.2 → internetdata-2.17.0}/src/internetdata/_generated/models/dns_ns_record.py +0 -0
- {internetdata-2.15.2 → internetdata-2.17.0}/src/internetdata/_generated/models/dns_resolver_detail.py +0 -0
- {internetdata-2.15.2 → internetdata-2.17.0}/src/internetdata/_generated/models/domain_dns.py +0 -0
- {internetdata-2.15.2 → internetdata-2.17.0}/src/internetdata/_generated/models/domain_ip_range.py +0 -0
- {internetdata-2.15.2 → internetdata-2.17.0}/src/internetdata/_generated/models/domain_ip_ranges.py +0 -0
- {internetdata-2.15.2 → internetdata-2.17.0}/src/internetdata/_generated/models/download.py +0 -0
- {internetdata-2.15.2 → internetdata-2.17.0}/src/internetdata/_generated/models/entitlement.py +0 -0
- {internetdata-2.15.2 → internetdata-2.17.0}/src/internetdata/_generated/models/entitlement_apikey.py +0 -0
- {internetdata-2.15.2 → internetdata-2.17.0}/src/internetdata/_generated/models/entitlement_error.py +0 -0
- {internetdata-2.15.2 → internetdata-2.17.0}/src/internetdata/_generated/models/entitlement_usage.py +0 -0
- {internetdata-2.15.2 → internetdata-2.17.0}/src/internetdata/_generated/models/error.py +0 -0
- {internetdata-2.15.2 → internetdata-2.17.0}/src/internetdata/_generated/models/hosted_domains.py +0 -0
- {internetdata-2.15.2 → internetdata-2.17.0}/src/internetdata/_generated/models/identity.py +0 -0
- {internetdata-2.15.2 → internetdata-2.17.0}/src/internetdata/_generated/models/list_databases_response_200.py +0 -0
- {internetdata-2.15.2 → internetdata-2.17.0}/src/internetdata/_generated/models/list_downloads_response_200.py +0 -0
- {internetdata-2.15.2 → internetdata-2.17.0}/src/internetdata/_generated/models/location.py +0 -0
- {internetdata-2.15.2 → internetdata-2.17.0}/src/internetdata/_generated/models/lookup_error.py +0 -0
- {internetdata-2.15.2 → internetdata-2.17.0}/src/internetdata/_generated/models/oauth_authorize_code_challenge_method.py +0 -0
- {internetdata-2.15.2 → internetdata-2.17.0}/src/internetdata/_generated/models/oauth_authorize_response_type.py +0 -0
- {internetdata-2.15.2 → internetdata-2.17.0}/src/internetdata/_generated/models/oauth_error.py +0 -0
- {internetdata-2.15.2 → internetdata-2.17.0}/src/internetdata/_generated/models/oauth_metadata.py +0 -0
- {internetdata-2.15.2 → internetdata-2.17.0}/src/internetdata/_generated/models/oauth_revoke_response_200.py +0 -0
- {internetdata-2.15.2 → internetdata-2.17.0}/src/internetdata/_generated/models/proxy_detail.py +0 -0
- {internetdata-2.15.2 → internetdata-2.17.0}/src/internetdata/_generated/models/pubproxy_detail.py +0 -0
- {internetdata-2.15.2 → internetdata-2.17.0}/src/internetdata/_generated/models/revoke_request.py +0 -0
- {internetdata-2.15.2 → internetdata-2.17.0}/src/internetdata/_generated/models/rwhois.py +0 -0
- {internetdata-2.15.2 → internetdata-2.17.0}/src/internetdata/_generated/models/satellite_detail.py +0 -0
- {internetdata-2.15.2 → internetdata-2.17.0}/src/internetdata/_generated/models/smtp_detail.py +0 -0
- {internetdata-2.15.2 → internetdata-2.17.0}/src/internetdata/_generated/models/ssh_detail.py +0 -0
- {internetdata-2.15.2 → internetdata-2.17.0}/src/internetdata/_generated/models/token_request.py +0 -0
- {internetdata-2.15.2 → internetdata-2.17.0}/src/internetdata/_generated/models/token_response.py +0 -0
- {internetdata-2.15.2 → internetdata-2.17.0}/src/internetdata/_generated/models/web_detail.py +0 -0
- {internetdata-2.15.2 → internetdata-2.17.0}/src/internetdata/_generated/models/whois.py +0 -0
- {internetdata-2.15.2 → internetdata-2.17.0}/src/internetdata/_generated/types.py +0 -0
- {internetdata-2.15.2 → internetdata-2.17.0}/src/internetdata/bogon.py +0 -0
- {internetdata-2.15.2 → internetdata-2.17.0}/src/internetdata/errors.py +0 -0
- {internetdata-2.15.2 → internetdata-2.17.0}/src/internetdata/middleware/__init__.py +0 -0
- {internetdata-2.15.2 → internetdata-2.17.0}/src/internetdata/middleware/condition.py +0 -0
- {internetdata-2.15.2 → internetdata-2.17.0}/src/internetdata/py.typed +0 -0
- {internetdata-2.15.2 → internetdata-2.17.0}/testdata/bogons.json +0 -0
- {internetdata-2.15.2 → internetdata-2.17.0}/tests/conftest.py +0 -0
- {internetdata-2.15.2 → internetdata-2.17.0}/tests/helpers.py +0 -0
- {internetdata-2.15.2 → internetdata-2.17.0}/tests/test_download.py +0 -0
- {internetdata-2.15.2 → internetdata-2.17.0}/tests/test_middleware.py +0 -0
- {internetdata-2.15.2 → internetdata-2.17.0}/tests/test_oauth.py +0 -0
- {internetdata-2.15.2 → internetdata-2.17.0}/tests/test_sharing.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.5
|
|
2
2
|
Name: internetdata
|
|
3
|
-
Version: 2.
|
|
3
|
+
Version: 2.17.0
|
|
4
4
|
Summary: Official Python client library for the InternetData API. Look up IP addresses, ASNs and domains, and download licensed IP databases.
|
|
5
5
|
Project-URL: Homepage, https://internetdata.io
|
|
6
6
|
Project-URL: Documentation, https://docs.internetdata.io
|
|
@@ -52,7 +52,7 @@ Requires Python 3.11 or newer. Type hints are included, and the package ships `p
|
|
|
52
52
|
|
|
53
53
|
## Usage
|
|
54
54
|
|
|
55
|
-
**No API key needed to start.** Unlimited, the free plan, answers `location`, `asn`, `company`, `abuse` and every flag but the VPN, proxy, hosting and CDN ones,
|
|
55
|
+
**No API key needed to start.** Unlimited, the free plan, answers `location`, `asn`, `company`, `abuse` and every flag but the VPN, proxy, hosting and CDN ones, with no daily or monthly cap, with a key or without one.
|
|
56
56
|
|
|
57
57
|
```python
|
|
58
58
|
from internetdata import InternetData
|
|
@@ -74,7 +74,7 @@ with InternetData() as client:
|
|
|
74
74
|
|
|
75
75
|
### With an API key
|
|
76
76
|
|
|
77
|
-
Every paid plan answers every field: the VPN, proxy, hosting and CDN flags, the detail behind each flag, the city, the Whois records and more. The plans differ only in how many lookups they include, and a free account tries every field
|
|
77
|
+
Every paid plan answers every field: the VPN, proxy, hosting and CDN flags, the detail behind each flag, the city, the Whois records and more. The plans differ only in how many lookups they include, and a free account tries every field. Create a key in the [console](https://app.internetdata.io), then pass it in:
|
|
78
78
|
|
|
79
79
|
```python
|
|
80
80
|
import os
|
|
@@ -122,7 +122,7 @@ print(acct.usage.requests) # 580
|
|
|
122
122
|
print(acct.usage.window_end) # when the allowance resets
|
|
123
123
|
```
|
|
124
124
|
|
|
125
|
-
Usage counts against the anniversary of your subscription on a paid plan, not the calendar month and not the billing period
|
|
125
|
+
Usage counts against the anniversary of your subscription on a paid plan, not the calendar month and not the billing period; on the free plan it counts its trial, the lookups answered with every field. It is the same number a lookup is gated on. `hard_limit` is `None` on an uncapped plan, which is not the same as zero.
|
|
126
126
|
|
|
127
127
|
Both are on the async client too: `await client.my_ip()` and `await client.my_entitlement()`.
|
|
128
128
|
|
|
@@ -169,7 +169,7 @@ client = InternetData(cache_max_size=50_000, cache_ttl=6 * 60 * 60)
|
|
|
169
169
|
client_no_cache = InternetData(cache=False)
|
|
170
170
|
```
|
|
171
171
|
|
|
172
|
-
An answer with `trial_expired` or `cap_reached` true is cached for a minute at most, so a
|
|
172
|
+
An answer with `trial_expired` or `cap_reached` true is cached for a minute at most, so a renewed trial or a raised cap reaches you within a minute.
|
|
173
173
|
|
|
174
174
|
### Private and reserved addresses
|
|
175
175
|
|
|
@@ -206,7 +206,7 @@ domain = client.lookup_domain("example.com")
|
|
|
206
206
|
print(domain.is_registered, domain.has_mx) # True True
|
|
207
207
|
```
|
|
208
208
|
|
|
209
|
-
On a paid plan an AS answer also carries its Whois record, its counts, every prefix it announces, its rank, Tier 1 flag, upstreams, peers and downstreams, and the domains it hosts, and a domain answer its DNS records, its organization's IP ranges
|
|
209
|
+
On a paid plan an AS answer also carries its Whois record, its counts, every prefix it announces, its rank, Tier 1 flag, upstreams, peers and downstreams, and the domains it hosts, and a domain answer its DNS records, the network announcing each of its addresses, the other domains on its first IPv4 address, its organization's IP ranges, `is_disposable`, what its home page says and links to, and the domains whose home page redirects or links to it. Neither is cached, and neither goes through the batch. `lookup` takes addresses alone, and refuses an AS or a domain with a `bad_request` before sending anything.
|
|
210
210
|
|
|
211
211
|
### Errors
|
|
212
212
|
|
|
@@ -236,7 +236,7 @@ result = client.lookup("146.70.116.130", timeout=2)
|
|
|
236
236
|
|
|
237
237
|
**Changed in 2.2.0:** a timeout of 0 or less, NaN or a string used to be accepted, and failed every call.
|
|
238
238
|
|
|
239
|
-
Note that `rate_limited` and `quota_exceeded` both arrive as HTTP 429 and are not the same thing. A rate limit carries `Retry-After`, and retrying after it works
|
|
239
|
+
Note that `rate_limited` and `quota_exceeded` both arrive as HTTP 429 and are not the same thing. A rate limit carries `Retry-After`, and retrying after it works. One without it is `quota_exceeded`. The library retries rate limits for you, but not `quota_exceeded`, and nothing else you sent either. The API itself always sends `Retry-After` with a 429, so that one comes from something in between, such as a proxy; a paid key past its overage cap gets `cap_reached` instead.
|
|
240
240
|
|
|
241
241
|
### Database downloads
|
|
242
242
|
|
|
@@ -318,7 +318,7 @@ assert hashlib.sha256(raw).hexdigest() == digests["sha256"]
|
|
|
318
318
|
|
|
319
319
|
#### Download history
|
|
320
320
|
|
|
321
|
-
`downloads` answers your organization's recent attempts, newest first,
|
|
321
|
+
`downloads` answers your organization's recent attempts, newest first, refused ones included, so a download that stopped working shows why:
|
|
322
322
|
|
|
323
323
|
```python
|
|
324
324
|
for attempt in client.database.downloads(limit=20):
|
|
@@ -389,16 +389,29 @@ Each redirect URI must be https on a public host name, or http on a loopback add
|
|
|
389
389
|
|
|
390
390
|
### Fields your plan does not include
|
|
391
391
|
|
|
392
|
-
Unlimited leaves out the VPN, proxy, hosting and CDN flags, the detail behind every flag but Tor's and relay's, the city and region, the Whois records and the hosted domains; a free-plan key's answer carries `trial_expired`, true once its
|
|
392
|
+
Unlimited leaves out the VPN, proxy, hosting and CDN flags, the detail behind every flag but Tor's and relay's, the city and region, the Whois records and the hosted domains; a free-plan key's answer carries `trial_expired`, true once its trial is spent. A paid key's carries `cap_reached`, true once its organization's overage cap is reached, when the answer has Unlimited's fields and isn't billed. Those are `None` when your key does not include them, which means "not in your plan" rather than "checked, and no", inside `location`, `asn`, `company` and `abuse` too.
|
|
393
393
|
|
|
394
394
|
```python
|
|
395
395
|
result.flagged("is_hosting") # False rather than None on a plan without it
|
|
396
396
|
result.is_hosting is None # True on Unlimited: not in your plan
|
|
397
397
|
result.location.city is None # True on Unlimited
|
|
398
|
-
result.trial_expired is True # a free-plan key's
|
|
398
|
+
result.trial_expired is True # a free-plan key's trial is spent
|
|
399
399
|
result.cap_reached is True # a paid key is past its overage cap
|
|
400
400
|
```
|
|
401
401
|
|
|
402
|
+
### A value the API adds
|
|
403
|
+
|
|
404
|
+
From 2.16.0, a plan's `tier`, a database's `standing` and `license_type`, a version's `formats` and a download's `outcome` and `format` read a value the API adds later as the string served, rather than failing the call. Compare against the values you know and keep a fallback:
|
|
405
|
+
|
|
406
|
+
```python
|
|
407
|
+
if family.standing == "licensed":
|
|
408
|
+
... # download it
|
|
409
|
+
elif family.standing not in STANDINGS:
|
|
410
|
+
... # a standing this release does not know yet
|
|
411
|
+
```
|
|
412
|
+
|
|
413
|
+
A request still names only the formats in `DATABASE_FORMATS`, and any other is refused before anything is sent.
|
|
414
|
+
|
|
402
415
|
## Other Libraries
|
|
403
416
|
|
|
404
417
|
There are official InternetData client libraries available for many languages including PHP, Python, Go, Java, and Ruby. See our GitHub at https://github.com/internetdata for more.
|
|
@@ -17,7 +17,7 @@ Requires Python 3.11 or newer. Type hints are included, and the package ships `p
|
|
|
17
17
|
|
|
18
18
|
## Usage
|
|
19
19
|
|
|
20
|
-
**No API key needed to start.** Unlimited, the free plan, answers `location`, `asn`, `company`, `abuse` and every flag but the VPN, proxy, hosting and CDN ones,
|
|
20
|
+
**No API key needed to start.** Unlimited, the free plan, answers `location`, `asn`, `company`, `abuse` and every flag but the VPN, proxy, hosting and CDN ones, with no daily or monthly cap, with a key or without one.
|
|
21
21
|
|
|
22
22
|
```python
|
|
23
23
|
from internetdata import InternetData
|
|
@@ -39,7 +39,7 @@ with InternetData() as client:
|
|
|
39
39
|
|
|
40
40
|
### With an API key
|
|
41
41
|
|
|
42
|
-
Every paid plan answers every field: the VPN, proxy, hosting and CDN flags, the detail behind each flag, the city, the Whois records and more. The plans differ only in how many lookups they include, and a free account tries every field
|
|
42
|
+
Every paid plan answers every field: the VPN, proxy, hosting and CDN flags, the detail behind each flag, the city, the Whois records and more. The plans differ only in how many lookups they include, and a free account tries every field. Create a key in the [console](https://app.internetdata.io), then pass it in:
|
|
43
43
|
|
|
44
44
|
```python
|
|
45
45
|
import os
|
|
@@ -87,7 +87,7 @@ print(acct.usage.requests) # 580
|
|
|
87
87
|
print(acct.usage.window_end) # when the allowance resets
|
|
88
88
|
```
|
|
89
89
|
|
|
90
|
-
Usage counts against the anniversary of your subscription on a paid plan, not the calendar month and not the billing period
|
|
90
|
+
Usage counts against the anniversary of your subscription on a paid plan, not the calendar month and not the billing period; on the free plan it counts its trial, the lookups answered with every field. It is the same number a lookup is gated on. `hard_limit` is `None` on an uncapped plan, which is not the same as zero.
|
|
91
91
|
|
|
92
92
|
Both are on the async client too: `await client.my_ip()` and `await client.my_entitlement()`.
|
|
93
93
|
|
|
@@ -134,7 +134,7 @@ client = InternetData(cache_max_size=50_000, cache_ttl=6 * 60 * 60)
|
|
|
134
134
|
client_no_cache = InternetData(cache=False)
|
|
135
135
|
```
|
|
136
136
|
|
|
137
|
-
An answer with `trial_expired` or `cap_reached` true is cached for a minute at most, so a
|
|
137
|
+
An answer with `trial_expired` or `cap_reached` true is cached for a minute at most, so a renewed trial or a raised cap reaches you within a minute.
|
|
138
138
|
|
|
139
139
|
### Private and reserved addresses
|
|
140
140
|
|
|
@@ -171,7 +171,7 @@ domain = client.lookup_domain("example.com")
|
|
|
171
171
|
print(domain.is_registered, domain.has_mx) # True True
|
|
172
172
|
```
|
|
173
173
|
|
|
174
|
-
On a paid plan an AS answer also carries its Whois record, its counts, every prefix it announces, its rank, Tier 1 flag, upstreams, peers and downstreams, and the domains it hosts, and a domain answer its DNS records, its organization's IP ranges
|
|
174
|
+
On a paid plan an AS answer also carries its Whois record, its counts, every prefix it announces, its rank, Tier 1 flag, upstreams, peers and downstreams, and the domains it hosts, and a domain answer its DNS records, the network announcing each of its addresses, the other domains on its first IPv4 address, its organization's IP ranges, `is_disposable`, what its home page says and links to, and the domains whose home page redirects or links to it. Neither is cached, and neither goes through the batch. `lookup` takes addresses alone, and refuses an AS or a domain with a `bad_request` before sending anything.
|
|
175
175
|
|
|
176
176
|
### Errors
|
|
177
177
|
|
|
@@ -201,7 +201,7 @@ result = client.lookup("146.70.116.130", timeout=2)
|
|
|
201
201
|
|
|
202
202
|
**Changed in 2.2.0:** a timeout of 0 or less, NaN or a string used to be accepted, and failed every call.
|
|
203
203
|
|
|
204
|
-
Note that `rate_limited` and `quota_exceeded` both arrive as HTTP 429 and are not the same thing. A rate limit carries `Retry-After`, and retrying after it works
|
|
204
|
+
Note that `rate_limited` and `quota_exceeded` both arrive as HTTP 429 and are not the same thing. A rate limit carries `Retry-After`, and retrying after it works. One without it is `quota_exceeded`. The library retries rate limits for you, but not `quota_exceeded`, and nothing else you sent either. The API itself always sends `Retry-After` with a 429, so that one comes from something in between, such as a proxy; a paid key past its overage cap gets `cap_reached` instead.
|
|
205
205
|
|
|
206
206
|
### Database downloads
|
|
207
207
|
|
|
@@ -283,7 +283,7 @@ assert hashlib.sha256(raw).hexdigest() == digests["sha256"]
|
|
|
283
283
|
|
|
284
284
|
#### Download history
|
|
285
285
|
|
|
286
|
-
`downloads` answers your organization's recent attempts, newest first,
|
|
286
|
+
`downloads` answers your organization's recent attempts, newest first, refused ones included, so a download that stopped working shows why:
|
|
287
287
|
|
|
288
288
|
```python
|
|
289
289
|
for attempt in client.database.downloads(limit=20):
|
|
@@ -354,16 +354,29 @@ Each redirect URI must be https on a public host name, or http on a loopback add
|
|
|
354
354
|
|
|
355
355
|
### Fields your plan does not include
|
|
356
356
|
|
|
357
|
-
Unlimited leaves out the VPN, proxy, hosting and CDN flags, the detail behind every flag but Tor's and relay's, the city and region, the Whois records and the hosted domains; a free-plan key's answer carries `trial_expired`, true once its
|
|
357
|
+
Unlimited leaves out the VPN, proxy, hosting and CDN flags, the detail behind every flag but Tor's and relay's, the city and region, the Whois records and the hosted domains; a free-plan key's answer carries `trial_expired`, true once its trial is spent. A paid key's carries `cap_reached`, true once its organization's overage cap is reached, when the answer has Unlimited's fields and isn't billed. Those are `None` when your key does not include them, which means "not in your plan" rather than "checked, and no", inside `location`, `asn`, `company` and `abuse` too.
|
|
358
358
|
|
|
359
359
|
```python
|
|
360
360
|
result.flagged("is_hosting") # False rather than None on a plan without it
|
|
361
361
|
result.is_hosting is None # True on Unlimited: not in your plan
|
|
362
362
|
result.location.city is None # True on Unlimited
|
|
363
|
-
result.trial_expired is True # a free-plan key's
|
|
363
|
+
result.trial_expired is True # a free-plan key's trial is spent
|
|
364
364
|
result.cap_reached is True # a paid key is past its overage cap
|
|
365
365
|
```
|
|
366
366
|
|
|
367
|
+
### A value the API adds
|
|
368
|
+
|
|
369
|
+
From 2.16.0, a plan's `tier`, a database's `standing` and `license_type`, a version's `formats` and a download's `outcome` and `format` read a value the API adds later as the string served, rather than failing the call. Compare against the values you know and keep a fallback:
|
|
370
|
+
|
|
371
|
+
```python
|
|
372
|
+
if family.standing == "licensed":
|
|
373
|
+
... # download it
|
|
374
|
+
elif family.standing not in STANDINGS:
|
|
375
|
+
... # a standing this release does not know yet
|
|
376
|
+
```
|
|
377
|
+
|
|
378
|
+
A request still names only the formats in `DATABASE_FORMATS`, and any other is refused before anything is sent.
|
|
379
|
+
|
|
367
380
|
## Other Libraries
|
|
368
381
|
|
|
369
382
|
There are official InternetData client libraries available for many languages including PHP, Python, Go, Java, and Ruby. See our GitHub at https://github.com/internetdata for more.
|
|
@@ -48,5 +48,32 @@ openapi-python-client generate \
|
|
|
48
48
|
# not use anywhere. Normalizing them here keeps generation deterministic.
|
|
49
49
|
find src/internetdata/_generated -name '*.py' -exec sed -i 's/\xe2\x80\x94/ - /g' {} +
|
|
50
50
|
|
|
51
|
+
# A value the API adds to a closed vocabulary in an ANSWER comes back as served rather
|
|
52
|
+
# than failing the whole call, so a release already installed keeps reading the API's
|
|
53
|
+
# answers. Each response enum gains a `_missing_` returning a member that carries the
|
|
54
|
+
# value. A wrong type is still refused, a request still refuses a value outside the
|
|
55
|
+
# pinned list before the network (`models.wire_format`), and a listed file the generator
|
|
56
|
+
# stops emitting stops this script rather than leaving one enum closed.
|
|
57
|
+
for enum in entitlement_plan_tier standing database_format download_outcome \
|
|
58
|
+
database_license_type_type_1 database_license_type_type_2_type_1 \
|
|
59
|
+
database_license_type_type_3_type_1 ; do
|
|
60
|
+
file="src/internetdata/_generated/models/${enum}.py"
|
|
61
|
+
[ -f "$file" ] || { echo "no ${file}: the generated enums moved" >&2 ; exit 1 ; }
|
|
62
|
+
class="$(sed -n 's/^class \([A-Za-z0-9]*\)(StrEnum):$/\1/p' "$file")"
|
|
63
|
+
[ -n "$class" ] || { echo "${file} holds no StrEnum" >&2 ; exit 1 ; }
|
|
64
|
+
cat >> "$file" <<EOF
|
|
65
|
+
|
|
66
|
+
@classmethod
|
|
67
|
+
def _missing_(cls, value: object) -> "${class} | None":
|
|
68
|
+
# A value the API added after this release, handed back as served.
|
|
69
|
+
if not isinstance(value, str):
|
|
70
|
+
return None
|
|
71
|
+
member = str.__new__(cls, value)
|
|
72
|
+
member._name_ = value
|
|
73
|
+
member._value_ = value
|
|
74
|
+
return member
|
|
75
|
+
EOF
|
|
76
|
+
done
|
|
77
|
+
|
|
51
78
|
echo "src/internetdata/_generated <- spec/openapi.yaml"
|
|
52
79
|
grep -m1 '^ version:' spec/openapi.yaml
|