Entity

class Entity(*args, **kwargs)[source]

Bases: Value

Abstract base class for entities.

template_class

alias of EntityTemplate

variable_class

alias of EntityVariable

classmethod check(arg: Any, function: Callable[[...], Any] | str | None = None, name: str | None = None, position: int | None = None) Self[source]

Coerces arg into an instance of this class.

If arg cannot be coerced, raises an error.

Parameters:
  • arg – Value.

  • function – Function or function name.

  • name – Argument name.

  • position – Argument position.

Returns:

Object.

property iri: IRI

The iri of entity.

get_iri() IRI[source]

Gets the iri of entity.

Returns:

IRI.

class EntityTemplate(*args, **kwargs)[source]

Bases: ValueTemplate

Abstract base class for entity templates.

object_class

alias of Entity

property iri: IRI_Template | IRI_Variable | IRI

The iri of entity template.

get_iri() IRI_Template | IRI_Variable | IRI[source]

Gets the iri of entity template.

Returns:

IRI, IRI template, or IRI variable.

class EntityVariable(name: str, variable_class: type[Variable] | type[Term] | None = None)[source]

Bases: ValueVariable

Entity variable.

Parameters:

name – Name.

object_class

alias of Entity