poprox_concepts.api.tracking#

Functions

from_hashed_base64(raw, key, model)

to_hashed_base64(data, key)

Classes

LoginLinkData(*, account_id[, newsletter_id])

The endpoint and data should use the values that would be passed to url_for in flask.

SignUpToken(*, email, source, created_at)

TrackingLinkData(*, newsletter_id, ...)

class poprox_concepts.api.tracking.TrackingLinkData(*, newsletter_id, account_id, url, article_id)#

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), 'article_id': FieldInfo(annotation=UUID, required=True), 'newsletter_id': FieldInfo(annotation=UUID, 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.api.tracking.LoginLinkData(*, account_id, newsletter_id=None, endpoint, data)#

Bases: BaseModel

The endpoint and data should use the values that would be passed to url_for in flask. In general this would be the name of the endpoint (i.e. python function name)

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), 'data': FieldInfo(annotation=dict, required=True), 'endpoint': FieldInfo(annotation=str, required=True), 'newsletter_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.api.tracking.SignUpToken(*, email, source, created_at)#

Bases: BaseModel

Parameters:
  • email (str)

  • source (str)

  • created_at (AwareDatetime)

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]] = {'created_at': FieldInfo(annotation=AwareDatetime, required=True), 'email': FieldInfo(annotation=str, 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.