tiled.client.sparse.SparseClient

class tiled.client.sparse.SparseClient(context, *, item, structure_clients, structure=None, include_data_sources=False)[source]
__init__(context, *, item, structure_clients, structure=None, include_data_sources=False)

Methods

__init__(context, *, item, structure_clients)

asset_manifest(data_sources)

Return a manifest of the relative paths of the contents in each asset.

build_metadata_patches([metadata, specs])

Build valid JSON Patches (RFC6902) for metadata and metadata validation specs accepted by patch_metadata.

data_sources()

delete_tree()

export(filepath, *[, format, slice])

Download data in some format and write to a file.

include_data_sources()

Ensure that data source and asset information is fetched.

login([username, provider])

Depending on the server's authentication method, this will prompt for username/password:

logout()

Log out.

metadata_copy()

Generate a mutable copy of metadata and specs for validating metadata (useful with update_metadata())

new_variation([structure_clients, ...])

This is intended primarily for internal use and use by subclasses.

patch_metadata([metadata_patch, ...])

EXPERIMENTAL: Patch metadata using a JSON Patch (RFC6902).

raw_export([destination_directory, max_workers])

Download the raw assets backing this node.

read([slice])

read_block(block[, slice])

refresh()

replace_metadata([metadata, specs])

EXPERIMENTAL: Replace metadata entirely (see update_metadata).

structure()

Return a dataclass describing the structure of the data.

todense(*args, **kwargs)

Return a dense numpy array.

update_metadata([metadata, specs])

EXPERIMENTAL: Update metadata via a dict.update- like interface.

write(coords, data)

write_block(coords, data, block)

Attributes

URL_CHARACTER_LIMIT

chunks

context

dims

formats

List formats that the server can export this data as.

item

JSON payload describing this item.

metadata

Metadata about this data source.

metadata_revisions

ndim

shape

specs

List of specifications describing the structure of the metadata and/or data.

structure_family

Quick access to this entry

uri

Direct link to this entry