poprox_concepts.domain.article#
Classes
|
|
|
|
|
|
|
|
|
- class poprox_concepts.domain.article.Entity(*, entity_id=None, external_id=None, name, entity_type, source, raw_data=None)#
Bases:
BaseModel
- Parameters:
- model_computed_fields: ClassVar[dict[str, ComputedFieldInfo]] = {}#
A dictionary of computed field names and their corresponding ComputedFieldInfo objects.
- model_config: ClassVar[ConfigDict] = {}#
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- model_fields: ClassVar[dict[str, FieldInfo]] = {'entity_id': FieldInfo(annotation=Union[UUID, NoneType], required=False, default=None), 'entity_type': FieldInfo(annotation=str, required=True), 'external_id': FieldInfo(annotation=Union[str, NoneType], required=False, default=None), 'name': FieldInfo(annotation=str, required=True), 'raw_data': FieldInfo(annotation=Union[dict[str, Any], NoneType], required=False, default=None), 'source': FieldInfo(annotation=str, required=True)}#
Metadata about the fields defined on the model, mapping of field names to [FieldInfo][pydantic.fields.FieldInfo].
This replaces Model.__fields__ from Pydantic V1.
- class poprox_concepts.domain.article.Mention(*, article_id=None, mention_id=None, source, relevance, entity)#
Bases:
BaseModel
- Parameters:
- model_computed_fields: ClassVar[dict[str, ComputedFieldInfo]] = {}#
A dictionary of computed field names and their corresponding ComputedFieldInfo objects.
- model_config: ClassVar[ConfigDict] = {}#
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- model_fields: ClassVar[dict[str, FieldInfo]] = {'article_id': FieldInfo(annotation=Union[UUID, NoneType], required=False, default=None), 'entity': FieldInfo(annotation=Entity, required=True), 'mention_id': FieldInfo(annotation=Union[UUID, NoneType], required=False, default=None), 'relevance': FieldInfo(annotation=float, required=True), 'source': FieldInfo(annotation=str, required=True)}#
Metadata about the fields defined on the model, mapping of field names to [FieldInfo][pydantic.fields.FieldInfo].
This replaces Model.__fields__ from Pydantic V1.
- class poprox_concepts.domain.article.Article(*, article_id=None, headline, subhead=None, url=None, preview_image_id=None, published_at=datetime.datetime(1970, 1, 1, 0, 0, tzinfo=datetime.timezone.utc), mentions=[], source=None, external_id=None, raw_data=None)#
Bases:
BaseModel
- Parameters:
- model_computed_fields: ClassVar[dict[str, ComputedFieldInfo]] = {}#
A dictionary of computed field names and their corresponding ComputedFieldInfo objects.
- model_config: ClassVar[ConfigDict] = {}#
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- model_fields: ClassVar[dict[str, FieldInfo]] = {'article_id': FieldInfo(annotation=UUID, required=False, default_factory=uuid4), 'external_id': FieldInfo(annotation=Union[str, NoneType], required=False, default=None), 'headline': FieldInfo(annotation=str, required=True), 'mentions': FieldInfo(annotation=list[Mention], required=False, default=[]), 'preview_image_id': FieldInfo(annotation=Union[UUID, NoneType], required=False, default=None), 'published_at': FieldInfo(annotation=datetime, required=False, default=datetime.datetime(1970, 1, 1, 0, 0, tzinfo=datetime.timezone.utc)), 'raw_data': FieldInfo(annotation=Union[dict[str, Any], NoneType], required=False, default=None), 'source': FieldInfo(annotation=Union[str, NoneType], required=False, default=None), 'subhead': FieldInfo(annotation=Union[str, NoneType], required=False, default=None), 'url': FieldInfo(annotation=Union[str, NoneType], required=False, default=None)}#
Metadata about the fields defined on the model, mapping of field names to [FieldInfo][pydantic.fields.FieldInfo].
This replaces Model.__fields__ from Pydantic V1.
- class poprox_concepts.domain.article.ArticleSet(*, articles, **extra_data)#
Bases:
BaseModel
- model_config: ClassVar[ConfigDict] = {'extra': 'allow'}#
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class poprox_concepts.domain.article.ArticlePlacement(*, article_id=None, url=None, section=None, level=None, image_url=None, created_at=datetime.datetime(2024, 10, 16, 10, 56, 4, 564165, tzinfo=datetime.timezone.utc))#
Bases:
BaseModel
- Parameters:
- model_computed_fields: ClassVar[dict[str, ComputedFieldInfo]] = {}#
A dictionary of computed field names and their corresponding ComputedFieldInfo objects.
- model_config: ClassVar[ConfigDict] = {}#
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- model_fields: ClassVar[dict[str, FieldInfo]] = {'article_id': FieldInfo(annotation=UUID, required=False, default_factory=uuid4), 'created_at': FieldInfo(annotation=datetime, required=False, default=datetime.datetime(2024, 10, 16, 10, 56, 4, 564165, tzinfo=datetime.timezone.utc)), 'image_url': FieldInfo(annotation=Union[str, NoneType], required=False, default=None), 'level': FieldInfo(annotation=Union[str, NoneType], required=False, default=None), 'section': FieldInfo(annotation=Union[str, NoneType], required=False, default=None), 'url': FieldInfo(annotation=Union[str, NoneType], required=False, default=None)}#
Metadata about the fields defined on the model, mapping of field names to [FieldInfo][pydantic.fields.FieldInfo].
This replaces Model.__fields__ from Pydantic V1.