langchain-jobo 0.1.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.
- langchain_jobo-0.1.0/.gitignore +14 -0
- langchain_jobo-0.1.0/CHANGELOG.md +68 -0
- langchain_jobo-0.1.0/LICENSE +22 -0
- langchain_jobo-0.1.0/PKG-INFO +619 -0
- langchain_jobo-0.1.0/README.md +593 -0
- langchain_jobo-0.1.0/langchain_jobo/__init__.py +107 -0
- langchain_jobo-0.1.0/langchain_jobo/_base.py +166 -0
- langchain_jobo-0.1.0/langchain_jobo/_client.py +546 -0
- langchain_jobo-0.1.0/langchain_jobo/_version.py +3 -0
- langchain_jobo-0.1.0/langchain_jobo/document_loaders.py +472 -0
- langchain_jobo-0.1.0/langchain_jobo/errors.py +223 -0
- langchain_jobo-0.1.0/langchain_jobo/filters.py +1010 -0
- langchain_jobo-0.1.0/langchain_jobo/formatting.py +667 -0
- langchain_jobo-0.1.0/langchain_jobo/py.typed +0 -0
- langchain_jobo-0.1.0/langchain_jobo/retrievers.py +235 -0
- langchain_jobo-0.1.0/langchain_jobo/toolkit.py +112 -0
- langchain_jobo-0.1.0/langchain_jobo/tools.py +1063 -0
- langchain_jobo-0.1.0/pyproject.toml +122 -0
- langchain_jobo-0.1.0/tests/__init__.py +0 -0
- langchain_jobo-0.1.0/tests/unit_tests/__init__.py +0 -0
- langchain_jobo-0.1.0/tests/unit_tests/conftest.py +19 -0
- langchain_jobo-0.1.0/tests/unit_tests/helpers.py +250 -0
- langchain_jobo-0.1.0/tests/unit_tests/test_agent.py +212 -0
- langchain_jobo-0.1.0/tests/unit_tests/test_client.py +696 -0
- langchain_jobo-0.1.0/tests/unit_tests/test_contract_drift.py +242 -0
- langchain_jobo-0.1.0/tests/unit_tests/test_document_loaders.py +773 -0
- langchain_jobo-0.1.0/tests/unit_tests/test_filters.py +564 -0
- langchain_jobo-0.1.0/tests/unit_tests/test_formatting.py +566 -0
- langchain_jobo-0.1.0/tests/unit_tests/test_imports.py +97 -0
- langchain_jobo-0.1.0/tests/unit_tests/test_retrievers.py +455 -0
- langchain_jobo-0.1.0/tests/unit_tests/test_standard.py +266 -0
- langchain_jobo-0.1.0/tests/unit_tests/test_tools.py +1353 -0
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
## 0.1.0
|
|
4
|
+
|
|
5
|
+
First release: the Jobo jobs API as LangChain components.
|
|
6
|
+
|
|
7
|
+
### Added
|
|
8
|
+
|
|
9
|
+
- **`JoboSearchTool`** (`jobo_job_search`): structured job search over `POST /api/jobs/search`, with every
|
|
10
|
+
filter of the shared Jobo connector contract, including the include/exclude pairs (`companies`, `skills`,
|
|
11
|
+
`industries`, `company_categories`, `job_categories`, `job_subcategories`, `occupation_ids`). Returns
|
|
12
|
+
compact, citeable text and the raw jobs as the tool artifact.
|
|
13
|
+
- `query` is the first argument, and `location` takes one place or a list.
|
|
14
|
+
- `page_size` defaults to 5 and is capped at `max_page_size` (default 25), because search is billed per
|
|
15
|
+
job returned. The schema states the cap as the maximum, and a larger `page_size` is reduced to it with a
|
|
16
|
+
note instead of failing the call.
|
|
17
|
+
- `company_categories` and `exclude_company_categories` are a closed set, like the other fixed-value
|
|
18
|
+
filters: an unknown value is rejected before any request.
|
|
19
|
+
- A single string given to a list of names (`companies`, `industries`, `job_categories`,
|
|
20
|
+
`job_subcategories` and their `exclude_` twins) is one value and is never split on commas, so
|
|
21
|
+
`"FedEx, Inc."` stays one company. Ids, codes, fixed values and skills are still split.
|
|
22
|
+
- `description_format` is an option of the tool, not an argument the model sees: it only changes the
|
|
23
|
+
artifact.
|
|
24
|
+
- **`JoboJobDetailsTool`** (`jobo_job_details`): one listing by id as self-contained prose, from the free
|
|
25
|
+
`GET /api/jobs/{id}`. An id the API reports as unknown, or one that is not a UUID, is a plain answer for
|
|
26
|
+
the model. Any other `404` raises, so a wrong `base_url` is not read as "no such job".
|
|
27
|
+
- **`JoboCompanySearchTool`** (`jobo_company_search`): resolves a company name or domain prefix to the
|
|
28
|
+
company ids the search filter matches exactly.
|
|
29
|
+
- **`JoboFilterValuesTool`** (`jobo_filter_values`): the values a search filter accepts, with live job
|
|
30
|
+
counts, for `sources`, `industries`, `skills`, `company_categories`, `job_categories`,
|
|
31
|
+
`job_subcategories` and `occupations`. Occupations are searched by name in the occupation taxonomy.
|
|
32
|
+
- **`JoboLocationSearchTool`** (`jobo_location_search`): a place name to the locations the search takes.
|
|
33
|
+
- **`JoboRetriever`**: query to job `Document`s, with constructor-level `filters` and `k`.
|
|
34
|
+
- `invoke(query, k=..., filters=..., page=...)` overrides them for one call; per-call filters are laid
|
|
35
|
+
over the retriever's own. An unknown per-call keyword is a `TypeError`.
|
|
36
|
+
- API warnings (for example a `companies` value that matched no company, which returns no jobs) are
|
|
37
|
+
logged on the `langchain_jobo` logger and kept on `last_warnings`.
|
|
38
|
+
- **`JoboFeedLoader`**: `lazy_load()` / `alazy_load()` over `POST /api/jobs/feed` with cursor paging, a
|
|
39
|
+
required `max_jobs` budget, and `last_cursor` / `has_more` for resuming.
|
|
40
|
+
- `expired_job_ids()` (with `lazy_`, `a` and `alazy_` variants) reads the free `GET /api/jobs/expired`,
|
|
41
|
+
to drop closed jobs from an index built with the loader.
|
|
42
|
+
- A feed location without a country is rejected when the loader is built.
|
|
43
|
+
- **`get_jobo_tools()`**: the five tools in one call, sharing one connection pool. Every parameter is
|
|
44
|
+
named; `include_lookups=False` leaves out the three lookup tools.
|
|
45
|
+
- **Document metadata**: `source` is the listing URL, following the LangChain convention, and `ats` is the
|
|
46
|
+
applicant tracking system the listing was collected from.
|
|
47
|
+
- **Typing**: `api_key` accepts a `str` or a `SecretStr`. Filters are pydantic models
|
|
48
|
+
(`JoboSearchFilters`, `JoboFeedFilters`, `IncludeExclude`, `FeedLocation`, `CompanyCategoryFilter`,
|
|
49
|
+
`CompanySizeFilter`, `CompanyRevenueFilter`) or the same keys as typed dicts (`JoboSearchFiltersDict`,
|
|
50
|
+
`JoboFeedFiltersDict`, ...). The fixed value sets are exported as `Literal` aliases (`WorkModel`,
|
|
51
|
+
`EmploymentType`, `ExperienceLevel`, `CompanyCategory`, `CompanySize`, `CompanyRevenue`, `SearchSort`,
|
|
52
|
+
`DescriptionFormat`, `FilterFacet`). The README's examples pass `mypy --strict` and `pyright`.
|
|
53
|
+
- **Fail early**:
|
|
54
|
+
- A missing or blank API key raises `JoboConfigurationError` when a component is built, with where to
|
|
55
|
+
create a key.
|
|
56
|
+
- `JoboFeedLoader` refuses a sandbox key (`jbe_test_`) when it is built: the sandbox does not serve the
|
|
57
|
+
feed.
|
|
58
|
+
- An unknown constructor argument, such as `JoboSearchTool(max_pagesize=3)` or `JoboRetriever(K=2)`, is
|
|
59
|
+
rejected instead of ignored.
|
|
60
|
+
- **Sandbox keys**: the three lookup tools answer the model with a plain note when the sandbox refuses them
|
|
61
|
+
(`404 not_available_in_sandbox`) instead of raising, so `get_jobo_tools()` works with a sandbox key.
|
|
62
|
+
- Sync and async support throughout, on `httpx`. A component reuses one connection pool, and has `close()`,
|
|
63
|
+
`aclose()` and context-manager support.
|
|
64
|
+
- Retries for `429`, `500` and `503` that honour `Retry-After`; `402` and `409` are never retried.
|
|
65
|
+
- Typed exceptions (`JoboInsufficientCreditsError`, `JoboRateLimitError`,
|
|
66
|
+
`JoboFeedCursorRestartRequiredError`, ...) under `JoboError`. A `400`'s per-field `errors` are part of
|
|
67
|
+
the message and on `JoboValidationError.errors`; a `429`'s message says how many seconds to wait.
|
|
68
|
+
- `X-Jobo-Client: langchain` on every request.
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2025 Jobo AI
|
|
4
|
+
Copyright (c) 2026 Jobo AI LLC
|
|
5
|
+
|
|
6
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
7
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
8
|
+
in the Software without restriction, including without limitation the rights
|
|
9
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
10
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
11
|
+
furnished to do so, subject to the following conditions:
|
|
12
|
+
|
|
13
|
+
The above copyright notice and this permission notice shall be included in all
|
|
14
|
+
copies or substantial portions of the Software.
|
|
15
|
+
|
|
16
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
17
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
18
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
19
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
20
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
21
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
22
|
+
SOFTWARE.
|