Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
710 changes: 399 additions & 311 deletions reference.md

Large diffs are not rendered by default.

59 changes: 46 additions & 13 deletions src/sayari/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,13 +21,12 @@
search,
shared_errors,
shared_types,
source,
supply_chain,
trade,
traversal,
)
from .attributes import AddAttribute, AttributeProperties, AttributeResponse, AttributeResponseData, UpdateAttribute
from .auth import AuthResponse
from .auth import Audience, AuthResponse
from .base_types import CountQualifier, CustomFieldValue, PaginatedResponse, QualifiedCount
from .client import AsyncSayari, Sayari
from .entity import EntitySummaryResponse, GetEntityResponse
Expand Down Expand Up @@ -202,7 +201,6 @@
ProjectCounts,
ProjectEntitiesAggs,
ProjectEntitiesAggsDefinition,
ProjectEntitiesFilter,
ProjectEntity,
ProjectEntityUpstream,
ProjectShareOnCreate,
Expand All @@ -225,26 +223,34 @@
AttributeValues,
AttributesResponse,
BusinessPurpose,
CaseStatus,
CountType,
CreateResolvedProjectEntityRequest,
FacetBucket,
FacetsResponse,
FieldMatchQuality,
GroupedAttribute,
GroupedAttributeValue,
Location,
MatchCount,
MatchProfileEnum,
MatchStrengthEnum,
MatchedAttributes,
ProductBucket,
ProductCount,
ProductMapping,
ProjectEntitiesCustomFieldFilter,
ProjectEntitiesExactFilter,
ProjectEntitiesFilter,
ProjectEntitiesFuzzyFilter,
ProjectEntitiesResponse,
ProjectEntityExistsResponseData,
ProjectEntityIdResponse,
ProjectEntityMatchExplanation,
ProjectEntityMatchResponse,
ProjectEntityResponse,
ProjectEntityRiskSummaryData,
ProjectEntityRiskSummaryFilters,
ProjectEntityRiskSummaryNetworkPath,
ProjectEntityRiskSummaryResponse,
ProjectEntityRiskSummaryResponseFilters,
ProjectEntityRiskSummaryRiskFactor,
ProjectEntitySupplyChainSummaryResponse,
ProjectEntitySupplyChainSummaryResponseData,
ProjectEntitySupplyChainUpstream,
Expand All @@ -254,6 +260,7 @@
ResolutionProfile,
RiskCategoriesSummary,
SaveProjectEntityBody,
ShareInformation,
SingleProjectEntityResponse,
SourceField,
SpecialFacetBucket,
Expand All @@ -268,6 +275,12 @@
UpstreamInfo,
)
from .project_entity_attributes import (
CreateProjectEntityAttributeRequest,
CreateProjectEntityAttributeResponse,
CreateProjectEntityAttributeResponseData,
ProjectEntityAttribute,
ProjectEntityAttributeValue,
ProjectEntityAttributesResponse,
UpdateProjectEntityAttributeRequest,
UpdateProjectEntityAttributeResponse,
UpdateProjectEntityAttributeResponseData,
Expand Down Expand Up @@ -327,8 +340,11 @@
RateLimitResponse,
Unauthorized,
UnauthorizedResponse,
UnprocessableContent,
UnprocessableContentResponse,
)
from .shared_types import (
CaseStatus,
ClientName,
CompanyType,
Coordinate,
Expand All @@ -343,6 +359,8 @@
EntitySummary,
EntityTranslatedLabel,
Identifier,
MatchCount,
MatchStrengthEnum,
PossiblySameAs,
PossiblySameAsData,
PossiblySameAsMatch,
Expand All @@ -365,7 +383,6 @@
SourceCountInfo,
Status,
)
from .source import GetSourceResponse, ListSourcesResponse, Source
from .supply_chain import (
TradeTraversalComponent,
TradeTraversalData,
Expand Down Expand Up @@ -427,6 +444,7 @@
"AttributeValues",
"Attributes",
"AttributesResponse",
"Audience",
"AuthResponse",
"BadGateway",
"BadGatewayResponse",
Expand Down Expand Up @@ -463,6 +481,9 @@
"CountryData",
"CountryInfo",
"CountryProperties",
"CreateProjectEntityAttributeRequest",
"CreateProjectEntityAttributeResponse",
"CreateProjectEntityAttributeResponseData",
"CreateProjectEntitySupplyChainSnapshotRequest",
"CreateProjectEntitySupplyChainSnapshotResponse",
"CreateProjectRequest",
Expand Down Expand Up @@ -493,6 +514,7 @@
"EventInfo",
"FacetBucket",
"FacetsResponse",
"FieldMatchQuality",
"FilterList",
"FinanceType",
"FinancesData",
Expand Down Expand Up @@ -528,7 +550,6 @@
"GetProjectEntitiesResponse",
"GetProjectsResponse",
"GetRecordResponse",
"GetSourceResponse",
"GroupedAttribute",
"GroupedAttributeValue",
"HistoryInfo",
Expand All @@ -544,15 +565,13 @@
"InternalServerError",
"InternalServerErrorResponse",
"Language",
"ListSourcesResponse",
"Location",
"MatchCount",
"MatchExplanation",
"MatchProfileEnum",
"MatchQuality",
"MatchStrength",
"MatchStrengthEnum",
"MatchedAttributes",
"MeasurementData",
"MeasurementInfo",
"MeasurementProperties",
Expand Down Expand Up @@ -625,13 +644,26 @@
"ProjectCounts",
"ProjectEntitiesAggs",
"ProjectEntitiesAggsDefinition",
"ProjectEntitiesCustomFieldFilter",
"ProjectEntitiesExactFilter",
"ProjectEntitiesFilter",
"ProjectEntitiesFuzzyFilter",
"ProjectEntitiesResponse",
"ProjectEntity",
"ProjectEntityAttribute",
"ProjectEntityAttributeValue",
"ProjectEntityAttributesResponse",
"ProjectEntityExistsResponseData",
"ProjectEntityIdResponse",
"ProjectEntityMatchExplanation",
"ProjectEntityMatchResponse",
"ProjectEntityResponse",
"ProjectEntityRiskSummaryData",
"ProjectEntityRiskSummaryFilters",
"ProjectEntityRiskSummaryNetworkPath",
"ProjectEntityRiskSummaryResponse",
"ProjectEntityRiskSummaryResponseFilters",
"ProjectEntityRiskSummaryRiskFactor",
"ProjectEntitySupplyChainSnapshotByIdResponse",
"ProjectEntitySupplyChainSnapshotData",
"ProjectEntitySupplyChainSnapshotDetailData",
Expand Down Expand Up @@ -699,6 +731,7 @@
"SayariEnvironment",
"SearchField",
"SearchResults",
"ShareInformation",
"SharesData",
"SharesInfo",
"SharesProperties",
Expand All @@ -714,7 +747,6 @@
"ShortestPathResponse",
"SingleProjectEntityResponse",
"SortField",
"Source",
"SourceCountInfo",
"SourceField",
"SourceId",
Expand Down Expand Up @@ -760,6 +792,8 @@
"Unauthorized",
"UnauthorizedResponse",
"Unit",
"UnprocessableContent",
"UnprocessableContentResponse",
"UpdateAttribute",
"UpdateEntityTagsResponse",
"UpdateProjectEntityAttributeRequest",
Expand Down Expand Up @@ -799,7 +833,6 @@
"search",
"shared_errors",
"shared_types",
"source",
"supply_chain",
"trade",
"traversal",
Expand Down
4 changes: 2 additions & 2 deletions src/sayari/auth/__init__.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# This file was auto-generated by Fern from our API Definition.

from .types import AuthResponse
from .types import Audience, AuthResponse

__all__ = ["AuthResponse"]
__all__ = ["Audience", "AuthResponse"]
3 changes: 2 additions & 1 deletion src/sayari/auth/types/__init__.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# This file was auto-generated by Fern from our API Definition.

from .audience import Audience
from .auth_response import AuthResponse

__all__ = ["AuthResponse"]
__all__ = ["Audience", "AuthResponse"]
5 changes: 5 additions & 0 deletions src/sayari/auth/types/audience.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# This file was auto-generated by Fern from our API Definition.

import typing

Audience = typing.Union[typing.Literal["sayari.com", "uk.sayari.com"], typing.Any]
4 changes: 0 additions & 4 deletions src/sayari/base_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@
from .resolution.client import ResolutionClient
from .resource.client import ResourceClient
from .search.client import SearchClient
from .source.client import SourceClient
from .supply_chain.client import SupplyChainClient
from .trade.client import TradeClient
from .traversal.client import TraversalClient
Expand All @@ -42,7 +41,6 @@
from .resolution.client import AsyncResolutionClient
from .resource.client import AsyncResourceClient
from .search.client import AsyncSearchClient
from .source.client import AsyncSourceClient
from .supply_chain.client import AsyncSupplyChainClient
from .trade.client import AsyncTradeClient
from .traversal.client import AsyncTraversalClient
Expand Down Expand Up @@ -140,7 +138,6 @@ def __init__(
self.resolution = ResolutionClient(client_wrapper=self._client_wrapper)
self.resource = ResourceClient(client_wrapper=self._client_wrapper)
self.search = SearchClient(client_wrapper=self._client_wrapper)
self.source = SourceClient(client_wrapper=self._client_wrapper)
self.supply_chain = SupplyChainClient(client_wrapper=self._client_wrapper)
self.trade = TradeClient(client_wrapper=self._client_wrapper)
self.traversal = TraversalClient(client_wrapper=self._client_wrapper)
Expand Down Expand Up @@ -238,7 +235,6 @@ def __init__(
self.resolution = AsyncResolutionClient(client_wrapper=self._client_wrapper)
self.resource = AsyncResourceClient(client_wrapper=self._client_wrapper)
self.search = AsyncSearchClient(client_wrapper=self._client_wrapper)
self.source = AsyncSourceClient(client_wrapper=self._client_wrapper)
self.supply_chain = AsyncSupplyChainClient(client_wrapper=self._client_wrapper)
self.trade = AsyncTradeClient(client_wrapper=self._client_wrapper)
self.traversal = AsyncTraversalClient(client_wrapper=self._client_wrapper)
Expand Down
5 changes: 5 additions & 0 deletions src/sayari/environment.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,8 @@ class SayariEnvironment(enum.Enum):
"""
Sayari development - utilized for internal testing before promotion to production
"""

PRODUCTION_UK = "https://api.uk.sayari.com"
"""
Sayari production - UK environment
"""
8 changes: 4 additions & 4 deletions src/sayari/negative_news/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ def negative_news(
Risk category filter for targeted screening. Each topic represents a distinct risk domain (e.g., `environmental` for environmental violations, `financial` for financial misconduct).

until : typing.Optional[dt.date]
Date cutoff for article inclusion in `YYYY-MM-DD` format. If provided, only articles published before this date will be included in results.
Date cutoff for article inclusion in `YYYY-MM-DD` format. If provided, only articles published after this date will be included in results.

request_options : typing.Optional[RequestOptions]
Request-specific configuration.
Expand All @@ -70,7 +70,7 @@ def negative_news(
)
client.negative_news.negative_news(
name="Gazprom",
topic="sanctions",
topic="sanctions_and_regulatory",
until=datetime.date.fromisoformat(
"2024-10-01",
),
Expand Down Expand Up @@ -178,7 +178,7 @@ async def negative_news(
Risk category filter for targeted screening. Each topic represents a distinct risk domain (e.g., `environmental` for environmental violations, `financial` for financial misconduct).

until : typing.Optional[dt.date]
Date cutoff for article inclusion in `YYYY-MM-DD` format. If provided, only articles published before this date will be included in results.
Date cutoff for article inclusion in `YYYY-MM-DD` format. If provided, only articles published after this date will be included in results.

request_options : typing.Optional[RequestOptions]
Request-specific configuration.
Expand All @@ -203,7 +203,7 @@ async def negative_news(
async def main() -> None:
await client.negative_news.negative_news(
name="Gazprom",
topic="sanctions",
topic="sanctions_and_regulatory",
until=datetime.date.fromisoformat(
"2024-10-01",
),
Expand Down
11 changes: 4 additions & 7 deletions src/sayari/negative_news/types/topics.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,20 +4,17 @@

Topics = typing.Union[
typing.Literal[
"basic",
"environmental",
"social",
"overview",
"environmental_and_social",
"cybersecurity",
"disruption",
"criminal",
"reputational",
"financial",
"regulatory",
"sanctions_and_regulatory",
"legal",
"misconduct",
"political",
"terrorism",
"sanctions",
"all",
],
typing.Any,
]
2 changes: 0 additions & 2 deletions src/sayari/project/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
ProjectCounts,
ProjectEntitiesAggs,
ProjectEntitiesAggsDefinition,
ProjectEntitiesFilter,
ProjectEntity,
ProjectEntityUpstream,
ProjectShareOnCreate,
Expand Down Expand Up @@ -45,7 +44,6 @@
"ProjectCounts",
"ProjectEntitiesAggs",
"ProjectEntitiesAggsDefinition",
"ProjectEntitiesFilter",
"ProjectEntity",
"ProjectEntityUpstream",
"ProjectShareOnCreate",
Expand Down
2 changes: 0 additions & 2 deletions src/sayari/project/types/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
from .project_counts import ProjectCounts
from .project_entities_aggs import ProjectEntitiesAggs
from .project_entities_aggs_definition import ProjectEntitiesAggsDefinition
from .project_entities_filter import ProjectEntitiesFilter
from .project_entity import ProjectEntity
from .project_entity_upstream import ProjectEntityUpstream
from .project_share_on_create import ProjectShareOnCreate
Expand Down Expand Up @@ -43,7 +42,6 @@
"ProjectCounts",
"ProjectEntitiesAggs",
"ProjectEntitiesAggsDefinition",
"ProjectEntitiesFilter",
"ProjectEntity",
"ProjectEntityUpstream",
"ProjectShareOnCreate",
Expand Down
Loading