boarddata 4.1.2__tar.gz → 4.2.1__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 (59) hide show
  1. {boarddata-4.1.2 → boarddata-4.2.1}/PKG-INFO +1 -1
  2. {boarddata-4.1.2 → boarddata-4.2.1}/__init__.py +1 -1
  3. {boarddata-4.1.2 → boarddata-4.2.1}/_companies.py +44 -1
  4. {boarddata-4.1.2 → boarddata-4.2.1}/boarddata.egg-info/PKG-INFO +1 -1
  5. {boarddata-4.1.2 → boarddata-4.2.1}/pyproject.toml +1 -1
  6. {boarddata-4.1.2 → boarddata-4.2.1}/types/companies.py +9 -0
  7. {boarddata-4.1.2 → boarddata-4.2.1}/types/core.py +8 -3
  8. {boarddata-4.1.2 → boarddata-4.2.1}/CLAUDE.md +0 -0
  9. {boarddata-4.1.2 → boarddata-4.2.1}/README.md +0 -0
  10. {boarddata-4.1.2 → boarddata-4.2.1}/_assemblies.py +0 -0
  11. {boarddata-4.1.2 → boarddata-4.2.1}/_auditors.py +0 -0
  12. {boarddata-4.1.2 → boarddata-4.2.1}/_base.py +0 -0
  13. {boarddata-4.1.2 → boarddata-4.2.1}/_comex.py +0 -0
  14. {boarddata-4.1.2 → boarddata-4.2.1}/_criteria.py +0 -0
  15. {boarddata-4.1.2 → boarddata-4.2.1}/_directors.py +0 -0
  16. {boarddata-4.1.2 → boarddata-4.2.1}/_documents.py +0 -0
  17. {boarddata-4.1.2 → boarddata-4.2.1}/_esg.py +0 -0
  18. {boarddata-4.1.2 → boarddata-4.2.1}/_indexes.py +0 -0
  19. {boarddata-4.1.2 → boarddata-4.2.1}/_persons.py +0 -0
  20. {boarddata-4.1.2 → boarddata-4.2.1}/_sentinel.py +0 -0
  21. {boarddata-4.1.2 → boarddata-4.2.1}/_utilities.py +0 -0
  22. {boarddata-4.1.2 → boarddata-4.2.1}/boarddata.egg-info/SOURCES.txt +0 -0
  23. {boarddata-4.1.2 → boarddata-4.2.1}/boarddata.egg-info/dependency_links.txt +0 -0
  24. {boarddata-4.1.2 → boarddata-4.2.1}/boarddata.egg-info/requires.txt +0 -0
  25. {boarddata-4.1.2 → boarddata-4.2.1}/boarddata.egg-info/top_level.txt +0 -0
  26. {boarddata-4.1.2 → boarddata-4.2.1}/cache.py +0 -0
  27. {boarddata-4.1.2 → boarddata-4.2.1}/client.py +0 -0
  28. {boarddata-4.1.2 → boarddata-4.2.1}/errors.py +0 -0
  29. {boarddata-4.1.2 → boarddata-4.2.1}/py.typed +0 -0
  30. {boarddata-4.1.2 → boarddata-4.2.1}/setup.cfg +0 -0
  31. {boarddata-4.1.2 → boarddata-4.2.1}/tests/__init__.py +0 -0
  32. {boarddata-4.1.2 → boarddata-4.2.1}/tests/conftest.py +0 -0
  33. {boarddata-4.1.2 → boarddata-4.2.1}/tests/test_assemblies.py +0 -0
  34. {boarddata-4.1.2 → boarddata-4.2.1}/tests/test_auditors.py +0 -0
  35. {boarddata-4.1.2 → boarddata-4.2.1}/tests/test_base.py +0 -0
  36. {boarddata-4.1.2 → boarddata-4.2.1}/tests/test_build_payload.py +0 -0
  37. {boarddata-4.1.2 → boarddata-4.2.1}/tests/test_cache.py +0 -0
  38. {boarddata-4.1.2 → boarddata-4.2.1}/tests/test_comex.py +0 -0
  39. {boarddata-4.1.2 → boarddata-4.2.1}/tests/test_companies.py +0 -0
  40. {boarddata-4.1.2 → boarddata-4.2.1}/tests/test_config.py +0 -0
  41. {boarddata-4.1.2 → boarddata-4.2.1}/tests/test_criteria.py +0 -0
  42. {boarddata-4.1.2 → boarddata-4.2.1}/tests/test_directors.py +0 -0
  43. {boarddata-4.1.2 → boarddata-4.2.1}/tests/test_documents.py +0 -0
  44. {boarddata-4.1.2 → boarddata-4.2.1}/tests/test_esg.py +0 -0
  45. {boarddata-4.1.2 → boarddata-4.2.1}/tests/test_indexes.py +0 -0
  46. {boarddata-4.1.2 → boarddata-4.2.1}/tests/test_persons.py +0 -0
  47. {boarddata-4.1.2 → boarddata-4.2.1}/tests/test_sentinel.py +0 -0
  48. {boarddata-4.1.2 → boarddata-4.2.1}/tests/test_utilities.py +0 -0
  49. {boarddata-4.1.2 → boarddata-4.2.1}/types/__init__.py +0 -0
  50. {boarddata-4.1.2 → boarddata-4.2.1}/types/assemblies.py +0 -0
  51. {boarddata-4.1.2 → boarddata-4.2.1}/types/auditors.py +0 -0
  52. {boarddata-4.1.2 → boarddata-4.2.1}/types/comex.py +0 -0
  53. {boarddata-4.1.2 → boarddata-4.2.1}/types/criteria.py +0 -0
  54. {boarddata-4.1.2 → boarddata-4.2.1}/types/directors.py +0 -0
  55. {boarddata-4.1.2 → boarddata-4.2.1}/types/documents.py +0 -0
  56. {boarddata-4.1.2 → boarddata-4.2.1}/types/esg.py +0 -0
  57. {boarddata-4.1.2 → boarddata-4.2.1}/types/indexes.py +0 -0
  58. {boarddata-4.1.2 → boarddata-4.2.1}/types/persons.py +0 -0
  59. {boarddata-4.1.2 → boarddata-4.2.1}/types/sentinel.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: boarddata
3
- Version: 4.1.2
3
+ Version: 4.2.1
4
4
  Summary: Python SDK for the BoardData V2 REST API
5
5
  License: MIT
6
6
  Classifier: Development Status :: 4 - Beta
@@ -7,7 +7,7 @@ from .errors import BoardDataError
7
7
 
8
8
  from . import types as types # noqa: F401 — makes types accessible as boarddata.types
9
9
 
10
- __version__ = "4.1.2"
10
+ __version__ = "4.2.1"
11
11
  __all__ = [
12
12
  "Base",
13
13
  "BoardDataClient",
@@ -5,7 +5,12 @@ from __future__ import annotations
5
5
  import logging
6
6
  from typing import Any
7
7
 
8
- from .types.companies import CompanyDetail, CompanyListItem, TemporalAttributePayload
8
+ from .types.companies import (
9
+ CompanyDetail,
10
+ CompanyListItem,
11
+ CompanyResolveResult,
12
+ TemporalAttributePayload,
13
+ )
9
14
  from .types.core import AddressPayload, FieldSourcePayload, PaginatedResponse, UpsertResult
10
15
 
11
16
  logger = logging.getLogger("boarddata")
@@ -253,6 +258,44 @@ class CompanyMixin:
253
258
  results = resp.get("results", []) if isinstance(resp, dict) else resp
254
259
  return results[0] if results else None
255
260
 
261
+ def resolve_company(
262
+ self,
263
+ *,
264
+ ticker: str | None = None,
265
+ isin: str | None = None,
266
+ ) -> CompanyResolveResult | None:
267
+ """Resolve a company by ticker and/or ISIN.
268
+
269
+ Cascading resolution: DB → OpenFIGI → Perplexity.
270
+ At least one of ticker or isin is required.
271
+
272
+ Args:
273
+ ticker: Stock ticker symbol (e.g. ``"TTE"``).
274
+ isin: ISIN identifier (e.g. ``"FR0000120271"``).
275
+
276
+ Returns:
277
+ CompanyResolveResult if found, or ``None`` if not found.
278
+
279
+ Raises:
280
+ BoardDataError: On non-2xx API response (except 404).
281
+ ValueError: If neither ticker nor isin is provided.
282
+ """
283
+ if not ticker and not isin:
284
+ raise ValueError("Provide at least one of: ticker, isin")
285
+
286
+ from .errors import BoardDataError
287
+
288
+ try:
289
+ return self._get( # type: ignore[attr-defined]
290
+ "companies/resolve/",
291
+ ticker=ticker,
292
+ isin=isin,
293
+ )
294
+ except BoardDataError as exc:
295
+ if exc.status_code == 404:
296
+ return None
297
+ raise
298
+
256
299
  def upsert_company(
257
300
  self,
258
301
  isin: str,
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: boarddata
3
- Version: 4.1.2
3
+ Version: 4.2.1
4
4
  Summary: Python SDK for the BoardData V2 REST API
5
5
  License: MIT
6
6
  Classifier: Development Status :: 4 - Beta
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "boarddata"
7
- version = "4.1.2"
7
+ version = "4.2.1"
8
8
  description = "Python SDK for the BoardData V2 REST API"
9
9
  readme = "README.md"
10
10
  license = {text = "MIT"}
@@ -68,6 +68,15 @@ class UpdateCompanyPayload(TypedDict, total=False):
68
68
  field_sources: list[FieldSourcePayload]
69
69
 
70
70
 
71
+ class CompanyResolveResult(TypedDict):
72
+ id: str
73
+ name: str
74
+ isin: str
75
+ ticker: str
76
+ country: str
77
+ logo: str
78
+
79
+
71
80
  class CompanyListItem(TypedDict):
72
81
  id: str
73
82
  name: str
@@ -10,6 +10,7 @@ except ImportError:
10
10
 
11
11
  # -- Shared input types --
12
12
 
13
+
13
14
  class AddressPayload(TypedDict, total=False):
14
15
  country: str
15
16
  country_code: str
@@ -29,9 +30,11 @@ class FieldSourcePayload(TypedDict):
29
30
 
30
31
  # -- Shared response types --
31
32
 
33
+
32
34
  class PaginatedResponse(TypedDict):
33
35
  """Non-generic paginated response. results is list[Any] at the type level.
34
36
  Generic TypedDict requires Python 3.13; we target 3.12+."""
37
+
35
38
  count: int
36
39
  next: str | None
37
40
  previous: str | None
@@ -54,7 +57,8 @@ class FieldSourceItem(TypedDict):
54
57
  document_id: str | None
55
58
  document_title: str
56
59
  document_type: str
57
- document_year: int | None
60
+ document_fiscal_year: int | None
61
+ document_publication_date: str | None
58
62
  page_number: int | None
59
63
  confidence: str
60
64
  extracted_value: str
@@ -80,6 +84,7 @@ class SearchResult(TypedDict):
80
84
 
81
85
  class UpsertResult(TypedDict):
82
86
  """Standardised return type for all upsert methods."""
83
- action: str # "created" or "updated"
84
- id: str # UUID of the created/updated entity
87
+
88
+ action: str # "created" or "updated"
89
+ id: str # UUID of the created/updated entity
85
90
  data: dict[str, Any] # Full entity detail dict
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
File without changes