blitz-api-py 0.1.0__tar.gz → 0.3.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.
- {blitz_api_py-0.1.0 → blitz_api_py-0.3.0}/.gitignore +5 -0
- blitz_api_py-0.3.0/CHANGELOG.md +31 -0
- {blitz_api_py-0.1.0 → blitz_api_py-0.3.0}/PKG-INFO +1 -1
- {blitz_api_py-0.1.0 → blitz_api_py-0.3.0}/src/blitz_api/_pagination_async.py +21 -0
- {blitz_api_py-0.1.0 → blitz_api_py-0.3.0}/src/blitz_api/_pagination_sync.py +21 -0
- blitz_api_py-0.3.0/src/blitz_api/_version.py +1 -0
- {blitz_api_py-0.1.0 → blitz_api_py-0.3.0}/src/blitz_api/types/search.py +3 -0
- blitz_api_py-0.1.0/CHANGELOG.md +0 -17
- blitz_api_py-0.1.0/src/blitz_api/_version.py +0 -1
- {blitz_api_py-0.1.0 → blitz_api_py-0.3.0}/LICENSE +0 -0
- {blitz_api_py-0.1.0 → blitz_api_py-0.3.0}/README.md +0 -0
- {blitz_api_py-0.1.0 → blitz_api_py-0.3.0}/pyproject.toml +0 -0
- {blitz_api_py-0.1.0 → blitz_api_py-0.3.0}/src/blitz_api/__init__.py +0 -0
- {blitz_api_py-0.1.0 → blitz_api_py-0.3.0}/src/blitz_api/_base_client.py +0 -0
- {blitz_api_py-0.1.0 → blitz_api_py-0.3.0}/src/blitz_api/_client.py +0 -0
- {blitz_api_py-0.1.0 → blitz_api_py-0.3.0}/src/blitz_api/_client_async.py +0 -0
- {blitz_api_py-0.1.0 → blitz_api_py-0.3.0}/src/blitz_api/_client_sync.py +0 -0
- {blitz_api_py-0.1.0 → blitz_api_py-0.3.0}/src/blitz_api/_compat.py +0 -0
- {blitz_api_py-0.1.0 → blitz_api_py-0.3.0}/src/blitz_api/_constants.py +0 -0
- {blitz_api_py-0.1.0 → blitz_api_py-0.3.0}/src/blitz_api/_exceptions.py +0 -0
- {blitz_api_py-0.1.0 → blitz_api_py-0.3.0}/src/blitz_api/_pagination_base.py +0 -0
- {blitz_api_py-0.1.0 → blitz_api_py-0.3.0}/src/blitz_api/_rate_limit.py +0 -0
- {blitz_api_py-0.1.0 → blitz_api_py-0.3.0}/src/blitz_api/_rate_limit_async.py +0 -0
- {blitz_api_py-0.1.0 → blitz_api_py-0.3.0}/src/blitz_api/_rate_limit_sync.py +0 -0
- {blitz_api_py-0.1.0 → blitz_api_py-0.3.0}/src/blitz_api/py.typed +0 -0
- {blitz_api_py-0.1.0 → blitz_api_py-0.3.0}/src/blitz_api/resources/__init__.py +0 -0
- {blitz_api_py-0.1.0 → blitz_api_py-0.3.0}/src/blitz_api/resources/_async/__init__.py +0 -0
- {blitz_api_py-0.1.0 → blitz_api_py-0.3.0}/src/blitz_api/resources/_async/account.py +0 -0
- {blitz_api_py-0.1.0 → blitz_api_py-0.3.0}/src/blitz_api/resources/_async/enrichment.py +0 -0
- {blitz_api_py-0.1.0 → blitz_api_py-0.3.0}/src/blitz_api/resources/_async/search.py +0 -0
- {blitz_api_py-0.1.0 → blitz_api_py-0.3.0}/src/blitz_api/resources/_async/utils.py +0 -0
- {blitz_api_py-0.1.0 → blitz_api_py-0.3.0}/src/blitz_api/resources/_sync/__init__.py +0 -0
- {blitz_api_py-0.1.0 → blitz_api_py-0.3.0}/src/blitz_api/resources/_sync/account.py +0 -0
- {blitz_api_py-0.1.0 → blitz_api_py-0.3.0}/src/blitz_api/resources/_sync/enrichment.py +0 -0
- {blitz_api_py-0.1.0 → blitz_api_py-0.3.0}/src/blitz_api/resources/_sync/search.py +0 -0
- {blitz_api_py-0.1.0 → blitz_api_py-0.3.0}/src/blitz_api/resources/_sync/utils.py +0 -0
- {blitz_api_py-0.1.0 → blitz_api_py-0.3.0}/src/blitz_api/types/__init__.py +0 -0
- {blitz_api_py-0.1.0 → blitz_api_py-0.3.0}/src/blitz_api/types/_models.py +0 -0
- {blitz_api_py-0.1.0 → blitz_api_py-0.3.0}/src/blitz_api/types/account.py +0 -0
- {blitz_api_py-0.1.0 → blitz_api_py-0.3.0}/src/blitz_api/types/enrichment.py +0 -0
- {blitz_api_py-0.1.0 → blitz_api_py-0.3.0}/src/blitz_api/types/enums.py +0 -0
- {blitz_api_py-0.1.0 → blitz_api_py-0.3.0}/src/blitz_api/types/filters.py +0 -0
- {blitz_api_py-0.1.0 → blitz_api_py-0.3.0}/src/blitz_api/types/shared.py +0 -0
- {blitz_api_py-0.1.0 → blitz_api_py-0.3.0}/src/blitz_api/types/utils.py +0 -0
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
## [0.3.0](https://github.com/api-blitz/blitz-api-py/compare/v0.2.0...v0.3.0) (2026-06-04)
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
### Features
|
|
7
|
+
|
|
8
|
+
* generate enums from the live OpenAPI spec with offline drift guard ([#9](https://github.com/api-blitz/blitz-api-py/issues/9)) ([fee865c](https://github.com/api-blitz/blitz-api-py/commit/fee865c4d8f7c685330794fa79921dccd7556e37))
|
|
9
|
+
|
|
10
|
+
## [0.2.0](https://github.com/api-blitz/blitz-api-py/compare/v0.1.0...v0.2.0) (2026-06-02)
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
### Features
|
|
14
|
+
|
|
15
|
+
* cursor guard, page.collect(), and typed waterfall-icp fields ([#7](https://github.com/api-blitz/blitz-api-py/issues/7)) ([b77cdff](https://github.com/api-blitz/blitz-api-py/commit/b77cdffc99c680c2a37d36c8d22ee4c5381e8c68))
|
|
16
|
+
|
|
17
|
+
## [0.1.0](https://github.com/api-blitz/blitz-api-py/compare/v0.1.0...v0.1.0) (2026-06-02)
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
### Features
|
|
21
|
+
|
|
22
|
+
* typed Python SDK for the Blitz API with automated releases ([5641a51](https://github.com/api-blitz/blitz-api-py/commit/5641a51b405108029bc701988e08d6210a1255f6))
|
|
23
|
+
|
|
24
|
+
## Changelog
|
|
25
|
+
|
|
26
|
+
All notable changes to this project are documented in this file.
|
|
27
|
+
|
|
28
|
+
This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html)
|
|
29
|
+
and the changelog is maintained automatically by
|
|
30
|
+
[release-please](https://github.com/googleapis/release-please) from
|
|
31
|
+
[Conventional Commits](https://www.conventionalcommits.org/).
|
|
@@ -17,6 +17,7 @@ from typing import Any, Generic, TypeVar, cast
|
|
|
17
17
|
|
|
18
18
|
from typing_extensions import Self
|
|
19
19
|
|
|
20
|
+
from ._exceptions import BlitzError
|
|
20
21
|
from ._pagination_base import BasePage
|
|
21
22
|
|
|
22
23
|
ItemT = TypeVar("ItemT")
|
|
@@ -49,6 +50,17 @@ class AsyncPaginator(BasePage, Generic[ItemT]):
|
|
|
49
50
|
"""Iterate every item across all pages, optionally stopping after ``max_items``."""
|
|
50
51
|
return self._auto_paging_items(max_items)
|
|
51
52
|
|
|
53
|
+
async def collect(self, *, max_items: int | None = None) -> list[ItemT]:
|
|
54
|
+
"""Drain every item across all pages into a list, optionally capped at ``max_items``.
|
|
55
|
+
|
|
56
|
+
Convenience over a manual iteration loop; pair with ``max_items`` so an unbounded result
|
|
57
|
+
set can't exhaust memory — or credits, since the API bills per result returned.
|
|
58
|
+
"""
|
|
59
|
+
items: list[ItemT] = []
|
|
60
|
+
async for item in self._auto_paging_items(max_items):
|
|
61
|
+
items.append(item)
|
|
62
|
+
return items
|
|
63
|
+
|
|
52
64
|
async def iter_pages(self, *, max_pages: int | None = None) -> AsyncIterator[Self]:
|
|
53
65
|
"""Iterate page objects across the result set, optionally capped at ``max_pages``."""
|
|
54
66
|
page = self
|
|
@@ -97,6 +109,15 @@ class AsyncCursorPage(AsyncPaginator[ItemT], Generic[ItemT]):
|
|
|
97
109
|
return bool(self.cursor)
|
|
98
110
|
|
|
99
111
|
def _next_body(self) -> dict[str, Any]:
|
|
112
|
+
# Guard against a non-advancing cursor: if the API hands back the same cursor it was
|
|
113
|
+
# given, paging again would re-fetch (and re-bill) the same page forever. ``_body``
|
|
114
|
+
# holds the cursor that fetched THIS page (bound after the request), so a cheap equality
|
|
115
|
+
# check breaks the loop instead of spinning. Mirrors the JS SDK's CursorPage guard.
|
|
116
|
+
if self.cursor is not None and self.cursor == self._body.get("cursor"):
|
|
117
|
+
raise BlitzError(
|
|
118
|
+
"Cursor did not advance: the API returned the same cursor it was given. "
|
|
119
|
+
"Aborting to avoid an infinite pagination loop."
|
|
120
|
+
)
|
|
100
121
|
return {**self._body, "cursor": self.cursor}
|
|
101
122
|
|
|
102
123
|
|
|
@@ -19,6 +19,7 @@ from typing import Any, Generic, TypeVar, cast
|
|
|
19
19
|
|
|
20
20
|
from typing_extensions import Self
|
|
21
21
|
|
|
22
|
+
from ._exceptions import BlitzError
|
|
22
23
|
from ._pagination_base import BasePage
|
|
23
24
|
|
|
24
25
|
ItemT = TypeVar("ItemT")
|
|
@@ -51,6 +52,17 @@ class Paginator(BasePage, Generic[ItemT]):
|
|
|
51
52
|
"""Iterate every item across all pages, optionally stopping after ``max_items``."""
|
|
52
53
|
return self._auto_paging_items(max_items)
|
|
53
54
|
|
|
55
|
+
def collect(self, *, max_items: int | None = None) -> list[ItemT]:
|
|
56
|
+
"""Drain every item across all pages into a list, optionally capped at ``max_items``.
|
|
57
|
+
|
|
58
|
+
Convenience over a manual iteration loop; pair with ``max_items`` so an unbounded result
|
|
59
|
+
set can't exhaust memory — or credits, since the API bills per result returned.
|
|
60
|
+
"""
|
|
61
|
+
items: list[ItemT] = []
|
|
62
|
+
for item in self._auto_paging_items(max_items):
|
|
63
|
+
items.append(item)
|
|
64
|
+
return items
|
|
65
|
+
|
|
54
66
|
def iter_pages(self, *, max_pages: int | None = None) -> Iterator[Self]:
|
|
55
67
|
"""Iterate page objects across the result set, optionally capped at ``max_pages``."""
|
|
56
68
|
page = self
|
|
@@ -99,6 +111,15 @@ class CursorPage(Paginator[ItemT], Generic[ItemT]):
|
|
|
99
111
|
return bool(self.cursor)
|
|
100
112
|
|
|
101
113
|
def _next_body(self) -> dict[str, Any]:
|
|
114
|
+
# Guard against a non-advancing cursor: if the API hands back the same cursor it was
|
|
115
|
+
# given, paging again would re-fetch (and re-bill) the same page forever. ``_body``
|
|
116
|
+
# holds the cursor that fetched THIS page (bound after the request), so a cheap equality
|
|
117
|
+
# check breaks the loop instead of spinning. Mirrors the JS SDK's CursorPage guard.
|
|
118
|
+
if self.cursor is not None and self.cursor == self._body.get("cursor"):
|
|
119
|
+
raise BlitzError(
|
|
120
|
+
"Cursor did not advance: the API returned the same cursor it was given. "
|
|
121
|
+
"Aborting to avoid an infinite pagination loop."
|
|
122
|
+
)
|
|
102
123
|
return {**self._body, "cursor": self.cursor}
|
|
103
124
|
|
|
104
125
|
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
__version__ = "0.3.0" # x-release-please-version
|
|
@@ -33,4 +33,7 @@ class WaterfallIcpMatch(BlitzModel):
|
|
|
33
33
|
class WaterfallIcpResponse(BlitzModel):
|
|
34
34
|
"""Result of ``search.waterfall_icp``."""
|
|
35
35
|
|
|
36
|
+
company_linkedin_url: str | None = None
|
|
37
|
+
max_results: int | None = None
|
|
38
|
+
results_length: int | None = None
|
|
36
39
|
results: list[WaterfallIcpMatch] = []
|
blitz_api_py-0.1.0/CHANGELOG.md
DELETED
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
# Changelog
|
|
2
|
-
|
|
3
|
-
## [0.1.0](https://github.com/api-blitz/blitz-api-py/compare/v0.1.0...v0.1.0) (2026-06-02)
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
### Features
|
|
7
|
-
|
|
8
|
-
* typed Python SDK for the Blitz API with automated releases ([5641a51](https://github.com/api-blitz/blitz-api-py/commit/5641a51b405108029bc701988e08d6210a1255f6))
|
|
9
|
-
|
|
10
|
-
## Changelog
|
|
11
|
-
|
|
12
|
-
All notable changes to this project are documented in this file.
|
|
13
|
-
|
|
14
|
-
This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html)
|
|
15
|
-
and the changelog is maintained automatically by
|
|
16
|
-
[release-please](https://github.com/googleapis/release-please) from
|
|
17
|
-
[Conventional Commits](https://www.conventionalcommits.org/).
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
__version__ = "0.1.0" # x-release-please-version
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|