API Reference

wwt_data_formats Package

Functions

indent_xml(elem[, level])

A dumb XML indenter.

stringify_xml_doc(root_element[, indent])

Stringify some XML elements, indenting them by default.

write_xml_doc(root_element[, indent, …])

Write out some XML elements, indenting them by default

Classes

LockedDownTraits(**kwargs)

A base class for HasTraits objects where we do not allow callers to add additional attributes to class instances.

LockedXmlTraits(**kwargs)

A base class for LockedDownTraits objects that can also be serialized to and from XML.

MetaLockedDownTraits(name, bases, namespace, …)

A metaclass to help with the LockedDownTraits class.

XmlSer(value)

Ways that a traitlet can get serialized to XML in this framework.

wwt_data_formats.abcs Module

Some abstract base classes (ABCs).

Classes

UrlContainer()

A data object that may contain URLs.

wwt_data_formats.cli Module

Entrypoint for the “wwtdatatool” command-line interface.

Functions

cabinet_getparser(parser)

cabinet_impl(settings)

cabinet_list(settings)

cabinet_pack(settings)

cabinet_unpack(settings)

die(msg)

entrypoint([args])

The entrypoint for the “wwtdatatool” command-line interface.

fetch_tree_getparser(parser)

fetch_tree_impl(settings)

print_tree_image_urls_getparser(parser)

print_tree_image_urls_impl(settings)

serve_getparser(parser)

serve_impl(settings)

summarize_tree_getparser(parser)

summarize_tree_impl(settings)

warn(msg)

wtml_getparser(parser)

wtml_impl(settings)

wtml_rewrite_urls(settings)

wwt_data_formats.enums Module

Various enumerations

Classes

Bandpass(value)

An enumeration.

Classification(value)

An enumeration.

Constellation(value)

An enumeration.

DataSetType(value)

An enumeration.

FolderType(value)

An enumeration.

ProjectionType(value)

An enumeration.

SerEnum(value)

A helper for enumerations that are serialized and deserialized from text.

wwt_data_formats.filecabinet Module

Classes

FileCabinetReader(stream)

Reader for a simple container format for other files.

FileCabinetWriter()

Writer for a simple container format for other files.

wwt_data_formats.folder Module

Functions

fetch_folder_tree(root_url, root_cache_path)

make_absolutizing_url_mutator(baseurl)

Return a function that makes relative URLs absolute.

walk_cached_folder_tree(root_cache_path)

Classes

Folder(**kwargs)

A grouping of WWT content assets.

wwt_data_formats.imageset Module

An image, possibly tiled, for display in WWT.

Classes

ImageSet(**kwargs)

A set of images.

wwt_data_formats.layers Module

Serialized information about graphical “layers” in the WWT engine.

Not implemented:

  • GreatCircleRouteLayer

  • GroundOverlayLayer

  • KmlLayer

  • Object3d

  • OrbitLayer

  • SpreadSheetLayer

  • TimeSeriesLayer

  • VoTableLayer

  • WmsLayer

Classes

ImageSetLayer(**kwargs)

Layer(**kwargs)

Generic parent class for serializable WWT layers.

LayerContainerReader(stream)

A collection of layers and reference frames.

LayerContainerXml(**kwargs)

The XML serialization of the layer collection information.

wwt_data_formats.place Module

A place that a WWT user can visit.

Classes

Place(**kwargs)

A place that can be visited.

wwt_data_formats.server Module

A basic HTTP server for local testing of WTML files and other WWT data products.

The key motivation for the existence of this server is that WWT WTML “collection” files must contain absolute URLs. This means that if you’re locally testing a file, you need to include one set of (localhost) URLs, while the production file must be different. Keeping these in sync is tedious and error-prone.

This server is basically a generic local static-file server. But, if specially-marked WTML files are requested, any relative URLs are rewritten on-the-fly to be absolute relative to the server’s address. That way, you can do all of your development with the relative-URL files, and you only need to do one substitution at the very end when the files are ready for upload to the production server. (You can do this with wwtdatatool wtml rewrite-urls.)

Functions

run_server(settings)

Settings are defined in wwt_data_formats.cli.serve_getparser().