Skip to content

Base element

Bases: BaseModel, Bindable

Represents the base of the main OSM elements, and contains all the fields that are common to nodes, ways, and relations.

Attributes:

Name Type Description
id int

The ID of the element

version int

The version of the element

timestamp datetime

The date and time this version of the element was created (UTC)

changeset int

The ID of the changeset that made this version of the element

user str | None

The display name of the user that made this version of the element. Might be missing on older elements.

uid int | None

The ID of the user that made this version of the element. Might be missing on older elements.

tags dict[str, str]

Dictionary of string to strings representing the tags attached to the element.

See Also
  • Node: One of the base element types, representing a single point
  • Way: One of the base element types, represeting a collection of nodes
  • Relation One of the base element type, representing a collection of nodes, ways, and relations

fetch_changeset()

Fetches the changeset related to this element

Returns:

Type Description
Changeset

The changeset that made this version of the object

fetch_user()

Fetches the user related to this element

Returns:

Type Description
User

The user that made this version of the object