pokelance.models.common.resources ⚓︎

NamedResource ⚓︎

Bases: BaseModel

Model for a named resource object

Attributes:
  • name (str) –

    The name of the referenced resource.

  • url (str) –

    The URL of the referenced resource.

to_dict() ⚓︎

Convert the model to a dict

Returns:
  • Dict[str, Any]

    The model as a dict.

Source code in pokelance/models/_base.py
Python
def to_dict(self) -> t.Dict[str, t.Any]:
    """Convert the model to a dict

    Returns
    -------
    typing.Dict[str, Any]
        The model as a dict.
    """
    return attrs.asdict(self)

Resource ⚓︎

Bases: BaseModel

Model for a resource object

Attributes:
  • url (str) –

    The URL of the referenced resource.

to_dict() ⚓︎

Convert the model to a dict

Returns:
  • Dict[str, Any]

    The model as a dict.

Source code in pokelance/models/_base.py
Python
def to_dict(self) -> t.Dict[str, t.Any]:
    """Convert the model to a dict

    Returns
    -------
    typing.Dict[str, Any]
        The model as a dict.
    """
    return attrs.asdict(self)