WriterProtocol#

class movement.io.save.WriterProtocol(*args, **kwargs)[source]#

Bases: Protocol

Protocol for writer functions to be registered via register_writer.

All writer functions registered via register_writer() must conform to this protocol. Writers must accept a movement dataset and a file path, and save the dataset directly to disk. Additional positional and keyword arguments are allowed.

See also

register_writer

Decorator for registering writer functions.

__call__(ds, file, *args, **kwargs)[source]#

Save a movement dataset to a file.

Parameters:
  • ds (Dataset) – The movement dataset to save.

  • file (str | Path) – Path to the file to save the dataset to.

  • *args – Additional positional arguments for the writer.

  • **kwargs – Additional keyword arguments for the writer.

Return type:

None