boarddata 4.1.3__tar.gz → 4.2.2__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.
- {boarddata-4.1.3 → boarddata-4.2.2}/PKG-INFO +1 -1
- {boarddata-4.1.3 → boarddata-4.2.2}/__init__.py +1 -1
- {boarddata-4.1.3 → boarddata-4.2.2}/_companies.py +48 -1
- {boarddata-4.1.3 → boarddata-4.2.2}/boarddata.egg-info/PKG-INFO +1 -1
- {boarddata-4.1.3 → boarddata-4.2.2}/pyproject.toml +1 -1
- {boarddata-4.1.3 → boarddata-4.2.2}/types/companies.py +9 -0
- {boarddata-4.1.3 → boarddata-4.2.2}/CLAUDE.md +0 -0
- {boarddata-4.1.3 → boarddata-4.2.2}/README.md +0 -0
- {boarddata-4.1.3 → boarddata-4.2.2}/_assemblies.py +0 -0
- {boarddata-4.1.3 → boarddata-4.2.2}/_auditors.py +0 -0
- {boarddata-4.1.3 → boarddata-4.2.2}/_base.py +0 -0
- {boarddata-4.1.3 → boarddata-4.2.2}/_comex.py +0 -0
- {boarddata-4.1.3 → boarddata-4.2.2}/_criteria.py +0 -0
- {boarddata-4.1.3 → boarddata-4.2.2}/_directors.py +0 -0
- {boarddata-4.1.3 → boarddata-4.2.2}/_documents.py +0 -0
- {boarddata-4.1.3 → boarddata-4.2.2}/_esg.py +0 -0
- {boarddata-4.1.3 → boarddata-4.2.2}/_indexes.py +0 -0
- {boarddata-4.1.3 → boarddata-4.2.2}/_persons.py +0 -0
- {boarddata-4.1.3 → boarddata-4.2.2}/_sentinel.py +0 -0
- {boarddata-4.1.3 → boarddata-4.2.2}/_utilities.py +0 -0
- {boarddata-4.1.3 → boarddata-4.2.2}/boarddata.egg-info/SOURCES.txt +0 -0
- {boarddata-4.1.3 → boarddata-4.2.2}/boarddata.egg-info/dependency_links.txt +0 -0
- {boarddata-4.1.3 → boarddata-4.2.2}/boarddata.egg-info/requires.txt +0 -0
- {boarddata-4.1.3 → boarddata-4.2.2}/boarddata.egg-info/top_level.txt +0 -0
- {boarddata-4.1.3 → boarddata-4.2.2}/cache.py +0 -0
- {boarddata-4.1.3 → boarddata-4.2.2}/client.py +0 -0
- {boarddata-4.1.3 → boarddata-4.2.2}/errors.py +0 -0
- {boarddata-4.1.3 → boarddata-4.2.2}/py.typed +0 -0
- {boarddata-4.1.3 → boarddata-4.2.2}/setup.cfg +0 -0
- {boarddata-4.1.3 → boarddata-4.2.2}/tests/__init__.py +0 -0
- {boarddata-4.1.3 → boarddata-4.2.2}/tests/conftest.py +0 -0
- {boarddata-4.1.3 → boarddata-4.2.2}/tests/test_assemblies.py +0 -0
- {boarddata-4.1.3 → boarddata-4.2.2}/tests/test_auditors.py +0 -0
- {boarddata-4.1.3 → boarddata-4.2.2}/tests/test_base.py +0 -0
- {boarddata-4.1.3 → boarddata-4.2.2}/tests/test_build_payload.py +0 -0
- {boarddata-4.1.3 → boarddata-4.2.2}/tests/test_cache.py +0 -0
- {boarddata-4.1.3 → boarddata-4.2.2}/tests/test_comex.py +0 -0
- {boarddata-4.1.3 → boarddata-4.2.2}/tests/test_companies.py +0 -0
- {boarddata-4.1.3 → boarddata-4.2.2}/tests/test_config.py +0 -0
- {boarddata-4.1.3 → boarddata-4.2.2}/tests/test_criteria.py +0 -0
- {boarddata-4.1.3 → boarddata-4.2.2}/tests/test_directors.py +0 -0
- {boarddata-4.1.3 → boarddata-4.2.2}/tests/test_documents.py +0 -0
- {boarddata-4.1.3 → boarddata-4.2.2}/tests/test_esg.py +0 -0
- {boarddata-4.1.3 → boarddata-4.2.2}/tests/test_indexes.py +0 -0
- {boarddata-4.1.3 → boarddata-4.2.2}/tests/test_persons.py +0 -0
- {boarddata-4.1.3 → boarddata-4.2.2}/tests/test_sentinel.py +0 -0
- {boarddata-4.1.3 → boarddata-4.2.2}/tests/test_utilities.py +0 -0
- {boarddata-4.1.3 → boarddata-4.2.2}/types/__init__.py +0 -0
- {boarddata-4.1.3 → boarddata-4.2.2}/types/assemblies.py +0 -0
- {boarddata-4.1.3 → boarddata-4.2.2}/types/auditors.py +0 -0
- {boarddata-4.1.3 → boarddata-4.2.2}/types/comex.py +0 -0
- {boarddata-4.1.3 → boarddata-4.2.2}/types/core.py +0 -0
- {boarddata-4.1.3 → boarddata-4.2.2}/types/criteria.py +0 -0
- {boarddata-4.1.3 → boarddata-4.2.2}/types/directors.py +0 -0
- {boarddata-4.1.3 → boarddata-4.2.2}/types/documents.py +0 -0
- {boarddata-4.1.3 → boarddata-4.2.2}/types/esg.py +0 -0
- {boarddata-4.1.3 → boarddata-4.2.2}/types/indexes.py +0 -0
- {boarddata-4.1.3 → boarddata-4.2.2}/types/persons.py +0 -0
- {boarddata-4.1.3 → boarddata-4.2.2}/types/sentinel.py +0 -0
|
@@ -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
|
|
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,48 @@ 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
|
+
exchange: str | None = None,
|
|
267
|
+
) -> CompanyResolveResult | None:
|
|
268
|
+
"""Resolve a company by ticker and/or ISIN.
|
|
269
|
+
|
|
270
|
+
Cascading resolution: DB → OpenFIGI → Perplexity.
|
|
271
|
+
At least one of ticker or isin is required.
|
|
272
|
+
|
|
273
|
+
Args:
|
|
274
|
+
ticker: Stock ticker symbol (e.g. ``"TTE"``).
|
|
275
|
+
isin: ISIN identifier (e.g. ``"FR0000120271"``).
|
|
276
|
+
exchange: Optional OpenFIGI exchange code (e.g. ``"FP"`` for
|
|
277
|
+
Euronext Paris) to disambiguate short tickers.
|
|
278
|
+
|
|
279
|
+
Returns:
|
|
280
|
+
CompanyResolveResult if found, or ``None`` if not found.
|
|
281
|
+
|
|
282
|
+
Raises:
|
|
283
|
+
BoardDataError: On non-2xx API response (except 404).
|
|
284
|
+
ValueError: If neither ticker nor isin is provided.
|
|
285
|
+
"""
|
|
286
|
+
if not ticker and not isin:
|
|
287
|
+
raise ValueError("Provide at least one of: ticker, isin")
|
|
288
|
+
|
|
289
|
+
from .errors import BoardDataError
|
|
290
|
+
|
|
291
|
+
try:
|
|
292
|
+
return self._get( # type: ignore[attr-defined]
|
|
293
|
+
"companies/resolve/",
|
|
294
|
+
ticker=ticker,
|
|
295
|
+
isin=isin,
|
|
296
|
+
exchange=exchange,
|
|
297
|
+
)
|
|
298
|
+
except BoardDataError as exc:
|
|
299
|
+
if exc.status_code == 404:
|
|
300
|
+
return None
|
|
301
|
+
raise
|
|
302
|
+
|
|
256
303
|
def upsert_company(
|
|
257
304
|
self,
|
|
258
305
|
isin: str,
|
|
@@ -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
|
|
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
|
|
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
|