poprox_concepts.domain#

class poprox_concepts.domain.Account(*, account_id=None, email, status, source=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]] = {'account_id': FieldInfo(annotation=UUID, required=False, default=None), 'email': FieldInfo(annotation=str, required=True), 'source': FieldInfo(annotation=Union[str, NoneType], required=False, default=None), 'status': 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.AccountInterest(*, account_id=None, entity_id, entity_name, preference, frequency)#

Bases: BaseModel

Parameters:
  • account_id (UUID)

  • entity_id (UUID)

  • entity_name (str)

  • preference (int | None)

  • frequency (int | None)

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]] = {'account_id': FieldInfo(annotation=UUID, required=False, default=None), 'entity_id': FieldInfo(annotation=UUID, required=True), 'entity_name': FieldInfo(annotation=str, required=True), 'frequency': FieldInfo(annotation=Union[int, NoneType], required=True), 'preference': FieldInfo(annotation=Union[int, NoneType], 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_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.ArticleSet(*, articles, **extra_data)#

Bases: BaseModel

Parameters:
model_config: ClassVar[ConfigDict] = {'extra': 'allow'}#

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

model_computed_fields: ClassVar[dict[str, ComputedFieldInfo]] = {}#

A dictionary of computed field names and their corresponding ComputedFieldInfo objects.

model_fields: ClassVar[dict[str, FieldInfo]] = {'articles': FieldInfo(annotation=list[Article], 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.Click(*, article_id, newsletter_id=None, timestamp=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=True), 'newsletter_id': FieldInfo(annotation=Union[UUID, NoneType], required=False, default=None), 'timestamp': FieldInfo(annotation=Union[datetime, 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.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.Image(*, image_id=None, url, source, external_id=None, raw_data)#

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]] = {'external_id': FieldInfo(annotation=Union[str, NoneType], required=False, default=None), 'image_id': FieldInfo(annotation=Union[UUID, NoneType], required=False, default=None), 'raw_data': FieldInfo(annotation=Union[dict[str, Any], NoneType], required=True), 'source': FieldInfo(annotation=str, required=True), 'url': 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.InterestProfile(*, profile_id=None, click_history, click_topic_counts=None, click_locality_counts=None, onboarding_topics, **extra_data)#

Bases: BaseModel

Parameters:
model_config: ClassVar[ConfigDict] = {'extra': 'allow'}#

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

model_computed_fields: ClassVar[dict[str, ComputedFieldInfo]] = {}#

A dictionary of computed field names and their corresponding ComputedFieldInfo objects.

model_fields: ClassVar[dict[str, FieldInfo]] = {'click_history': FieldInfo(annotation=list[Click], required=True), 'click_locality_counts': FieldInfo(annotation=Union[dict[str, int], NoneType], required=False, default=None), 'click_topic_counts': FieldInfo(annotation=Union[dict[str, int], NoneType], required=False, default=None), 'onboarding_topics': FieldInfo(annotation=list[AccountInterest], required=True), 'profile_id': FieldInfo(annotation=Union[UUID, 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.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.Newsletter(*, newsletter_id=None, account_id, treatment_id=None, articles, subject, body_html, created_at=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]] = {'account_id': FieldInfo(annotation=UUID, required=True), 'articles': FieldInfo(annotation=list[Article], required=True), 'body_html': FieldInfo(annotation=str, required=True), 'created_at': FieldInfo(annotation=Union[datetime, NoneType], required=False, default=None), 'newsletter_id': FieldInfo(annotation=UUID, required=False, default_factory=uuid4), 'subject': FieldInfo(annotation=str, required=True), 'treatment_id': FieldInfo(annotation=Union[UUID, 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.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:
  • article_id (UUID)

  • url (str | None)

  • section (str | None)

  • level (str | None)

  • image_url (str | None)

  • created_at (datetime)

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.

class poprox_concepts.domain.Demographics(*, demographic_id=None, account_id, gender, birth_year, zip5, education, race)#

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]] = {'account_id': FieldInfo(annotation=UUID, required=True), 'birth_year': FieldInfo(annotation=int, required=True), 'demographic_id': FieldInfo(annotation=UUID, required=False, default=None), 'education': FieldInfo(annotation=str, required=True), 'gender': FieldInfo(annotation=str, required=True), 'race': FieldInfo(annotation=str, required=True), 'zip5': 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.

Modules