transport_data.util.ckan.Package

class transport_data.util.ckan.Package(data: dict | None = None, **kwargs)[source]

Bases: ModelProxy

Proxy for ckan.model.Package.

__init__(data: dict | None = None, **kwargs) None

Methods

__init__([data])

asdict()

Return the original dictionary of object data.

from_file(path)

Construct a new instance from a file path.

get(name)

Return the value of a single field.

get_item(name[, index])

Get a member of a collection.

update(data)

Update part or all of the object data.

Attributes

id

Object 'id'.

name

Object 'name'.

asdict() dict

Return the original dictionary of object data.

classmethod from_file(path: pathlib.Path) T

Construct a new instance from a file path.

get(name: str)

Return the value of a single field.

get_item(name: str, index: int | None = None)

Get a member of a collection.

id: str | None = None

Object ‘id’. In the CKAN data model, this is often a uuid of some sort.

name: str | None = None

Object ‘name’. In the CKAN data model, this is often a snake-case string like “name-of-data-set”.

update(data: dict) None

Update part or all of the object data.