Service-side Components

Adapters

Python Object Adapters

These Adapters don’t do any I/O, but instead wrap a structure in memory or its dask counterpart.

tiled.adapters.mapping.MapAdapter(mapping, *)

Adapt any mapping (dictionary-like object) to Tiled.

tiled.adapters.array.ArrayAdapter(array, ...)

Wrap an array-like object in an interface that Tiled can serve.

tiled.adapters.table.TableAdapter(...[, ...])

Wrap a dataframe-like object in an interface that Tiled can serve.

tiled.adapters.sparse.COOAdapter(blocks, ...)

Wrap sparse Coordinate List (COO) arrays.

tiled.adapters.xarray.DatasetAdapter.from_dataset(...)

File Adapters

tiled.adapters.csv.read_csv(data_uri[, ...])

This wraps dask.dataframe.read_csv.

tiled.adapters.excel.ExcelAdapter(mapping, *)

tiled.adapters.hdf5.HDF5Adapter(node, *[, ...])

Read an HDF5 file or a group within one.

tiled.adapters.netcdf.read_netcdf(filepath)

tiled.adapters.parquet.ParquetDatasetAdapter(...)

tiled.adapters.sparse_blocks_parquet.SparseBlocksParquetAdapter(...)

tiled.adapters.tiff.TiffAdapter(data_uri, *)

Read a TIFF file.

tiled.adapters.zarr.ZarrArrayAdapter(array, ...)

tiled.adapters.zarr.ZarrGroupAdapter(node, *)

Search Queries

Built-in Search Query Types

These are simple, JSON-serializable dataclasses that define the data in a query. They do not defined how to execute a query on a given Tree.

Note

The list of built-in queries is short. Most of the power of queries comes from registering custom queries that fit your use case and can make specific assumption about your metadata / data and its meaning.

tiled.queries.FullText(text)

Search the full text of all metadata values for word matches.

tiled.queries.KeyLookup(key)

Match a specific Entry by key.

Custom Search Query Registration

tiled.query_registration.QueryRegistry()

Keep track of all known queries types, with names.

tiled.query_registration.register([name, ...])

Register a new type of query.

Media Type (Format) Registry

This is a registry of formats that the service can write upon a client’s request.

When registering new types, make reference to the IANA Media Types (formerly known as MIME types).

tiled.media_type_registration.serialization_registry

Global serialization registry.

tiled.media_type_registration.SerializationRegistry()

Registry of media types for each structure family

tiled.media_type_registration.SerializationRegistry.register(...)

Register a new media_type for a structure family.

tiled.media_type_registration.SerializationRegistry.media_types(...)

List the supported media types for a given structure family.

tiled.media_type_registration.SerializationRegistry.aliases(...)

List the aliases (file extensions) for each media type for a given structure family.

Structures

For each data structure supported by tiled, there are dataclasses that encode its structure. These are very lightweight objects; they are used to inexpensively construct and a communicate a representation of the data’s shape and chunk/partition structure to the client so that it can formulate requests for slices of data and decode the responses.

See Structures for more context.

tiled.structures.array.ArrayStructure(...[, ...])

tiled.structures.array.BuiltinDtype(...[, ...])

tiled.structures.array.Endianness(value[, ...])

An enum of endian values: big, little, not_applicable.

tiled.structures.array.Kind(value[, names, ...])

See https://numpy.org/devdocs/reference/arrays.interface.html#object.__array_interface__

tiled.structures.core.Spec(name[, version])

tiled.structures.core.StructureFamily(value)

tiled.structures.table.TableStructure(...[, ...])

tiled.structures.sparse.COOStructure(chunks, ...)

Configuration Parsing

tiled.config.parse_configs(config_path)

Parse configuration file or directory of configuration files.

tiled.config.construct_build_app_kwargs(...)

Given parsed configuration, construct arguments for build_app(...).

HTTP Server Application

tiled.server.app.build_app(tree[, ...])

Serve a Tree

tiled.server.app.build_app_from_config(config)

Convenience function that calls build_app(...) given config as dict.

Resource Cache

tiled.adapters.resource_cache.get_resource_cache()

Return resource cache, a process-global Cache.

tiled.adapters.resource_cache.set_resource_cache(cache)

Set the resource cache, a process-global Cache.

tiled.adapters.resource_cache.default_resource_cache()

Create a new instance of the default resource cache.

tiled.adapters.resource_cache.with_resource_cache(...)

Use value from cache or, if not present, call factory(*args, **kwargs) and cache result.