blitz-api-py 2.0.0__tar.gz → 2.2.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (53) hide show
  1. {blitz_api_py-2.0.0 → blitz_api_py-2.2.0}/CHANGELOG.md +14 -0
  2. {blitz_api_py-2.0.0 → blitz_api_py-2.2.0}/PKG-INFO +19 -8
  3. {blitz_api_py-2.0.0 → blitz_api_py-2.2.0}/README.md +17 -6
  4. {blitz_api_py-2.0.0 → blitz_api_py-2.2.0}/src/blitz_api/_base_client.py +5 -3
  5. {blitz_api_py-2.0.0 → blitz_api_py-2.2.0}/src/blitz_api/_client_async.py +18 -2
  6. {blitz_api_py-2.0.0 → blitz_api_py-2.2.0}/src/blitz_api/_client_sync.py +18 -2
  7. blitz_api_py-2.2.0/src/blitz_api/_version.py +1 -0
  8. {blitz_api_py-2.0.0 → blitz_api_py-2.2.0}/src/blitz_api/resources/__init__.py +12 -0
  9. blitz_api_py-2.2.0/src/blitz_api/resources/_async/changelog.py +53 -0
  10. blitz_api_py-2.2.0/src/blitz_api/resources/_async/company.py +55 -0
  11. blitz_api_py-2.2.0/src/blitz_api/resources/_async/jobs.py +70 -0
  12. {blitz_api_py-2.0.0 → blitz_api_py-2.2.0}/src/blitz_api/resources/_async/search.py +10 -2
  13. {blitz_api_py-2.0.0 → blitz_api_py-2.2.0}/src/blitz_api/resources/_async/utils.py +8 -4
  14. blitz_api_py-2.2.0/src/blitz_api/resources/_sync/changelog.py +55 -0
  15. blitz_api_py-2.2.0/src/blitz_api/resources/_sync/company.py +57 -0
  16. blitz_api_py-2.2.0/src/blitz_api/resources/_sync/jobs.py +72 -0
  17. {blitz_api_py-2.0.0 → blitz_api_py-2.2.0}/src/blitz_api/resources/_sync/search.py +10 -2
  18. {blitz_api_py-2.0.0 → blitz_api_py-2.2.0}/src/blitz_api/resources/_sync/utils.py +8 -4
  19. {blitz_api_py-2.0.0 → blitz_api_py-2.2.0}/src/blitz_api/types/__init__.py +39 -0
  20. {blitz_api_py-2.0.0 → blitz_api_py-2.2.0}/src/blitz_api/types/account.py +5 -2
  21. blitz_api_py-2.2.0/src/blitz_api/types/changelog.py +58 -0
  22. blitz_api_py-2.2.0/src/blitz_api/types/company.py +31 -0
  23. {blitz_api_py-2.0.0 → blitz_api_py-2.2.0}/src/blitz_api/types/enrichment.py +11 -0
  24. {blitz_api_py-2.0.0 → blitz_api_py-2.2.0}/src/blitz_api/types/enums.py +28 -0
  25. blitz_api_py-2.2.0/src/blitz_api/types/filters.py +261 -0
  26. blitz_api_py-2.2.0/src/blitz_api/types/jobs.py +34 -0
  27. {blitz_api_py-2.0.0 → blitz_api_py-2.2.0}/src/blitz_api/types/shared.py +2 -1
  28. blitz_api_py-2.0.0/src/blitz_api/_version.py +0 -1
  29. blitz_api_py-2.0.0/src/blitz_api/types/filters.py +0 -145
  30. {blitz_api_py-2.0.0 → blitz_api_py-2.2.0}/.gitignore +0 -0
  31. {blitz_api_py-2.0.0 → blitz_api_py-2.2.0}/LICENSE +0 -0
  32. {blitz_api_py-2.0.0 → blitz_api_py-2.2.0}/pyproject.toml +0 -0
  33. {blitz_api_py-2.0.0 → blitz_api_py-2.2.0}/src/blitz_api/__init__.py +0 -0
  34. {blitz_api_py-2.0.0 → blitz_api_py-2.2.0}/src/blitz_api/_client.py +0 -0
  35. {blitz_api_py-2.0.0 → blitz_api_py-2.2.0}/src/blitz_api/_compat.py +0 -0
  36. {blitz_api_py-2.0.0 → blitz_api_py-2.2.0}/src/blitz_api/_constants.py +0 -0
  37. {blitz_api_py-2.0.0 → blitz_api_py-2.2.0}/src/blitz_api/_exceptions.py +0 -0
  38. {blitz_api_py-2.0.0 → blitz_api_py-2.2.0}/src/blitz_api/_pagination_async.py +0 -0
  39. {blitz_api_py-2.0.0 → blitz_api_py-2.2.0}/src/blitz_api/_pagination_base.py +0 -0
  40. {blitz_api_py-2.0.0 → blitz_api_py-2.2.0}/src/blitz_api/_pagination_sync.py +0 -0
  41. {blitz_api_py-2.0.0 → blitz_api_py-2.2.0}/src/blitz_api/_rate_limit.py +0 -0
  42. {blitz_api_py-2.0.0 → blitz_api_py-2.2.0}/src/blitz_api/_rate_limit_async.py +0 -0
  43. {blitz_api_py-2.0.0 → blitz_api_py-2.2.0}/src/blitz_api/_rate_limit_sync.py +0 -0
  44. {blitz_api_py-2.0.0 → blitz_api_py-2.2.0}/src/blitz_api/py.typed +0 -0
  45. {blitz_api_py-2.0.0 → blitz_api_py-2.2.0}/src/blitz_api/resources/_async/__init__.py +0 -0
  46. {blitz_api_py-2.0.0 → blitz_api_py-2.2.0}/src/blitz_api/resources/_async/account.py +0 -0
  47. {blitz_api_py-2.0.0 → blitz_api_py-2.2.0}/src/blitz_api/resources/_async/enrichment.py +0 -0
  48. {blitz_api_py-2.0.0 → blitz_api_py-2.2.0}/src/blitz_api/resources/_sync/__init__.py +0 -0
  49. {blitz_api_py-2.0.0 → blitz_api_py-2.2.0}/src/blitz_api/resources/_sync/account.py +0 -0
  50. {blitz_api_py-2.0.0 → blitz_api_py-2.2.0}/src/blitz_api/resources/_sync/enrichment.py +0 -0
  51. {blitz_api_py-2.0.0 → blitz_api_py-2.2.0}/src/blitz_api/types/_models.py +0 -0
  52. {blitz_api_py-2.0.0 → blitz_api_py-2.2.0}/src/blitz_api/types/search.py +0 -0
  53. {blitz_api_py-2.0.0 → blitz_api_py-2.2.0}/src/blitz_api/types/utils.py +0 -0
@@ -1,5 +1,19 @@
1
1
  # Changelog
2
2
 
3
+ ## [2.2.0](https://github.com/api-blitz/blitz-api-py/compare/v2.1.0...v2.2.0) (2026-08-13)
4
+
5
+
6
+ ### Features
7
+
8
+ * add company and changelog resources with new endpoints ([0dd4ae0](https://github.com/api-blitz/blitz-api-py/commit/0dd4ae0df510352c72143f00431e66b947409758))
9
+
10
+ ## [2.1.0](https://github.com/api-blitz/blitz-api-py/compare/v2.0.0...v2.1.0) (2026-07-23)
11
+
12
+
13
+ ### Features
14
+
15
+ * add jobs resource with search and company endpoints ([c96e67a](https://github.com/api-blitz/blitz-api-py/commit/c96e67ad9812f6f6c46b3aa095f7ba6792ec4a81))
16
+
3
17
  ## [2.0.0](https://github.com/api-blitz/blitz-api-py/compare/v1.0.0...v2.0.0) (2026-06-19)
4
18
 
5
19
 
@@ -1,6 +1,6 @@
1
- Metadata-Version: 2.4
1
+ Metadata-Version: 2.5
2
2
  Name: blitz-api-py
3
- Version: 2.0.0
3
+ Version: 2.2.0
4
4
  Summary: Typed Python SDK for the Blitz API — B2B data, search, and enrichment.
5
5
  Project-URL: Homepage, https://blitz-api.ai
6
6
  Project-URL: Documentation, https://docs.blitz-api.ai
@@ -117,7 +117,7 @@ from blitz_api import AsyncBlitzAPI
117
117
  async def main() -> None:
118
118
  async with AsyncBlitzAPI() as client:
119
119
  result = await client.enrichment.company(
120
- company_linkedin_url="https://www.linkedin.com/company/openai",
120
+ company_linkedin_url="https://www.linkedin.com/company/placeholder-co",
121
121
  )
122
122
  print(result.company.name if result.company else None)
123
123
 
@@ -193,14 +193,17 @@ always call the API from your backend.
193
193
 
194
194
  ## Endpoints
195
195
 
196
- All methods are grouped into four namespaces:
196
+ All methods are grouped into seven namespaces:
197
197
 
198
198
  | Namespace | Methods |
199
199
  | --- | --- |
200
200
  | `client.account` | `key_info()` |
201
201
  | `client.search` | `people()`, `companies()`, `employee_finder()`, `waterfall_icp()` |
202
+ | `client.jobs` | `search()`, `company()` |
203
+ | `client.company` | `tam_by_jobs()` |
202
204
  | `client.enrichment` | `email()`, `phone()`, `email_to_person()`, `phone_to_person()`, `company()`, `domain_to_linkedin()`, `linkedin_to_domain()`, `company_distribution_by_country()`, `company_distribution_by_department()` |
203
205
  | `client.utils` | `current_date()` |
206
+ | `client.changelog` | `list()` |
204
207
 
205
208
  Every method returns a typed Pydantic model (see `blitz_api.types`). Enum-backed
206
209
  filter fields (e.g. `Industry`, `JobLevel`, `Continent`) accept either an enum
@@ -208,14 +211,15 @@ member or a raw string.
208
211
 
209
212
  ## Pagination
210
213
 
211
- The search methods return an **auto-paginating page**: iterate it and the SDK fetches
212
- each subsequent page for you. `search.people`/`search.companies` are cursor-based;
213
- `search.employee_finder` is page-based — both behave identically here.
214
+ The search and jobs methods return an **auto-paginating page**: iterate it and the SDK
215
+ fetches each subsequent page for you. `search.people`/`search.companies` and
216
+ `jobs.search`/`jobs.company` are cursor-based; `search.employee_finder` is page-based —
217
+ all behave identically here.
214
218
 
215
219
  > **`max_results` is the page size, not a total.** It's results per page, and the API
216
220
  > **bills 1 credit per result returned**. A bare `for person in client.search.people(...)`
217
221
  > loop streams *every* match up to the server-side limit (people: 50k results / 1k pages;
218
- > employee finder: 10k), which can be a lot of credits. Bound it with **`max_items`** on
222
+ > employee finder: 10k; jobs: 5k), which can be a lot of credits. Bound it with **`max_items`** on
219
223
  > `.collect()` / `.auto_paging_iter()` (a client-side total cap — never sent on the wire),
220
224
  > `break` out of the loop, or drive pages manually.
221
225
 
@@ -236,6 +240,13 @@ for person in client.search.people(...).auto_paging_iter(max_items=200):
236
240
  for page in client.search.companies(company={...}).iter_pages(max_pages=5):
237
241
  print(page.total_results, len(page.results), page.cursor)
238
242
 
243
+ # Jobs are cursor-paginated too — surface hiring signals matching your ICP.
244
+ for job in client.jobs.search(
245
+ job={"title": {"include": ["Head of Sales"]}, "date_posted": {"last_days": 30}},
246
+ company={"industry": {"include": ["Software Development"]}, "size": {"include": ["51-200"]}},
247
+ ).auto_paging_iter(max_items=200):
248
+ print(job.company_name, job.title, job.location.city if job.location else None)
249
+
239
250
  # Or page manually.
240
251
  page = client.search.people(people={...}, max_results=50)
241
252
  print(page.results, page.cursor)
@@ -86,7 +86,7 @@ from blitz_api import AsyncBlitzAPI
86
86
  async def main() -> None:
87
87
  async with AsyncBlitzAPI() as client:
88
88
  result = await client.enrichment.company(
89
- company_linkedin_url="https://www.linkedin.com/company/openai",
89
+ company_linkedin_url="https://www.linkedin.com/company/placeholder-co",
90
90
  )
91
91
  print(result.company.name if result.company else None)
92
92
 
@@ -162,14 +162,17 @@ always call the API from your backend.
162
162
 
163
163
  ## Endpoints
164
164
 
165
- All methods are grouped into four namespaces:
165
+ All methods are grouped into seven namespaces:
166
166
 
167
167
  | Namespace | Methods |
168
168
  | --- | --- |
169
169
  | `client.account` | `key_info()` |
170
170
  | `client.search` | `people()`, `companies()`, `employee_finder()`, `waterfall_icp()` |
171
+ | `client.jobs` | `search()`, `company()` |
172
+ | `client.company` | `tam_by_jobs()` |
171
173
  | `client.enrichment` | `email()`, `phone()`, `email_to_person()`, `phone_to_person()`, `company()`, `domain_to_linkedin()`, `linkedin_to_domain()`, `company_distribution_by_country()`, `company_distribution_by_department()` |
172
174
  | `client.utils` | `current_date()` |
175
+ | `client.changelog` | `list()` |
173
176
 
174
177
  Every method returns a typed Pydantic model (see `blitz_api.types`). Enum-backed
175
178
  filter fields (e.g. `Industry`, `JobLevel`, `Continent`) accept either an enum
@@ -177,14 +180,15 @@ member or a raw string.
177
180
 
178
181
  ## Pagination
179
182
 
180
- The search methods return an **auto-paginating page**: iterate it and the SDK fetches
181
- each subsequent page for you. `search.people`/`search.companies` are cursor-based;
182
- `search.employee_finder` is page-based — both behave identically here.
183
+ The search and jobs methods return an **auto-paginating page**: iterate it and the SDK
184
+ fetches each subsequent page for you. `search.people`/`search.companies` and
185
+ `jobs.search`/`jobs.company` are cursor-based; `search.employee_finder` is page-based —
186
+ all behave identically here.
183
187
 
184
188
  > **`max_results` is the page size, not a total.** It's results per page, and the API
185
189
  > **bills 1 credit per result returned**. A bare `for person in client.search.people(...)`
186
190
  > loop streams *every* match up to the server-side limit (people: 50k results / 1k pages;
187
- > employee finder: 10k), which can be a lot of credits. Bound it with **`max_items`** on
191
+ > employee finder: 10k; jobs: 5k), which can be a lot of credits. Bound it with **`max_items`** on
188
192
  > `.collect()` / `.auto_paging_iter()` (a client-side total cap — never sent on the wire),
189
193
  > `break` out of the loop, or drive pages manually.
190
194
 
@@ -205,6 +209,13 @@ for person in client.search.people(...).auto_paging_iter(max_items=200):
205
209
  for page in client.search.companies(company={...}).iter_pages(max_pages=5):
206
210
  print(page.total_results, len(page.results), page.cursor)
207
211
 
212
+ # Jobs are cursor-paginated too — surface hiring signals matching your ICP.
213
+ for job in client.jobs.search(
214
+ job={"title": {"include": ["Head of Sales"]}, "date_posted": {"last_days": 30}},
215
+ company={"industry": {"include": ["Software Development"]}, "size": {"include": ["51-200"]}},
216
+ ).auto_paging_iter(max_items=200):
217
+ print(job.company_name, job.title, job.location.city if job.location else None)
218
+
208
219
  # Or page manually.
209
220
  page = client.search.people(people={...}, max_results=50)
210
221
  print(page.results, page.cursor)
@@ -16,7 +16,7 @@ from typing import Any, TypeVar, cast
16
16
  from urllib.parse import urljoin
17
17
 
18
18
  import httpx
19
- from pydantic import ValidationError
19
+ from pydantic import BaseModel, ValidationError
20
20
 
21
21
  from . import _constants as C
22
22
  from ._exceptions import (
@@ -29,9 +29,11 @@ from ._exceptions import (
29
29
  RateLimitError,
30
30
  ServerError,
31
31
  )
32
- from .types._models import BlitzModel
33
32
 
34
- ResponseT = TypeVar("ResponseT", bound=BlitzModel)
33
+ # Bound to ``pydantic.BaseModel`` (not ``BlitzModel``) so the request pipeline can also
34
+ # validate a ``RootModel`` — used for ``changelog.list``'s top-level JSON array
35
+ # (``ChangelogResponse``), which is a ``BaseModel`` but not a ``BlitzModel``.
36
+ ResponseT = TypeVar("ResponseT", bound=BaseModel)
35
37
 
36
38
  # Status code -> exception class. Anything not listed that is still non-2xx
37
39
  # falls back to a generic APIStatusError (or ServerError for any 5xx).
@@ -16,7 +16,10 @@ from ._pagination_base import BasePage
16
16
  from ._rate_limit import AsyncRateLimiter
17
17
  from .resources import (
18
18
  AsyncAccountResource,
19
+ AsyncChangelogResource,
20
+ AsyncCompanyResource,
19
21
  AsyncEnrichmentResource,
22
+ AsyncJobsResource,
20
23
  AsyncSearchResource,
21
24
  AsyncUtilsResource,
22
25
  )
@@ -85,6 +88,7 @@ class AsyncBlitzAPI(BaseClient):
85
88
  *,
86
89
  body: Any | None,
87
90
  cast_to: type[ResponseT],
91
+ params: dict[str, Any] | None = None,
88
92
  timeout: TimeoutParam = None,
89
93
  ) -> ResponseT:
90
94
  url = self._build_url(path)
@@ -97,11 +101,11 @@ class AsyncBlitzAPI(BaseClient):
97
101
  try:
98
102
  if timeout is None:
99
103
  response = await self._http_client.request(
100
- method, url, headers=headers, json=json_body
104
+ method, url, headers=headers, json=json_body, params=params
101
105
  )
102
106
  else:
103
107
  response = await self._http_client.request(
104
- method, url, headers=headers, json=json_body, timeout=timeout
108
+ method, url, headers=headers, json=json_body, params=params, timeout=timeout
105
109
  )
106
110
  except httpx.TimeoutException as exc:
107
111
  if self._should_retry_exception(exc) and attempt < self.max_retries:
@@ -155,6 +159,14 @@ class AsyncBlitzAPI(BaseClient):
155
159
  def search(self) -> AsyncSearchResource:
156
160
  return AsyncSearchResource(self)
157
161
 
162
+ @cached_property
163
+ def jobs(self) -> AsyncJobsResource:
164
+ return AsyncJobsResource(self)
165
+
166
+ @cached_property
167
+ def company(self) -> AsyncCompanyResource:
168
+ return AsyncCompanyResource(self)
169
+
158
170
  @cached_property
159
171
  def enrichment(self) -> AsyncEnrichmentResource:
160
172
  return AsyncEnrichmentResource(self)
@@ -162,3 +174,7 @@ class AsyncBlitzAPI(BaseClient):
162
174
  @cached_property
163
175
  def utils(self) -> AsyncUtilsResource:
164
176
  return AsyncUtilsResource(self)
177
+
178
+ @cached_property
179
+ def changelog(self) -> AsyncChangelogResource:
180
+ return AsyncChangelogResource(self)
@@ -18,7 +18,10 @@ from ._pagination_base import BasePage
18
18
  from ._rate_limit import RateLimiter
19
19
  from .resources import (
20
20
  AccountResource,
21
+ ChangelogResource,
22
+ CompanyResource,
21
23
  EnrichmentResource,
24
+ JobsResource,
22
25
  SearchResource,
23
26
  UtilsResource,
24
27
  )
@@ -87,6 +90,7 @@ class BlitzAPI(BaseClient):
87
90
  *,
88
91
  body: Any | None,
89
92
  cast_to: type[ResponseT],
93
+ params: dict[str, Any] | None = None,
90
94
  timeout: TimeoutParam = None,
91
95
  ) -> ResponseT:
92
96
  url = self._build_url(path)
@@ -99,11 +103,11 @@ class BlitzAPI(BaseClient):
99
103
  try:
100
104
  if timeout is None:
101
105
  response = self._http_client.request(
102
- method, url, headers=headers, json=json_body
106
+ method, url, headers=headers, json=json_body, params=params
103
107
  )
104
108
  else:
105
109
  response = self._http_client.request(
106
- method, url, headers=headers, json=json_body, timeout=timeout
110
+ method, url, headers=headers, json=json_body, params=params, timeout=timeout
107
111
  )
108
112
  except httpx.TimeoutException as exc:
109
113
  if self._should_retry_exception(exc) and attempt < self.max_retries:
@@ -157,6 +161,14 @@ class BlitzAPI(BaseClient):
157
161
  def search(self) -> SearchResource:
158
162
  return SearchResource(self)
159
163
 
164
+ @cached_property
165
+ def jobs(self) -> JobsResource:
166
+ return JobsResource(self)
167
+
168
+ @cached_property
169
+ def company(self) -> CompanyResource:
170
+ return CompanyResource(self)
171
+
160
172
  @cached_property
161
173
  def enrichment(self) -> EnrichmentResource:
162
174
  return EnrichmentResource(self)
@@ -164,3 +176,7 @@ class BlitzAPI(BaseClient):
164
176
  @cached_property
165
177
  def utils(self) -> UtilsResource:
166
178
  return UtilsResource(self)
179
+
180
+ @cached_property
181
+ def changelog(self) -> ChangelogResource:
182
+ return ChangelogResource(self)
@@ -0,0 +1 @@
1
+ __version__ = "2.2.0" # x-release-please-version
@@ -7,11 +7,17 @@ The ``Async*`` classes are hand-written in ``resources/_async``; the sync classe
7
7
  from __future__ import annotations
8
8
 
9
9
  from ._async.account import AsyncAccountResource
10
+ from ._async.changelog import AsyncChangelogResource
11
+ from ._async.company import AsyncCompanyResource
10
12
  from ._async.enrichment import AsyncEnrichmentResource
13
+ from ._async.jobs import AsyncJobsResource
11
14
  from ._async.search import AsyncSearchResource
12
15
  from ._async.utils import AsyncUtilsResource
13
16
  from ._sync.account import AccountResource
17
+ from ._sync.changelog import ChangelogResource
18
+ from ._sync.company import CompanyResource
14
19
  from ._sync.enrichment import EnrichmentResource
20
+ from ._sync.jobs import JobsResource
15
21
  from ._sync.search import SearchResource
16
22
  from ._sync.utils import UtilsResource
17
23
 
@@ -20,8 +26,14 @@ __all__ = [
20
26
  "AsyncAccountResource",
21
27
  "SearchResource",
22
28
  "AsyncSearchResource",
29
+ "JobsResource",
30
+ "AsyncJobsResource",
31
+ "CompanyResource",
32
+ "AsyncCompanyResource",
23
33
  "EnrichmentResource",
24
34
  "AsyncEnrichmentResource",
25
35
  "UtilsResource",
26
36
  "AsyncUtilsResource",
37
+ "ChangelogResource",
38
+ "AsyncChangelogResource",
27
39
  ]
@@ -0,0 +1,53 @@
1
+ """The Changelog resource: ``client.changelog``."""
2
+
3
+ from __future__ import annotations
4
+
5
+ from typing import TYPE_CHECKING, Any
6
+
7
+ from ..._compat import TimeoutParam
8
+ from ...types.changelog import ChangelogEntry, ChangelogResponse
9
+
10
+ if TYPE_CHECKING:
11
+ from ..._client import AsyncBlitzAPI
12
+
13
+ # Public endpoint: NO ``/v2`` prefix, and the trailing slash is load-bearing.
14
+ _CHANGELOG = "/changelog/"
15
+
16
+
17
+ def _drop_none(**kwargs: Any) -> dict[str, Any]:
18
+ """Build a query-param mapping keeping only the arguments the caller provided."""
19
+ return {key: value for key, value in kwargs.items() if value is not None}
20
+
21
+
22
+ class AsyncChangelogResource:
23
+ def __init__(self, client: AsyncBlitzAPI) -> None:
24
+ self._client = client
25
+
26
+ async def list(
27
+ self,
28
+ *,
29
+ days: int | None = None,
30
+ limit: int | None = None,
31
+ timeout: TimeoutParam = None,
32
+ ) -> list[ChangelogEntry]:
33
+ """List the public Blitz API changelog, newest-first.
34
+
35
+ Each entry carries a ``date``, a ``type`` (``breaking`` | ``feature`` |
36
+ ``improvement`` | ``fix`` | ``deprecation`` | ``announcement``), a ``title``, and
37
+ optional ``body``, ``affected_endpoints``, and ``links``.
38
+
39
+ This endpoint is **public** — it costs no credits and works regardless of API-key
40
+ validity (the SDK still sends the key header, which the endpoint ignores). It is
41
+ **not paginated**: it returns a plain list filtered by the ``days`` / ``limit``
42
+ query parameters.
43
+ """
44
+ params = _drop_none(days=days, limit=limit)
45
+ result = await self._client._request(
46
+ "GET",
47
+ _CHANGELOG,
48
+ body=None,
49
+ cast_to=ChangelogResponse,
50
+ params=params,
51
+ timeout=timeout,
52
+ )
53
+ return result.root
@@ -0,0 +1,55 @@
1
+ """The Company resource: ``client.company``."""
2
+
3
+ from __future__ import annotations
4
+
5
+ from typing import TYPE_CHECKING, Any
6
+
7
+ from ..._compat import TimeoutParam
8
+ from ..._pagination_async import AsyncCursorPage
9
+ from ...types.company import TamByJobsMatch
10
+ from ...types.filters import JobCompanyFilter, TamJobFilter
11
+
12
+ if TYPE_CHECKING:
13
+ from ..._client import AsyncBlitzAPI
14
+
15
+ _TAM_BY_JOBS = "/v2/company/tam-by-jobs"
16
+
17
+
18
+ def _drop_none(**kwargs: Any) -> dict[str, Any]:
19
+ """Build a request body keeping only the arguments the caller provided."""
20
+ return {key: value for key, value in kwargs.items() if value is not None}
21
+
22
+
23
+ class AsyncCompanyResource:
24
+ def __init__(self, client: AsyncBlitzAPI) -> None:
25
+ self._client = client
26
+
27
+ async def tam_by_jobs(
28
+ self,
29
+ *,
30
+ job: TamJobFilter | None = None,
31
+ company: JobCompanyFilter | None = None,
32
+ max_results: int | None = None,
33
+ cursor: str | None = None,
34
+ timeout: TimeoutParam = None,
35
+ ) -> AsyncCursorPage[TamByJobsMatch]:
36
+ """Build a Total Addressable Market of companies from live hiring signals.
37
+
38
+ Combine job-level filters (title, description, seniority, ...) with company
39
+ firmographics, and get back each matching company plus how many of its current
40
+ postings matched (``matched_jobs``). Use ``job["min_per_company"]`` to require a
41
+ minimum number of matching postings per company.
42
+
43
+ Cursor-paginated: auto-paginates over every ``{company, matched_jobs}`` match when
44
+ the result is iterated; use ``.iter_pages()`` or the ``cursor=`` arg for manual
45
+ control. The API bills **1 credit per result returned**; bound spend with
46
+ ``max_items`` on ``.collect()`` / ``.auto_paging_iter()``.
47
+ """
48
+ body = _drop_none(job=job, company=company, max_results=max_results, cursor=cursor)
49
+ return await self._client._request(
50
+ "POST",
51
+ _TAM_BY_JOBS,
52
+ body=body,
53
+ cast_to=AsyncCursorPage[TamByJobsMatch],
54
+ timeout=timeout,
55
+ )
@@ -0,0 +1,70 @@
1
+ """The Jobs resource: ``client.jobs``."""
2
+
3
+ from __future__ import annotations
4
+
5
+ from typing import TYPE_CHECKING, Any
6
+
7
+ from ..._compat import TimeoutParam
8
+ from ..._pagination_async import AsyncCursorPage
9
+ from ...types.filters import JobCompanyFilter, JobFilter
10
+ from ...types.jobs import Job
11
+
12
+ if TYPE_CHECKING:
13
+ from ..._client import AsyncBlitzAPI
14
+
15
+ _SEARCH = "/v2/jobs/search"
16
+ _COMPANY = "/v2/jobs/company"
17
+
18
+
19
+ def _drop_none(**kwargs: Any) -> dict[str, Any]:
20
+ """Build a request body keeping only the arguments the caller provided."""
21
+ return {key: value for key, value in kwargs.items() if value is not None}
22
+
23
+
24
+ class AsyncJobsResource:
25
+ def __init__(self, client: AsyncBlitzAPI) -> None:
26
+ self._client = client
27
+
28
+ async def search(
29
+ self,
30
+ *,
31
+ job: JobFilter | None = None,
32
+ company: JobCompanyFilter | None = None,
33
+ max_results: int | None = None,
34
+ cursor: str | None = None,
35
+ timeout: TimeoutParam = None,
36
+ ) -> AsyncCursorPage[Job]:
37
+ """Search live job postings across companies, combining job-level filters
38
+ with company firmographics.
39
+
40
+ Auto-paginates over every matching job when the result is iterated; use
41
+ ``.iter_pages()`` or the ``cursor=`` arg for manual control.
42
+ """
43
+ body = _drop_none(job=job, company=company, max_results=max_results, cursor=cursor)
44
+ return await self._client._request(
45
+ "POST", _SEARCH, body=body, cast_to=AsyncCursorPage[Job], timeout=timeout
46
+ )
47
+
48
+ async def company(
49
+ self,
50
+ *,
51
+ company_linkedin_url: str,
52
+ job: JobFilter | None = None,
53
+ max_results: int | None = None,
54
+ cursor: str | None = None,
55
+ timeout: TimeoutParam = None,
56
+ ) -> AsyncCursorPage[Job]:
57
+ """List job postings at a single company, scoped by its LinkedIn company URL.
58
+
59
+ Auto-paginates over every matching job; use ``.iter_pages()`` or ``cursor=``
60
+ for manual control.
61
+ """
62
+ body = _drop_none(
63
+ company_linkedin_url=company_linkedin_url,
64
+ job=job,
65
+ max_results=max_results,
66
+ cursor=cursor,
67
+ )
68
+ return await self._client._request(
69
+ "POST", _COMPANY, body=body, cast_to=AsyncCursorPage[Job], timeout=timeout
70
+ )
@@ -141,12 +141,20 @@ class AsyncSearchResource:
141
141
  *,
142
142
  company_linkedin_url: str,
143
143
  cascade: list[CascadeTier],
144
+ profile_min_connections: int | None = None,
144
145
  max_results: int | None = None,
145
146
  timeout: TimeoutParam = None,
146
147
  ) -> WaterfallIcpResponse:
147
- """Find the best decision-maker at a company via a prioritized cascade."""
148
+ """Find the best decision-maker at a company via a prioritized cascade.
149
+
150
+ ``profile_min_connections`` sets the minimum LinkedIn connections for a match
151
+ (server defaults to 200 when omitted).
152
+ """
148
153
  body = _drop_none(
149
- company_linkedin_url=company_linkedin_url, cascade=cascade, max_results=max_results
154
+ company_linkedin_url=company_linkedin_url,
155
+ cascade=cascade,
156
+ profile_min_connections=profile_min_connections,
157
+ max_results=max_results,
150
158
  )
151
159
  return await self._client._request(
152
160
  "POST", _WATERFALL, body=body, cast_to=WaterfallIcpResponse, timeout=timeout
@@ -2,7 +2,7 @@
2
2
 
3
3
  from __future__ import annotations
4
4
 
5
- from typing import TYPE_CHECKING
5
+ from typing import TYPE_CHECKING, Any
6
6
 
7
7
  from ..._compat import TimeoutParam
8
8
  from ...types.utils import CurrentDateResponse
@@ -18,13 +18,17 @@ class AsyncUtilsResource:
18
18
  self._client = client
19
19
 
20
20
  async def current_date(
21
- self, *, region: str, timeout: TimeoutParam = None
21
+ self, *, region: str | None = None, timeout: TimeoutParam = None
22
22
  ) -> CurrentDateResponse:
23
- """Get the current server date/time for an IANA timezone (e.g. ``America/New_York``)."""
23
+ """Get the current server date/time for an IANA timezone (e.g. ``America/New_York``).
24
+
25
+ ``region`` is optional; the server defaults to ``America/New_York`` when omitted.
26
+ """
27
+ body: dict[str, Any] = {} if region is None else {"region": region}
24
28
  return await self._client._request(
25
29
  "POST",
26
30
  _CURRENT_DATE,
27
- body={"region": region},
31
+ body=body,
28
32
  cast_to=CurrentDateResponse,
29
33
  timeout=timeout,
30
34
  )
@@ -0,0 +1,55 @@
1
+ # This file is @generated by scripts/gen_sync.py from src/blitz_api/resources/_async/changelog.py.
2
+ # Do not edit by hand — edit the async source and run `python scripts/gen_sync.py`.
3
+ """The Changelog resource: ``client.changelog``."""
4
+
5
+ from __future__ import annotations
6
+
7
+ from typing import TYPE_CHECKING, Any
8
+
9
+ from ..._compat import TimeoutParam
10
+ from ...types.changelog import ChangelogEntry, ChangelogResponse
11
+
12
+ if TYPE_CHECKING:
13
+ from ..._client import BlitzAPI
14
+
15
+ # Public endpoint: NO ``/v2`` prefix, and the trailing slash is load-bearing.
16
+ _CHANGELOG = "/changelog/"
17
+
18
+
19
+ def _drop_none(**kwargs: Any) -> dict[str, Any]:
20
+ """Build a query-param mapping keeping only the arguments the caller provided."""
21
+ return {key: value for key, value in kwargs.items() if value is not None}
22
+
23
+
24
+ class ChangelogResource:
25
+ def __init__(self, client: BlitzAPI) -> None:
26
+ self._client = client
27
+
28
+ def list(
29
+ self,
30
+ *,
31
+ days: int | None = None,
32
+ limit: int | None = None,
33
+ timeout: TimeoutParam = None,
34
+ ) -> list[ChangelogEntry]:
35
+ """List the public Blitz API changelog, newest-first.
36
+
37
+ Each entry carries a ``date``, a ``type`` (``breaking`` | ``feature`` |
38
+ ``improvement`` | ``fix`` | ``deprecation`` | ``announcement``), a ``title``, and
39
+ optional ``body``, ``affected_endpoints``, and ``links``.
40
+
41
+ This endpoint is **public** — it costs no credits and works regardless of API-key
42
+ validity (the SDK still sends the key header, which the endpoint ignores). It is
43
+ **not paginated**: it returns a plain list filtered by the ``days`` / ``limit``
44
+ query parameters.
45
+ """
46
+ params = _drop_none(days=days, limit=limit)
47
+ result = self._client._request(
48
+ "GET",
49
+ _CHANGELOG,
50
+ body=None,
51
+ cast_to=ChangelogResponse,
52
+ params=params,
53
+ timeout=timeout,
54
+ )
55
+ return result.root
@@ -0,0 +1,57 @@
1
+ # This file is @generated by scripts/gen_sync.py from src/blitz_api/resources/_async/company.py.
2
+ # Do not edit by hand — edit the async source and run `python scripts/gen_sync.py`.
3
+ """The Company resource: ``client.company``."""
4
+
5
+ from __future__ import annotations
6
+
7
+ from typing import TYPE_CHECKING, Any
8
+
9
+ from ..._compat import TimeoutParam
10
+ from ..._pagination_sync import CursorPage
11
+ from ...types.company import TamByJobsMatch
12
+ from ...types.filters import JobCompanyFilter, TamJobFilter
13
+
14
+ if TYPE_CHECKING:
15
+ from ..._client import BlitzAPI
16
+
17
+ _TAM_BY_JOBS = "/v2/company/tam-by-jobs"
18
+
19
+
20
+ def _drop_none(**kwargs: Any) -> dict[str, Any]:
21
+ """Build a request body keeping only the arguments the caller provided."""
22
+ return {key: value for key, value in kwargs.items() if value is not None}
23
+
24
+
25
+ class CompanyResource:
26
+ def __init__(self, client: BlitzAPI) -> None:
27
+ self._client = client
28
+
29
+ def tam_by_jobs(
30
+ self,
31
+ *,
32
+ job: TamJobFilter | None = None,
33
+ company: JobCompanyFilter | None = None,
34
+ max_results: int | None = None,
35
+ cursor: str | None = None,
36
+ timeout: TimeoutParam = None,
37
+ ) -> CursorPage[TamByJobsMatch]:
38
+ """Build a Total Addressable Market of companies from live hiring signals.
39
+
40
+ Combine job-level filters (title, description, seniority, ...) with company
41
+ firmographics, and get back each matching company plus how many of its current
42
+ postings matched (``matched_jobs``). Use ``job["min_per_company"]`` to require a
43
+ minimum number of matching postings per company.
44
+
45
+ Cursor-paginated: auto-paginates over every ``{company, matched_jobs}`` match when
46
+ the result is iterated; use ``.iter_pages()`` or the ``cursor=`` arg for manual
47
+ control. The API bills **1 credit per result returned**; bound spend with
48
+ ``max_items`` on ``.collect()`` / ``.auto_paging_iter()``.
49
+ """
50
+ body = _drop_none(job=job, company=company, max_results=max_results, cursor=cursor)
51
+ return self._client._request(
52
+ "POST",
53
+ _TAM_BY_JOBS,
54
+ body=body,
55
+ cast_to=CursorPage[TamByJobsMatch],
56
+ timeout=timeout,
57
+ )