blitz-api-py 4.2.0__tar.gz → 4.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.
Files changed (52) hide show
  1. {blitz_api_py-4.2.0 → blitz_api_py-4.3.0}/CHANGELOG.md +12 -0
  2. {blitz_api_py-4.2.0 → blitz_api_py-4.3.0}/PKG-INFO +34 -2
  3. {blitz_api_py-4.2.0 → blitz_api_py-4.3.0}/README.md +33 -1
  4. blitz_api_py-4.3.0/src/blitz_api/_version.py +1 -0
  5. {blitz_api_py-4.2.0 → blitz_api_py-4.3.0}/src/blitz_api/resources/_async/search.py +21 -4
  6. {blitz_api_py-4.2.0 → blitz_api_py-4.3.0}/src/blitz_api/resources/_sync/search.py +21 -4
  7. {blitz_api_py-4.2.0 → blitz_api_py-4.3.0}/src/blitz_api/types/enums.py +1 -0
  8. {blitz_api_py-4.2.0 → blitz_api_py-4.3.0}/src/blitz_api/types/shared.py +5 -0
  9. blitz_api_py-4.2.0/src/blitz_api/_version.py +0 -1
  10. {blitz_api_py-4.2.0 → blitz_api_py-4.3.0}/.gitignore +0 -0
  11. {blitz_api_py-4.2.0 → blitz_api_py-4.3.0}/LICENSE +0 -0
  12. {blitz_api_py-4.2.0 → blitz_api_py-4.3.0}/pyproject.toml +0 -0
  13. {blitz_api_py-4.2.0 → blitz_api_py-4.3.0}/src/blitz_api/__init__.py +0 -0
  14. {blitz_api_py-4.2.0 → blitz_api_py-4.3.0}/src/blitz_api/_base_client.py +0 -0
  15. {blitz_api_py-4.2.0 → blitz_api_py-4.3.0}/src/blitz_api/_client.py +0 -0
  16. {blitz_api_py-4.2.0 → blitz_api_py-4.3.0}/src/blitz_api/_client_async.py +0 -0
  17. {blitz_api_py-4.2.0 → blitz_api_py-4.3.0}/src/blitz_api/_client_sync.py +0 -0
  18. {blitz_api_py-4.2.0 → blitz_api_py-4.3.0}/src/blitz_api/_compat.py +0 -0
  19. {blitz_api_py-4.2.0 → blitz_api_py-4.3.0}/src/blitz_api/_constants.py +0 -0
  20. {blitz_api_py-4.2.0 → blitz_api_py-4.3.0}/src/blitz_api/_exceptions.py +0 -0
  21. {blitz_api_py-4.2.0 → blitz_api_py-4.3.0}/src/blitz_api/_pagination_async.py +0 -0
  22. {blitz_api_py-4.2.0 → blitz_api_py-4.3.0}/src/blitz_api/_pagination_base.py +0 -0
  23. {blitz_api_py-4.2.0 → blitz_api_py-4.3.0}/src/blitz_api/_pagination_sync.py +0 -0
  24. {blitz_api_py-4.2.0 → blitz_api_py-4.3.0}/src/blitz_api/_rate_limit.py +0 -0
  25. {blitz_api_py-4.2.0 → blitz_api_py-4.3.0}/src/blitz_api/_rate_limit_async.py +0 -0
  26. {blitz_api_py-4.2.0 → blitz_api_py-4.3.0}/src/blitz_api/_rate_limit_sync.py +0 -0
  27. {blitz_api_py-4.2.0 → blitz_api_py-4.3.0}/src/blitz_api/py.typed +0 -0
  28. {blitz_api_py-4.2.0 → blitz_api_py-4.3.0}/src/blitz_api/resources/__init__.py +0 -0
  29. {blitz_api_py-4.2.0 → blitz_api_py-4.3.0}/src/blitz_api/resources/_async/__init__.py +0 -0
  30. {blitz_api_py-4.2.0 → blitz_api_py-4.3.0}/src/blitz_api/resources/_async/account.py +0 -0
  31. {blitz_api_py-4.2.0 → blitz_api_py-4.3.0}/src/blitz_api/resources/_async/changelog.py +0 -0
  32. {blitz_api_py-4.2.0 → blitz_api_py-4.3.0}/src/blitz_api/resources/_async/company.py +0 -0
  33. {blitz_api_py-4.2.0 → blitz_api_py-4.3.0}/src/blitz_api/resources/_async/enrichment.py +0 -0
  34. {blitz_api_py-4.2.0 → blitz_api_py-4.3.0}/src/blitz_api/resources/_async/jobs.py +0 -0
  35. {blitz_api_py-4.2.0 → blitz_api_py-4.3.0}/src/blitz_api/resources/_async/utils.py +0 -0
  36. {blitz_api_py-4.2.0 → blitz_api_py-4.3.0}/src/blitz_api/resources/_sync/__init__.py +0 -0
  37. {blitz_api_py-4.2.0 → blitz_api_py-4.3.0}/src/blitz_api/resources/_sync/account.py +0 -0
  38. {blitz_api_py-4.2.0 → blitz_api_py-4.3.0}/src/blitz_api/resources/_sync/changelog.py +0 -0
  39. {blitz_api_py-4.2.0 → blitz_api_py-4.3.0}/src/blitz_api/resources/_sync/company.py +0 -0
  40. {blitz_api_py-4.2.0 → blitz_api_py-4.3.0}/src/blitz_api/resources/_sync/enrichment.py +0 -0
  41. {blitz_api_py-4.2.0 → blitz_api_py-4.3.0}/src/blitz_api/resources/_sync/jobs.py +0 -0
  42. {blitz_api_py-4.2.0 → blitz_api_py-4.3.0}/src/blitz_api/resources/_sync/utils.py +0 -0
  43. {blitz_api_py-4.2.0 → blitz_api_py-4.3.0}/src/blitz_api/types/__init__.py +0 -0
  44. {blitz_api_py-4.2.0 → blitz_api_py-4.3.0}/src/blitz_api/types/_models.py +0 -0
  45. {blitz_api_py-4.2.0 → blitz_api_py-4.3.0}/src/blitz_api/types/account.py +0 -0
  46. {blitz_api_py-4.2.0 → blitz_api_py-4.3.0}/src/blitz_api/types/changelog.py +0 -0
  47. {blitz_api_py-4.2.0 → blitz_api_py-4.3.0}/src/blitz_api/types/company.py +0 -0
  48. {blitz_api_py-4.2.0 → blitz_api_py-4.3.0}/src/blitz_api/types/enrichment.py +0 -0
  49. {blitz_api_py-4.2.0 → blitz_api_py-4.3.0}/src/blitz_api/types/filters.py +0 -0
  50. {blitz_api_py-4.2.0 → blitz_api_py-4.3.0}/src/blitz_api/types/jobs.py +0 -0
  51. {blitz_api_py-4.2.0 → blitz_api_py-4.3.0}/src/blitz_api/types/search.py +0 -0
  52. {blitz_api_py-4.2.0 → blitz_api_py-4.3.0}/src/blitz_api/types/utils.py +0 -0
@@ -1,5 +1,17 @@
1
1
  # Changelog
2
2
 
3
+ ## [4.3.0](https://github.com/api-blitz/blitz-api-py/compare/v4.2.0...v4.3.0) (2026-11-18)
4
+
5
+
6
+ ### Features
7
+
8
+ * add employee_finder job filters and job_duration_months ([#40](https://github.com/api-blitz/blitz-api-py/issues/40)) ([447565c](https://github.com/api-blitz/blitz-api-py/commit/447565cff93d394037814e7a0b223e257735d4f9))
9
+
10
+
11
+ ### Bug Fixes
12
+
13
+ * add the Artificial Intelligence industry to the generated enums ([#39](https://github.com/api-blitz/blitz-api-py/issues/39)) ([4d41d29](https://github.com/api-blitz/blitz-api-py/commit/4d41d2923e3d219beca2c05cf9849d7c840da658))
14
+
3
15
  ## [4.2.0](https://github.com/api-blitz/blitz-api-py/compare/v4.1.0...v4.2.0) (2026-10-27)
4
16
 
5
17
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.5
2
2
  Name: blitz-api-py
3
- Version: 4.2.0
3
+ Version: 4.3.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
@@ -169,7 +169,15 @@ Person(
169
169
  location=Location(city="San Francisco", state_code="CA", country_code="US", continent="North America"),
170
170
  # Only the position that matched your filters — `job_is_current` says whether it
171
171
  # is current (past jobs are searched only with `include_past_jobs`).
172
- experiences=[Experience(job_title="VP of Engineering", company_name="Acme", job_is_current=True)],
172
+ # `job_duration_months` counts the months in the position.
173
+ experiences=[
174
+ Experience(
175
+ job_title="VP of Engineering",
176
+ company_name="Acme",
177
+ job_is_current=True,
178
+ job_duration_months=19,
179
+ )
180
+ ],
173
181
  # first_name, last_name, skills, education, certifications, … also present
174
182
  )
175
183
  ```
@@ -272,6 +280,30 @@ Where the flags go depends on the route, and the API rejects a flag in the wrong
272
280
  | `search.employee_finder` | top-level argument | — |
273
281
  | `enrichment.company_distribution_by_country` / `_by_department` | top-level argument | — |
274
282
 
283
+ `search.employee_finder` also takes `job_title` and `job_description`, each a dict with
284
+ `include` and `exclude` lists of phrases. They are matched against the person's current job
285
+ at the company, the same job as `job_level`, `job_function` and `is_recent_hire`. Wrap a
286
+ `job_title` phrase in `[brackets]` to match the whole title exactly; `job_description` has
287
+ no exact match. Each list takes up to 50 phrases (`job_description["exclude"]`: 20).
288
+
289
+ ```python
290
+ # Sales leaders at one company whose job description mentions Salesforce, interns left out.
291
+ employees = client.search.employee_finder(
292
+ company_linkedin_url="https://www.linkedin.com/company/openai",
293
+ job_title={"include": ["[Head of Sales]", "Account Executive"], "exclude": ["Intern"]},
294
+ job_description={"include": ["Salesforce"]},
295
+ )
296
+ for person in employees.auto_paging_iter(max_items=100):
297
+ job = person.experiences[0] if person.experiences else None
298
+ if job:
299
+ print(person.full_name, job.job_title, job.job_duration_months)
300
+ ```
301
+
302
+ Every `experiences[]` entry carries `job_duration_months`: the number of months in the
303
+ position, up to the current month for a current position and up to `job_end_date` for a past
304
+ one (the start and end months both count). It is `None` when `job_start_date` is missing, or
305
+ when a past position has no `job_end_date`.
306
+
275
307
  Setting both `include_*_jobs` flags to `False` is a `422`. `MxProvider.ANY` stands for
276
308
  *every* provider: in `include` it keeps companies with mail data, in `exclude` it keeps
277
309
  companies with none.
@@ -138,7 +138,15 @@ Person(
138
138
  location=Location(city="San Francisco", state_code="CA", country_code="US", continent="North America"),
139
139
  # Only the position that matched your filters — `job_is_current` says whether it
140
140
  # is current (past jobs are searched only with `include_past_jobs`).
141
- experiences=[Experience(job_title="VP of Engineering", company_name="Acme", job_is_current=True)],
141
+ # `job_duration_months` counts the months in the position.
142
+ experiences=[
143
+ Experience(
144
+ job_title="VP of Engineering",
145
+ company_name="Acme",
146
+ job_is_current=True,
147
+ job_duration_months=19,
148
+ )
149
+ ],
142
150
  # first_name, last_name, skills, education, certifications, … also present
143
151
  )
144
152
  ```
@@ -241,6 +249,30 @@ Where the flags go depends on the route, and the API rejects a flag in the wrong
241
249
  | `search.employee_finder` | top-level argument | — |
242
250
  | `enrichment.company_distribution_by_country` / `_by_department` | top-level argument | — |
243
251
 
252
+ `search.employee_finder` also takes `job_title` and `job_description`, each a dict with
253
+ `include` and `exclude` lists of phrases. They are matched against the person's current job
254
+ at the company, the same job as `job_level`, `job_function` and `is_recent_hire`. Wrap a
255
+ `job_title` phrase in `[brackets]` to match the whole title exactly; `job_description` has
256
+ no exact match. Each list takes up to 50 phrases (`job_description["exclude"]`: 20).
257
+
258
+ ```python
259
+ # Sales leaders at one company whose job description mentions Salesforce, interns left out.
260
+ employees = client.search.employee_finder(
261
+ company_linkedin_url="https://www.linkedin.com/company/openai",
262
+ job_title={"include": ["[Head of Sales]", "Account Executive"], "exclude": ["Intern"]},
263
+ job_description={"include": ["Salesforce"]},
264
+ )
265
+ for person in employees.auto_paging_iter(max_items=100):
266
+ job = person.experiences[0] if person.experiences else None
267
+ if job:
268
+ print(person.full_name, job.job_title, job.job_duration_months)
269
+ ```
270
+
271
+ Every `experiences[]` entry carries `job_duration_months`: the number of months in the
272
+ position, up to the current month for a current position and up to `job_end_date` for a past
273
+ one (the start and end months both count). It is `None` when `job_start_date` is missing, or
274
+ when a past position has no `job_end_date`.
275
+
244
276
  Setting both `include_*_jobs` flags to `False` is a `422`. `MxProvider.ANY` stands for
245
277
  *every* provider: in `include` it keeps companies with mail data, in `exclude` it keeps
246
278
  companies with none.
@@ -0,0 +1 @@
1
+ __version__ = "4.3.0" # x-release-please-version
@@ -12,6 +12,7 @@ from ...types.filters import (
12
12
  ContinentValue,
13
13
  JobFunctionValue,
14
14
  JobLevelValue,
15
+ KeywordFilter,
15
16
  PeopleCompanyFilter,
16
17
  PeopleFilter,
17
18
  SalesRegionValue,
@@ -84,6 +85,8 @@ class AsyncSearchResource:
84
85
  sales_region: list[SalesRegionValue] | None = None,
85
86
  job_level: list[JobLevelValue] | None = None,
86
87
  job_function: list[JobFunctionValue] | None = None,
88
+ job_title: KeywordFilter | None = None,
89
+ job_description: KeywordFilter | None = None,
87
90
  min_connections_count: int | None = None,
88
91
  is_recent_hire: bool | None = None,
89
92
  max_results: int | None = None,
@@ -92,11 +95,23 @@ class AsyncSearchResource:
92
95
  ) -> AsyncPageNumberPage[Person]:
93
96
  """Search employees at a single company, with page-based pagination.
94
97
 
95
- ``is_recent_hire=True`` keeps only people whose **current** job at the company
96
- started in the last 90 days (that job must also match ``job_level`` and
97
- ``job_function``; a job with no start date never matches).
98
+ ``job_level``, ``job_function``, ``job_title``, ``job_description`` and
99
+ ``is_recent_hire`` must all hold in the same job: the person's **current** job at
100
+ the company.
98
101
 
99
- Each list is capped at 50 entries (a longer one is a ``422``). ``country_code``
102
+ ``job_title`` and ``job_description`` each take ``include`` / ``exclude`` lists of
103
+ phrases. A title matches when it has every word of at least one ``include`` phrase;
104
+ wrap a phrase in brackets (``"[Head of Sales]"``) to match the whole title exactly,
105
+ ignoring case and accents. A description matches when every word of a phrase appears
106
+ in it, in any order (only its first 10,000 characters are searched); brackets give
107
+ no exact match there. ``exclude`` drops a job that matches any phrase, and
108
+ ``job_description["exclude"]`` never drops a job with no description.
109
+
110
+ ``is_recent_hire=True`` keeps only people whose job started in the last 90 days (a
111
+ job with no start date never matches).
112
+
113
+ Each list is capped at 50 entries, except ``job_description["exclude"]`` (20); a
114
+ longer one is a ``422``. ``country_code``
100
115
  defaults to ``["WORLD"]`` server-side: a list holding ``"WORLD"`` drops the country
101
116
  filter. ``min_connections_count`` runs 0-500 (``0`` = no lower bound).
102
117
 
@@ -110,6 +125,8 @@ class AsyncSearchResource:
110
125
  "sales_region": sales_region,
111
126
  "job_level": job_level,
112
127
  "job_function": job_function,
128
+ "job_title": job_title,
129
+ "job_description": job_description,
113
130
  "min_connections_count": min_connections_count,
114
131
  "is_recent_hire": is_recent_hire,
115
132
  "max_results": max_results,
@@ -14,6 +14,7 @@ from ...types.filters import (
14
14
  ContinentValue,
15
15
  JobFunctionValue,
16
16
  JobLevelValue,
17
+ KeywordFilter,
17
18
  PeopleCompanyFilter,
18
19
  PeopleFilter,
19
20
  SalesRegionValue,
@@ -86,6 +87,8 @@ class SearchResource:
86
87
  sales_region: list[SalesRegionValue] | None = None,
87
88
  job_level: list[JobLevelValue] | None = None,
88
89
  job_function: list[JobFunctionValue] | None = None,
90
+ job_title: KeywordFilter | None = None,
91
+ job_description: KeywordFilter | None = None,
89
92
  min_connections_count: int | None = None,
90
93
  is_recent_hire: bool | None = None,
91
94
  max_results: int | None = None,
@@ -94,11 +97,23 @@ class SearchResource:
94
97
  ) -> PageNumberPage[Person]:
95
98
  """Search employees at a single company, with page-based pagination.
96
99
 
97
- ``is_recent_hire=True`` keeps only people whose **current** job at the company
98
- started in the last 90 days (that job must also match ``job_level`` and
99
- ``job_function``; a job with no start date never matches).
100
+ ``job_level``, ``job_function``, ``job_title``, ``job_description`` and
101
+ ``is_recent_hire`` must all hold in the same job: the person's **current** job at
102
+ the company.
100
103
 
101
- Each list is capped at 50 entries (a longer one is a ``422``). ``country_code``
104
+ ``job_title`` and ``job_description`` each take ``include`` / ``exclude`` lists of
105
+ phrases. A title matches when it has every word of at least one ``include`` phrase;
106
+ wrap a phrase in brackets (``"[Head of Sales]"``) to match the whole title exactly,
107
+ ignoring case and accents. A description matches when every word of a phrase appears
108
+ in it, in any order (only its first 10,000 characters are searched); brackets give
109
+ no exact match there. ``exclude`` drops a job that matches any phrase, and
110
+ ``job_description["exclude"]`` never drops a job with no description.
111
+
112
+ ``is_recent_hire=True`` keeps only people whose job started in the last 90 days (a
113
+ job with no start date never matches).
114
+
115
+ Each list is capped at 50 entries, except ``job_description["exclude"]`` (20); a
116
+ longer one is a ``422``. ``country_code``
102
117
  defaults to ``["WORLD"]`` server-side: a list holding ``"WORLD"`` drops the country
103
118
  filter. ``min_connections_count`` runs 0-500 (``0`` = no lower bound).
104
119
 
@@ -112,6 +127,8 @@ class SearchResource:
112
127
  "sales_region": sales_region,
113
128
  "job_level": job_level,
114
129
  "job_function": job_function,
130
+ "job_title": job_title,
131
+ "job_description": job_description,
115
132
  "min_connections_count": min_connections_count,
116
133
  "is_recent_hire": is_recent_hire,
117
134
  "max_results": max_results,
@@ -54,6 +54,7 @@ class Industry(str, Enum):
54
54
  ARCHITECTURAL_AND_STRUCTURAL_METAL_MANUFACTURING = 'Architectural and Structural Metal Manufacturing'
55
55
  ARCHITECTURE_AND_PLANNING = 'Architecture and Planning'
56
56
  ARMED_FORCES = 'Armed Forces'
57
+ ARTIFICIAL_INTELLIGENCE = 'Artificial Intelligence'
57
58
  ARTIFICIAL_RUBBER_AND_SYNTHETIC_FIBER_MANUFACTURING = 'Artificial Rubber and Synthetic Fiber Manufacturing'
58
59
  ARTISTS_AND_WRITERS = 'Artists and Writers'
59
60
  ARTS_AND_CRAFTS = 'Arts and Crafts'
@@ -58,6 +58,11 @@ class Experience(BlitzModel):
58
58
  job_start_date: str | None = None
59
59
  job_end_date: str | None = None
60
60
  job_is_current: bool | None = None
61
+ #: Months the person has held the position: up to the current month for a current
62
+ #: position, up to ``job_end_date`` for a past one. The start and end months both count,
63
+ #: so a position that started this month gives ``1``. ``None`` when ``job_start_date``
64
+ #: is missing, or when a past position has no ``job_end_date``.
65
+ job_duration_months: int | None = None
61
66
  #: How the role is contracted, e.g. ``"Full-time"``, ``"Contract"``, ``"Internship"``.
62
67
  job_contract_type: str | None = None
63
68
  #: Where the work is performed, e.g. ``"Remote"``, ``"Hybrid"``, ``"On-site"``.
@@ -1 +0,0 @@
1
- __version__ = "4.2.0" # x-release-please-version
File without changes
File without changes