blitz-api-py 0.1.0__py3-none-any.whl
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.
- blitz_api/__init__.py +65 -0
- blitz_api/_base_client.py +191 -0
- blitz_api/_client.py +13 -0
- blitz_api/_client_async.py +143 -0
- blitz_api/_client_sync.py +145 -0
- blitz_api/_compat.py +26 -0
- blitz_api/_constants.py +36 -0
- blitz_api/_exceptions.py +113 -0
- blitz_api/_pagination_async.py +128 -0
- blitz_api/_pagination_base.py +52 -0
- blitz_api/_pagination_sync.py +130 -0
- blitz_api/_rate_limit.py +14 -0
- blitz_api/_rate_limit_async.py +67 -0
- blitz_api/_rate_limit_sync.py +69 -0
- blitz_api/_version.py +1 -0
- blitz_api/py.typed +0 -0
- blitz_api/resources/__init__.py +27 -0
- blitz_api/resources/_async/__init__.py +1 -0
- blitz_api/resources/_async/account.py +27 -0
- blitz_api/resources/_async/enrichment.py +116 -0
- blitz_api/resources/_async/search.py +153 -0
- blitz_api/resources/_async/utils.py +43 -0
- blitz_api/resources/_sync/__init__.py +3 -0
- blitz_api/resources/_sync/account.py +29 -0
- blitz_api/resources/_sync/enrichment.py +118 -0
- blitz_api/resources/_sync/search.py +155 -0
- blitz_api/resources/_sync/utils.py +45 -0
- blitz_api/types/__init__.py +108 -0
- blitz_api/types/_models.py +23 -0
- blitz_api/types/account.py +27 -0
- blitz_api/types/enrichment.py +76 -0
- blitz_api/types/enums.py +633 -0
- blitz_api/types/filters.py +130 -0
- blitz_api/types/search.py +36 -0
- blitz_api/types/shared.py +119 -0
- blitz_api/types/utils.py +35 -0
- blitz_api_py-0.1.0.dist-info/METADATA +220 -0
- blitz_api_py-0.1.0.dist-info/RECORD +40 -0
- blitz_api_py-0.1.0.dist-info/WHEEL +4 -0
- blitz_api_py-0.1.0.dist-info/licenses/LICENSE +21 -0
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
"""Public type surface for the Blitz API SDK.
|
|
2
|
+
|
|
3
|
+
Import response models and request filters from here, e.g.::
|
|
4
|
+
|
|
5
|
+
from blitz_api.types import Person, CompanyFilter, Industry
|
|
6
|
+
"""
|
|
7
|
+
|
|
8
|
+
from __future__ import annotations
|
|
9
|
+
|
|
10
|
+
from .account import ActivePlan, KeyInfo
|
|
11
|
+
from .enrichment import (
|
|
12
|
+
CompanyEnrichmentResponse,
|
|
13
|
+
DomainToLinkedinResponse,
|
|
14
|
+
EmailEnrichmentResponse,
|
|
15
|
+
EmailMatch,
|
|
16
|
+
EmailToPersonResponse,
|
|
17
|
+
LinkedinToDomainResponse,
|
|
18
|
+
PhoneEnrichmentResponse,
|
|
19
|
+
PhoneToPersonResponse,
|
|
20
|
+
)
|
|
21
|
+
from .enums import (
|
|
22
|
+
CompanyType,
|
|
23
|
+
Continent,
|
|
24
|
+
EmployeeRange,
|
|
25
|
+
Industry,
|
|
26
|
+
JobFunction,
|
|
27
|
+
JobLevel,
|
|
28
|
+
SalesRegion,
|
|
29
|
+
)
|
|
30
|
+
from .filters import (
|
|
31
|
+
CascadeTier,
|
|
32
|
+
CompanyFilter,
|
|
33
|
+
CompanyHQFilter,
|
|
34
|
+
CompanyTypeFilter,
|
|
35
|
+
IndustryFilter,
|
|
36
|
+
KeywordFilter,
|
|
37
|
+
PeopleFilter,
|
|
38
|
+
PeopleJobTitleFilter,
|
|
39
|
+
PeopleLocationFilter,
|
|
40
|
+
RangeFilter,
|
|
41
|
+
)
|
|
42
|
+
from .search import (
|
|
43
|
+
WaterfallIcpMatch,
|
|
44
|
+
WaterfallIcpResponse,
|
|
45
|
+
)
|
|
46
|
+
from .shared import (
|
|
47
|
+
HQ,
|
|
48
|
+
Certification,
|
|
49
|
+
Company,
|
|
50
|
+
Education,
|
|
51
|
+
Experience,
|
|
52
|
+
Location,
|
|
53
|
+
Person,
|
|
54
|
+
)
|
|
55
|
+
from .utils import (
|
|
56
|
+
CompanyEmploymentDistributionResponse,
|
|
57
|
+
CurrentDateResponse,
|
|
58
|
+
EmploymentDistributionItem,
|
|
59
|
+
)
|
|
60
|
+
|
|
61
|
+
__all__ = [
|
|
62
|
+
# shared
|
|
63
|
+
"Person",
|
|
64
|
+
"Experience",
|
|
65
|
+
"Education",
|
|
66
|
+
"Certification",
|
|
67
|
+
"Location",
|
|
68
|
+
"Company",
|
|
69
|
+
"HQ",
|
|
70
|
+
# enums
|
|
71
|
+
"Industry",
|
|
72
|
+
"CompanyType",
|
|
73
|
+
"EmployeeRange",
|
|
74
|
+
"Continent",
|
|
75
|
+
"SalesRegion",
|
|
76
|
+
"JobFunction",
|
|
77
|
+
"JobLevel",
|
|
78
|
+
# filters
|
|
79
|
+
"KeywordFilter",
|
|
80
|
+
"IndustryFilter",
|
|
81
|
+
"CompanyTypeFilter",
|
|
82
|
+
"RangeFilter",
|
|
83
|
+
"CompanyHQFilter",
|
|
84
|
+
"CompanyFilter",
|
|
85
|
+
"PeopleJobTitleFilter",
|
|
86
|
+
"PeopleLocationFilter",
|
|
87
|
+
"PeopleFilter",
|
|
88
|
+
"CascadeTier",
|
|
89
|
+
# account
|
|
90
|
+
"KeyInfo",
|
|
91
|
+
"ActivePlan",
|
|
92
|
+
# search (paginated results return the page classes exported from `blitz_api`)
|
|
93
|
+
"WaterfallIcpMatch",
|
|
94
|
+
"WaterfallIcpResponse",
|
|
95
|
+
# enrichment
|
|
96
|
+
"EmailMatch",
|
|
97
|
+
"EmailEnrichmentResponse",
|
|
98
|
+
"PhoneEnrichmentResponse",
|
|
99
|
+
"EmailToPersonResponse",
|
|
100
|
+
"PhoneToPersonResponse",
|
|
101
|
+
"CompanyEnrichmentResponse",
|
|
102
|
+
"DomainToLinkedinResponse",
|
|
103
|
+
"LinkedinToDomainResponse",
|
|
104
|
+
# utils
|
|
105
|
+
"CurrentDateResponse",
|
|
106
|
+
"EmploymentDistributionItem",
|
|
107
|
+
"CompanyEmploymentDistributionResponse",
|
|
108
|
+
]
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
"""Base Pydantic model for every Blitz API response type."""
|
|
2
|
+
|
|
3
|
+
from __future__ import annotations
|
|
4
|
+
|
|
5
|
+
from pydantic import BaseModel, ConfigDict
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
class BlitzModel(BaseModel):
|
|
9
|
+
"""Base for all response models.
|
|
10
|
+
|
|
11
|
+
Configured to be forward-compatible: unknown fields returned by the API are
|
|
12
|
+
preserved (reachable via :attr:`model_extra`) instead of raising, so a new
|
|
13
|
+
server-side field never breaks deserialization. Known fields stay precisely
|
|
14
|
+
typed.
|
|
15
|
+
"""
|
|
16
|
+
|
|
17
|
+
model_config = ConfigDict(
|
|
18
|
+
extra="allow",
|
|
19
|
+
populate_by_name=True,
|
|
20
|
+
# The API exposes fields like ``max_requests_per_seconds``; silence the
|
|
21
|
+
# ``model_`` protected-namespace warnings without affecting behaviour.
|
|
22
|
+
protected_namespaces=(),
|
|
23
|
+
)
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
"""Response models for the Account resource."""
|
|
2
|
+
|
|
3
|
+
from __future__ import annotations
|
|
4
|
+
|
|
5
|
+
from ._models import BlitzModel
|
|
6
|
+
|
|
7
|
+
__all__ = ["ActivePlan", "KeyInfo"]
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
class ActivePlan(BlitzModel):
|
|
11
|
+
"""A subscription plan attached to the API key."""
|
|
12
|
+
|
|
13
|
+
name: str | None = None
|
|
14
|
+
status: str | None = None
|
|
15
|
+
started_at: str | None = None
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
class KeyInfo(BlitzModel):
|
|
19
|
+
"""The result of ``client.account.key_info()`` — key health and limits."""
|
|
20
|
+
|
|
21
|
+
valid: bool | None = None
|
|
22
|
+
id: str | None = None
|
|
23
|
+
remaining_credits: float | None = None
|
|
24
|
+
next_reset_at: str | None = None
|
|
25
|
+
max_requests_per_seconds: int | None = None
|
|
26
|
+
allowed_apis: list[str] = []
|
|
27
|
+
active_plans: list[ActivePlan] = []
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
"""Response models for the Enrichment resource."""
|
|
2
|
+
|
|
3
|
+
from __future__ import annotations
|
|
4
|
+
|
|
5
|
+
from ._models import BlitzModel
|
|
6
|
+
from .shared import Company, Person
|
|
7
|
+
|
|
8
|
+
__all__ = [
|
|
9
|
+
"EmailMatch",
|
|
10
|
+
"EmailEnrichmentResponse",
|
|
11
|
+
"PhoneEnrichmentResponse",
|
|
12
|
+
"EmailToPersonResponse",
|
|
13
|
+
"PhoneToPersonResponse",
|
|
14
|
+
"CompanyEnrichmentResponse",
|
|
15
|
+
"DomainToLinkedinResponse",
|
|
16
|
+
"LinkedinToDomainResponse",
|
|
17
|
+
]
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
class EmailMatch(BlitzModel):
|
|
21
|
+
"""A single candidate email returned by ``enrichment.email``."""
|
|
22
|
+
|
|
23
|
+
email: str | None = None
|
|
24
|
+
job_order_in_profile: int | None = None
|
|
25
|
+
company_linkedin_url: str | None = None
|
|
26
|
+
email_domain: str | None = None
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
class EmailEnrichmentResponse(BlitzModel):
|
|
30
|
+
"""Result of ``enrichment.email`` (LinkedIn URL -> verified work email)."""
|
|
31
|
+
|
|
32
|
+
found: bool | None = None
|
|
33
|
+
email: str | None = None
|
|
34
|
+
all_emails: list[EmailMatch] = []
|
|
35
|
+
|
|
36
|
+
|
|
37
|
+
class PhoneEnrichmentResponse(BlitzModel):
|
|
38
|
+
"""Result of ``enrichment.phone`` (LinkedIn URL -> phone)."""
|
|
39
|
+
|
|
40
|
+
found: bool | None = None
|
|
41
|
+
phone: str | None = None
|
|
42
|
+
|
|
43
|
+
|
|
44
|
+
class EmailToPersonResponse(BlitzModel):
|
|
45
|
+
"""Result of ``enrichment.email_to_person`` (email -> full profile)."""
|
|
46
|
+
|
|
47
|
+
found: bool | None = None
|
|
48
|
+
person: Person | None = None
|
|
49
|
+
|
|
50
|
+
|
|
51
|
+
class PhoneToPersonResponse(BlitzModel):
|
|
52
|
+
"""Result of ``enrichment.phone_to_person`` (phone -> full profile)."""
|
|
53
|
+
|
|
54
|
+
found: bool | None = None
|
|
55
|
+
person: Person | None = None
|
|
56
|
+
|
|
57
|
+
|
|
58
|
+
class CompanyEnrichmentResponse(BlitzModel):
|
|
59
|
+
"""Result of ``enrichment.company`` (company LinkedIn URL -> company profile)."""
|
|
60
|
+
|
|
61
|
+
found: bool | None = None
|
|
62
|
+
company: Company | None = None
|
|
63
|
+
|
|
64
|
+
|
|
65
|
+
class DomainToLinkedinResponse(BlitzModel):
|
|
66
|
+
"""Result of ``enrichment.domain_to_linkedin`` (domain -> company LinkedIn URL)."""
|
|
67
|
+
|
|
68
|
+
found: bool | None = None
|
|
69
|
+
company_linkedin_url: str | None = None
|
|
70
|
+
|
|
71
|
+
|
|
72
|
+
class LinkedinToDomainResponse(BlitzModel):
|
|
73
|
+
"""Result of ``enrichment.linkedin_to_domain`` (company LinkedIn URL -> email domain)."""
|
|
74
|
+
|
|
75
|
+
found: bool | None = None
|
|
76
|
+
email_domain: str | None = None
|