Publishers (pyobs.utils.publisher)
- class Publisher(vfs: VirtualFileSystem | dict[str, Any] | None = None, comm: Comm | dict[str, Any] | None = None, timezone: str | datetime.tzinfo | None = 'utc', location: str | dict[str, Any] | EarthLocation | None = None, observer: Observer | None = None, **kwargs: Any)[source]
Bases:
ObjectThis class provides a
VirtualFileSystem, a timezone and a location. From the latter two, an observer object is automatically created.Object also adds support for easily adding threads using the
add_background_task()method as well as a watchdog thread that automatically restarts threads, if requested.Using
add_child_object(), other objects can be (created an) attached to this object, which then automatically handles calls toopen()andclose()on those objects.- Parameters:
vfs – VFS to use (either object or config)
comm – Comm object to use
timezone – Timezone at observatory.
location – Location of observatory, either a name or a dict containing latitude, longitude, and elevation.
- class CsvPublisher(filename: str, **kwargs: Any)[source]
Bases:
PublisherInitialize new CSV publisher.
- Parameters:
filename – Name of file to log in.