Module redvox.cloud.metadata_api
This module contains classes and enums for working with generic RedVox packet metadata through the cloud API.
Expand source code
"""
This module contains classes and enums for working with generic RedVox packet metadata through the cloud API.
"""
from dataclasses import dataclass
import json
from typing import Callable, Dict, List, Optional, TypeVar, Tuple
from dataclasses_json import dataclass_json
import requests
from redvox.api1000.wrapped_redvox_packet.wrapped_packet import WrappedRedvoxPacketM
from redvox.cloud.api import post_req
from redvox.cloud.config import RedVoxConfig
from redvox.cloud.routes import RoutesV1, RoutesV2
@dataclass_json
@dataclass
class AudioMetadata:
"""
Metadata associated with audio sensors.
"""
sensor_name: Optional[str] = None
sample_rate: Optional[float] = None
first_sample_ts: Optional[int] = None
payload_cnt: Optional[int] = None
payload_mean: Optional[float] = None
payload_std: Optional[float] = None
payload_median: Optional[float] = None
@dataclass_json
@dataclass
class SingleMetadata:
"""
Metadata associated with sensors that only contain a single dimensional channel of data
(barometer, light, proximity).
"""
sensor_name: Optional[str] = None
timestamps_microseconds_utc_count: Optional[int] = None
payload_count: Optional[int] = None
sample_interval_mean: Optional[float] = None
sample_interval_std: Optional[float] = None
sample_interval_median: Optional[float] = None
value_mean: Optional[float] = None
value_std: Optional[float] = None
value_median: Optional[float] = None
metadata: Optional[List[str]] = None
@dataclass_json
@dataclass
class XyzMetadata:
"""
Metadata for sensors that have 3-dimensions of data (accelerometer, gyroscope, magenetometer)
"""
sensor_name: Optional[str] = None
timestamps_microseconds_utc_count: Optional[int] = None
payload_count: Optional[int] = None
sample_interval_mean: Optional[float] = None
sample_interval_std: Optional[float] = None
sample_interval_median: Optional[float] = None
x_mean: Optional[float] = None
x_std: Optional[float] = None
x_median: Optional[float] = None
y_mean: Optional[float] = None
y_std: Optional[float] = None
y_median: Optional[float] = None
z_mean: Optional[float] = None
z_std: Optional[float] = None
z_median: Optional[float] = None
metadata: Optional[List[str]] = None
@dataclass_json
@dataclass
class LocationMetadata:
"""
Metadata associated with the location sensor.
"""
sensor_name: Optional[str] = None
timestamps_microseconds_utc_count: Optional[int] = None
payload_count: Optional[int] = None
sample_interval_mean: Optional[float] = None
sample_interval_std: Optional[float] = None
sample_interval_median: Optional[float] = None
latitude_mean: Optional[float] = None
latitude_std: Optional[float] = None
latitude_median: Optional[float] = None
longitude_mean: Optional[float] = None
longitude_std: Optional[float] = None
longitude_median: Optional[float] = None
altitude_mean: Optional[float] = None
altitude_std: Optional[float] = None
altitude_median: Optional[float] = None
speed_mean: Optional[float] = None
speed_std: Optional[float] = None
speed_median: Optional[float] = None
accuracy_mean: Optional[float] = None
accuracy_std: Optional[float] = None
accuracy_median: Optional[float] = None
metadata: Optional[List[str]] = None
@dataclass_json
@dataclass
class PacketMetadataResult:
"""
Metadata associated with RedVox API 900 packets.
"""
api: Optional[int] = None
station_id: Optional[str] = None
station_uuid: Optional[str] = None
auth_email: Optional[str] = None
is_backfilled: Optional[bool] = None
is_private: Optional[bool] = None
is_scrambled: Optional[bool] = None
station_make: Optional[str] = None
station_model: Optional[str] = None
station_os: Optional[str] = None
station_os_version: Optional[str] = None
station_app_version: Optional[str] = None
battery_level: Optional[float] = None
station_temperature: Optional[float] = None
acquisition_url: Optional[str] = None
synch_url: Optional[str] = None
auth_url: Optional[str] = None
os_ts: Optional[int] = None
mach_ts: Optional[int] = None
server_ts: Optional[int] = None
data_key: Optional[str] = None
mach_time_zero: Optional[float] = None
best_latency: Optional[float] = None
best_offset: Optional[float] = None
audio_sensor: Optional[AudioMetadata] = None
barometer_sensor: Optional[SingleMetadata] = None
location_sensor: Optional[LocationMetadata] = None
time_synchronization_sensor: Optional[SingleMetadata] = None
accelerometer_sensor: Optional[XyzMetadata] = None
magnetometer_sensor: Optional[XyzMetadata] = None
gyroscope_sensor: Optional[XyzMetadata] = None
light_sensor: Optional[SingleMetadata] = None
proximity_sensor: Optional[SingleMetadata] = None
@dataclass_json
@dataclass
# pylint: disable=C0103
class AvailableMetadata:
"""
Contains definitions for all available metadata that an be requested from the cloud api.
"""
Api: str = "Api"
StationId: str = "StationId"
StationUuid: str = "StationUuid"
AuthEmail: str = "AuthEmail"
IsBackfilled: str = "IsBackfilled"
IsPrivate: str = "IsPrivate"
IsScrambled: str = "IsScrambled"
StationMake: str = "StationMake"
StationModel: str = "StationModel"
StationOs: str = "StationOs"
StationOsVersion: str = "StationOsVersion"
StationAppVersion: str = "StationAppVersion"
BatteryLevel: str = "BatteryLevel"
StationTemperature: str = "StationTemperature"
AcquisitionUrl: str = "AcquisitionUrl"
SynchUrl: str = "SynchUrl"
AuthUrl: str = "AuthUrl"
OsTs: str = "OsTs"
MachTs: str = "MachTs"
ServerTs: str = "ServerTs"
DataKey: str = "DataKey"
MachTimeZero: str = "MachTimeZero"
BestLatency: str = "BestLatency"
BestOffset: str = "BestOffset"
AudioSensor: str = "AudioSensor"
BarometerSensor: str = "BarometerSensor"
AccelerometerSensor: str = "AccelerometerSensor"
GyroscopeSensor: str = "GyroscopeSensor"
TimeSynchronizationSensor: str = "TimeSynchronizationSensor"
MagnetometerSensor: str = "MagnetometerSensor"
LightSensor: str = "LightSensor"
ProximitySensor: str = "ProximitySensor"
LocationSensor: str = "LocationSensor"
@staticmethod
def all_available_metadata() -> List[str]:
"""
Returns a list of all available metadata definitions.
:return: A list of all available metadata definitions.
"""
return [
AvailableMetadata.Api,
AvailableMetadata.StationId,
AvailableMetadata.StationUuid,
AvailableMetadata.AuthEmail,
AvailableMetadata.IsBackfilled,
AvailableMetadata.IsPrivate,
AvailableMetadata.IsScrambled,
AvailableMetadata.StationMake,
AvailableMetadata.StationModel,
AvailableMetadata.StationOs,
AvailableMetadata.StationOsVersion,
AvailableMetadata.StationAppVersion,
AvailableMetadata.BatteryLevel,
AvailableMetadata.StationTemperature,
AvailableMetadata.AcquisitionUrl,
AvailableMetadata.SynchUrl,
AvailableMetadata.AuthUrl,
AvailableMetadata.OsTs,
AvailableMetadata.MachTs,
AvailableMetadata.ServerTs,
AvailableMetadata.DataKey,
AvailableMetadata.MachTimeZero,
AvailableMetadata.BestLatency,
AvailableMetadata.BestOffset,
AvailableMetadata.AudioSensor,
AvailableMetadata.BarometerSensor,
AvailableMetadata.AccelerometerSensor,
AvailableMetadata.GyroscopeSensor,
AvailableMetadata.TimeSynchronizationSensor,
AvailableMetadata.MagnetometerSensor,
AvailableMetadata.LightSensor,
AvailableMetadata.ProximitySensor,
AvailableMetadata.LocationSensor,
]
@dataclass_json
@dataclass
class MetadataReq:
"""
The definition of a metadata request. Fields should include the definitions defined by AvailableMetadata.
"""
auth_token: str
start_ts_s: int
end_ts_s: int
station_ids: List[str]
fields: List[str]
secret_token: Optional[str] = None
@dataclass_json
@dataclass
class MetadataResp:
"""
Response of a metadata request.
"""
metadata: List[PacketMetadataResult]
@dataclass_json
@dataclass
class StationStatusReq:
secret_token: Optional[str]
auth_token: str
start_ts_s: float
end_ts_s: float
station_ids: List[str]
@dataclass_json
@dataclass
class StationStatus:
# API status
api: str
sub_api: Optional[str]
# Recording status
recording_state: str
# Timing status
app_start_timestamp: float
timestamp: float
synch_enabled: bool
synch_latency: Optional[float]
# Authentication status
station_id: str
station_uuid: str
authenticated_user: Optional[str]
private: bool
# Audio status
sampling_rate: float
bit_depth: Optional[float]
sensor_name: str
samples_per_packet: int
# Additional sensor status
additional_sensors: List[Tuple[str, str]]
# Movement status
movement_detected: Optional[bool]
# Location status
location_provider: Optional[str]
latitude: Optional[float]
longitude: Optional[float]
altitude: Optional[float]
speed: Optional[float]
# Station info
make: str
model: str
os: str
os_version: str
client_version: str
settings: Optional[Dict]
# Station metrics
network_type: Optional[str]
power_state: Optional[str]
screen_state: Optional[str]
cell_service_state: Optional[str]
battery: Optional[float]
temperature: Optional[float]
network_strength: Optional[float]
diffs: Optional[List[Dict]]
@dataclass_json
@dataclass
class DataAvailability:
station_id: str
station_uuid: str
start: int
end: int
total_packets: int
expected_packets: int
@dataclass_json
@dataclass
class StationStatusResp:
station_statuses: List[StationStatus]
data_availabilities: List[DataAvailability]
# pylint: disable=C0103
T = TypeVar("T")
def _get(key: str, json_dict: Dict, default: Optional[T] = None) -> Optional[T]:
if key in json_dict:
return json_dict[key]
return default
@dataclass
class AdditionalMetadata:
"""
Representation of additional metadata from database.
"""
data_key: Optional[str]
@staticmethod
def from_dict(json_dict: Optional[Dict]) -> Optional["AdditionalMetadata"]:
"""
Converts JSON into additional metadata.
:param json_dict: JSON to convert.
:return: Optional additional metadata instance.
"""
if json_dict is None:
return None
return AdditionalMetadata(_get("data_key", json_dict))
@dataclass
class DbPacket:
"""
Representation of a packet loaded from the database.
"""
_id: Optional[str]
metadata: Optional[WrappedRedvoxPacketM]
additional_metadata: Optional[AdditionalMetadata]
@staticmethod
def from_dict(json_dict: Dict) -> "DbPacket":
"""
Converts JSON to a DbPacket object.
:param json_dict: JSON to convert.
:return: An instance of a DbPacket.
"""
return DbPacket(
_get("_id", json_dict),
WrappedRedvoxPacketM.from_json(json.dumps(json_dict["metadata"])),
AdditionalMetadata.from_dict(_get("additional_metadata", json_dict)),
)
@dataclass
class MetadataRespM:
"""
A metadata response for API M.
"""
db_packets: List[DbPacket]
@staticmethod
def from_json(json_dicts: Dict) -> "MetadataRespM":
"""
Converts a JSON dictionary into a response.
:param json_dicts: Dictionary to use for conversion.
:return: The converted response.
"""
return MetadataRespM(list(map(DbPacket.from_dict, json_dicts["db_packets"])))
@dataclass_json
@dataclass
class TimingMetaRequest:
"""
Request for timing metadata.
"""
auth_token: str
start_ts_s: int
end_ts_s: int
station_ids: List[str]
secret_token: Optional[str] = None
@dataclass_json
@dataclass
class TimingMeta:
"""
Timing metadata extracted from an individual packet.
"""
station_id: str
start_ts_os: float
start_ts_mach: float
server_ts: float
mach_time_zero: float
best_latency: float
best_offset: float
@dataclass_json
@dataclass
class TimingMetaResponse:
"""
Response of obtaining timing metadta.
"""
items: List[TimingMeta]
def request_timing_metadata(
redvox_config: RedVoxConfig,
timing_req: TimingMetaRequest,
session: Optional[requests.Session] = None,
timeout: Optional[float] = None,
) -> TimingMetaResponse:
"""
Retrieve timing metadata.
:param redvox_config: An instance of the API configuration.
:param timing_req: An instance of a timing request.
:param session: An (optional) session for re-using an HTTP client.
:param timeout: An (optional) timeout.
:return: An instance of a timing response.
"""
def handle_resp(resp) -> TimingMetaResponse:
json_content: List[Dict] = resp.json()
# noinspection Mypy
# pylint: disable=E1101
items: List[TimingMeta] = list(map(TimingMeta.from_dict, json_content))
return TimingMetaResponse(items)
res: Optional[TimingMetaResponse] = post_req(
redvox_config,
RoutesV1.TIMING_METADATA_REQ,
timing_req,
handle_resp,
session,
timeout,
)
return res if res else TimingMetaResponse([])
def request_metadata(
redvox_config: RedVoxConfig,
packet_metadata_req: MetadataReq,
session: Optional[requests.Session] = None,
timeout: Optional[float] = None,
) -> Optional[MetadataResp]:
"""
Requests generic metadata from the cloud API.
:param redvox_config: An instance of the API config.
:param packet_metadata_req: An instance of a metadata request.
:param session: An (optional) session for re-using an HTTP client.
:param timeout: An (optional) timeout.
:return: A metadata response on successful call or None if there is an error.
"""
# noinspection Mypy
# pylint: disable=E1101
handle_resp: Callable[
[requests.Response], MetadataResp
] = lambda resp: MetadataResp.from_dict(resp.json())
return post_req(
redvox_config,
RoutesV1.METADATA_REQ,
packet_metadata_req,
handle_resp,
session,
timeout,
)
def request_metadata_m(
redvox_config: RedVoxConfig,
packet_metadata_req: MetadataReq,
session: Optional[requests.Session] = None,
timeout: Optional[float] = None,
) -> Optional[MetadataRespM]:
"""
Requests generic metadata from the cloud API.
:param redvox_config: An instance of the API config.
:param packet_metadata_req: An instance of a metadata request.
:param session: An (optional) session for re-using an HTTP client.
:param timeout: An (optional) timeout.
:return: A metadata response on successful call or None if there is an error.
"""
# noinspection Mypy
handle_resp: Callable[
[requests.Response], MetadataRespM
] = lambda resp: MetadataRespM.from_json(resp.json())
return post_req(
redvox_config,
RoutesV1.METADATA_REQ_M,
packet_metadata_req,
handle_resp,
session,
timeout,
)
def request_station_statuses(
redvox_config: RedVoxConfig,
station_status_req: StationStatusReq,
session: Optional[requests.Session] = None,
timeout: Optional[float] = None,
) -> Optional[StationStatusResp]:
# noinspection Mypy
handle_resp: Callable[
[requests.Response], StationStatusResp
] = lambda resp: StationStatusResp.from_dict(resp.json())
return post_req(
redvox_config,
RoutesV1.STATION_STATUS_TIMELINE,
station_status_req,
handle_resp,
session,
timeout,
)
@dataclass_json
@dataclass
class LatLng:
"""
Represents a latitude and longitude as decimal degrees.
"""
lat: float
lng: float
@dataclass_json
@dataclass
class BoundingBox:
"""
Defines a bounding box given the South West and North East
coordinates.
"""
sw_lat_lng: LatLng
ne_lat_lng: LatLng
@dataclass_json
@dataclass
class BoundingCircle:
"""
Defines a bounding circle from a given center coordinate and a
radius in meters.
"""
center: LatLng
radius: float
@dataclass_json
@dataclass
class GeoMetadataReq:
"""
A geo metadata request. Note that bounding_box and bounding_circle
are mutually exclusive.
"""
auth_token: str
start_ts_s: int
end_ts_s: int
bounding_box: Optional[BoundingBox]
bounding_circle: Optional[BoundingCircle]
fields: List[str]
@dataclass
class GeoMetadataResp:
"""
A geo metadata response for API M.
"""
err: Optional[str]
db_packets: Optional[List[DbPacket]]
@staticmethod
def from_json(json_dict: Dict) -> "GeoMetadataResp":
"""
Converts a JSON dictionary into a response.
:param json_dict: Dictionary to use for conversion.
:return: The converted response.
"""
db_packets: Optional[List[DbPacket]] = None
if "db_packets" in json_dict:
packets: Optional[List[Dict]] = json_dict["db_packets"]
if packets is not None and len(packets) > 0:
db_packets = list(map(DbPacket.from_dict, packets))
return GeoMetadataResp(err=_get("err", json_dict), db_packets=db_packets)
def request_geo_metadata(
redvox_config: RedVoxConfig,
geo_metadata_req: GeoMetadataReq,
session: Optional[requests.Session] = None,
timeout: Optional[float] = None,
) -> Optional[GeoMetadataResp]:
"""
Requests generic metadata from the cloud API using geo bounds.
:param redvox_config: An instance of the API config.
:param geo_metadata_req: An instance of a geo metadata request.
:param session: An (optional) session for re-using an HTTP client.
:param timeout: An (optional) timeout.
:return: A geo metadata response on successful call or None if there is an error.
"""
# noinspection Mypy
handle_resp: Callable[
[requests.Response], GeoMetadataResp
] = lambda resp: GeoMetadataResp.from_json(resp.json())
return post_req(
redvox_config,
RoutesV2.GEO_METADATA_REQ,
geo_metadata_req,
handle_resp,
session,
timeout,
)
Functions
def request_geo_metadata(redvox_config: RedVoxConfig, geo_metadata_req: GeoMetadataReq, session: Optional[requests.sessions.Session] = None, timeout: Optional[float] = None) ‑> Optional[GeoMetadataResp]
-
Requests generic metadata from the cloud API using geo bounds. :param redvox_config: An instance of the API config. :param geo_metadata_req: An instance of a geo metadata request. :param session: An (optional) session for re-using an HTTP client. :param timeout: An (optional) timeout. :return: A geo metadata response on successful call or None if there is an error.
Expand source code
def request_geo_metadata( redvox_config: RedVoxConfig, geo_metadata_req: GeoMetadataReq, session: Optional[requests.Session] = None, timeout: Optional[float] = None, ) -> Optional[GeoMetadataResp]: """ Requests generic metadata from the cloud API using geo bounds. :param redvox_config: An instance of the API config. :param geo_metadata_req: An instance of a geo metadata request. :param session: An (optional) session for re-using an HTTP client. :param timeout: An (optional) timeout. :return: A geo metadata response on successful call or None if there is an error. """ # noinspection Mypy handle_resp: Callable[ [requests.Response], GeoMetadataResp ] = lambda resp: GeoMetadataResp.from_json(resp.json()) return post_req( redvox_config, RoutesV2.GEO_METADATA_REQ, geo_metadata_req, handle_resp, session, timeout, )
def request_metadata(redvox_config: RedVoxConfig, packet_metadata_req: MetadataReq, session: Optional[requests.sessions.Session] = None, timeout: Optional[float] = None) ‑> Optional[MetadataResp]
-
Requests generic metadata from the cloud API. :param redvox_config: An instance of the API config. :param packet_metadata_req: An instance of a metadata request. :param session: An (optional) session for re-using an HTTP client. :param timeout: An (optional) timeout. :return: A metadata response on successful call or None if there is an error.
Expand source code
def request_metadata( redvox_config: RedVoxConfig, packet_metadata_req: MetadataReq, session: Optional[requests.Session] = None, timeout: Optional[float] = None, ) -> Optional[MetadataResp]: """ Requests generic metadata from the cloud API. :param redvox_config: An instance of the API config. :param packet_metadata_req: An instance of a metadata request. :param session: An (optional) session for re-using an HTTP client. :param timeout: An (optional) timeout. :return: A metadata response on successful call or None if there is an error. """ # noinspection Mypy # pylint: disable=E1101 handle_resp: Callable[ [requests.Response], MetadataResp ] = lambda resp: MetadataResp.from_dict(resp.json()) return post_req( redvox_config, RoutesV1.METADATA_REQ, packet_metadata_req, handle_resp, session, timeout, )
def request_metadata_m(redvox_config: RedVoxConfig, packet_metadata_req: MetadataReq, session: Optional[requests.sessions.Session] = None, timeout: Optional[float] = None) ‑> Optional[MetadataRespM]
-
Requests generic metadata from the cloud API. :param redvox_config: An instance of the API config. :param packet_metadata_req: An instance of a metadata request. :param session: An (optional) session for re-using an HTTP client. :param timeout: An (optional) timeout. :return: A metadata response on successful call or None if there is an error.
Expand source code
def request_metadata_m( redvox_config: RedVoxConfig, packet_metadata_req: MetadataReq, session: Optional[requests.Session] = None, timeout: Optional[float] = None, ) -> Optional[MetadataRespM]: """ Requests generic metadata from the cloud API. :param redvox_config: An instance of the API config. :param packet_metadata_req: An instance of a metadata request. :param session: An (optional) session for re-using an HTTP client. :param timeout: An (optional) timeout. :return: A metadata response on successful call or None if there is an error. """ # noinspection Mypy handle_resp: Callable[ [requests.Response], MetadataRespM ] = lambda resp: MetadataRespM.from_json(resp.json()) return post_req( redvox_config, RoutesV1.METADATA_REQ_M, packet_metadata_req, handle_resp, session, timeout, )
def request_station_statuses(redvox_config: RedVoxConfig, station_status_req: StationStatusReq, session: Optional[requests.sessions.Session] = None, timeout: Optional[float] = None) ‑> Optional[StationStatusResp]
-
Expand source code
def request_station_statuses( redvox_config: RedVoxConfig, station_status_req: StationStatusReq, session: Optional[requests.Session] = None, timeout: Optional[float] = None, ) -> Optional[StationStatusResp]: # noinspection Mypy handle_resp: Callable[ [requests.Response], StationStatusResp ] = lambda resp: StationStatusResp.from_dict(resp.json()) return post_req( redvox_config, RoutesV1.STATION_STATUS_TIMELINE, station_status_req, handle_resp, session, timeout, )
def request_timing_metadata(redvox_config: RedVoxConfig, timing_req: TimingMetaRequest, session: Optional[requests.sessions.Session] = None, timeout: Optional[float] = None) ‑> TimingMetaResponse
-
Retrieve timing metadata. :param redvox_config: An instance of the API configuration. :param timing_req: An instance of a timing request. :param session: An (optional) session for re-using an HTTP client. :param timeout: An (optional) timeout. :return: An instance of a timing response.
Expand source code
def request_timing_metadata( redvox_config: RedVoxConfig, timing_req: TimingMetaRequest, session: Optional[requests.Session] = None, timeout: Optional[float] = None, ) -> TimingMetaResponse: """ Retrieve timing metadata. :param redvox_config: An instance of the API configuration. :param timing_req: An instance of a timing request. :param session: An (optional) session for re-using an HTTP client. :param timeout: An (optional) timeout. :return: An instance of a timing response. """ def handle_resp(resp) -> TimingMetaResponse: json_content: List[Dict] = resp.json() # noinspection Mypy # pylint: disable=E1101 items: List[TimingMeta] = list(map(TimingMeta.from_dict, json_content)) return TimingMetaResponse(items) res: Optional[TimingMetaResponse] = post_req( redvox_config, RoutesV1.TIMING_METADATA_REQ, timing_req, handle_resp, session, timeout, ) return res if res else TimingMetaResponse([])
Classes
class AdditionalMetadata (data_key: Optional[str])
-
Representation of additional metadata from database.
Expand source code
@dataclass class AdditionalMetadata: """ Representation of additional metadata from database. """ data_key: Optional[str] @staticmethod def from_dict(json_dict: Optional[Dict]) -> Optional["AdditionalMetadata"]: """ Converts JSON into additional metadata. :param json_dict: JSON to convert. :return: Optional additional metadata instance. """ if json_dict is None: return None return AdditionalMetadata(_get("data_key", json_dict))
Class variables
var data_key : Optional[str]
Static methods
def from_dict(json_dict: Optional[Dict]) ‑> Optional[AdditionalMetadata]
-
Converts JSON into additional metadata. :param json_dict: JSON to convert. :return: Optional additional metadata instance.
Expand source code
@staticmethod def from_dict(json_dict: Optional[Dict]) -> Optional["AdditionalMetadata"]: """ Converts JSON into additional metadata. :param json_dict: JSON to convert. :return: Optional additional metadata instance. """ if json_dict is None: return None return AdditionalMetadata(_get("data_key", json_dict))
class AudioMetadata (sensor_name: Optional[str] = None, sample_rate: Optional[float] = None, first_sample_ts: Optional[int] = None, payload_cnt: Optional[int] = None, payload_mean: Optional[float] = None, payload_std: Optional[float] = None, payload_median: Optional[float] = None)
-
Metadata associated with audio sensors.
Expand source code
@dataclass_json @dataclass class AudioMetadata: """ Metadata associated with audio sensors. """ sensor_name: Optional[str] = None sample_rate: Optional[float] = None first_sample_ts: Optional[int] = None payload_cnt: Optional[int] = None payload_mean: Optional[float] = None payload_std: Optional[float] = None payload_median: Optional[float] = None
Class variables
var first_sample_ts : Optional[int]
var payload_cnt : Optional[int]
var payload_mean : Optional[float]
var payload_median : Optional[float]
var payload_std : Optional[float]
var sample_rate : Optional[float]
var sensor_name : Optional[str]
Static methods
def from_dict(kvs: Union[dict, list, str, int, float, bool, ForwardRef(None)], *, infer_missing=False) ‑> ~A
-
Expand source code
@classmethod def from_dict(cls: Type[A], kvs: Json, *, infer_missing=False) -> A: return _decode_dataclass(cls, kvs, infer_missing)
def from_json(s: Union[str, bytes, bytearray], *, parse_float=None, parse_int=None, parse_constant=None, infer_missing=False, **kw) ‑> ~A
-
Expand source code
@classmethod def from_json(cls: Type[A], s: JsonData, *, parse_float=None, parse_int=None, parse_constant=None, infer_missing=False, **kw) -> A: kvs = json.loads(s, parse_float=parse_float, parse_int=parse_int, parse_constant=parse_constant, **kw) return cls.from_dict(kvs, infer_missing=infer_missing)
def schema(*, infer_missing: bool = False, only=None, exclude=(), many: bool = False, context=None, load_only=(), dump_only=(), partial: bool = False, unknown=None) ‑> dataclasses_json.mm.SchemaF[~A]
-
Expand source code
@classmethod def schema(cls: Type[A], *, infer_missing: bool = False, only=None, exclude=(), many: bool = False, context=None, load_only=(), dump_only=(), partial: bool = False, unknown=None) -> SchemaType: Schema = build_schema(cls, DataClassJsonMixin, infer_missing, partial) if unknown is None: undefined_parameter_action = _undefined_parameter_action_safe(cls) if undefined_parameter_action is not None: # We can just make use of the same-named mm keywords unknown = undefined_parameter_action.name.lower() return Schema(only=only, exclude=exclude, many=many, context=context, load_only=load_only, dump_only=dump_only, partial=partial, unknown=unknown)
Methods
def to_dict(self, encode_json=False) ‑> Dict[str, Union[dict, list, str, int, float, bool, ForwardRef(None)]]
-
Expand source code
def to_dict(self, encode_json=False) -> Dict[str, Json]: return _asdict(self, encode_json=encode_json)
def to_json(self, *, skipkeys: bool = False, ensure_ascii: bool = True, check_circular: bool = True, allow_nan: bool = True, indent: Union[int, str, ForwardRef(None)] = None, separators: Tuple[str, str] = None, default: Callable = None, sort_keys: bool = False, **kw) ‑> str
-
Expand source code
def to_json(self, *, skipkeys: bool = False, ensure_ascii: bool = True, check_circular: bool = True, allow_nan: bool = True, indent: Optional[Union[int, str]] = None, separators: Tuple[str, str] = None, default: Callable = None, sort_keys: bool = False, **kw) -> str: return json.dumps(self.to_dict(encode_json=False), cls=_ExtendedEncoder, skipkeys=skipkeys, ensure_ascii=ensure_ascii, check_circular=check_circular, allow_nan=allow_nan, indent=indent, separators=separators, default=default, sort_keys=sort_keys, **kw)
class AvailableMetadata (Api: str = 'Api', StationId: str = 'StationId', StationUuid: str = 'StationUuid', AuthEmail: str = 'AuthEmail', IsBackfilled: str = 'IsBackfilled', IsPrivate: str = 'IsPrivate', IsScrambled: str = 'IsScrambled', StationMake: str = 'StationMake', StationModel: str = 'StationModel', StationOs: str = 'StationOs', StationOsVersion: str = 'StationOsVersion', StationAppVersion: str = 'StationAppVersion', BatteryLevel: str = 'BatteryLevel', StationTemperature: str = 'StationTemperature', AcquisitionUrl: str = 'AcquisitionUrl', SynchUrl: str = 'SynchUrl', AuthUrl: str = 'AuthUrl', OsTs: str = 'OsTs', MachTs: str = 'MachTs', ServerTs: str = 'ServerTs', DataKey: str = 'DataKey', MachTimeZero: str = 'MachTimeZero', BestLatency: str = 'BestLatency', BestOffset: str = 'BestOffset', AudioSensor: str = 'AudioSensor', BarometerSensor: str = 'BarometerSensor', AccelerometerSensor: str = 'AccelerometerSensor', GyroscopeSensor: str = 'GyroscopeSensor', TimeSynchronizationSensor: str = 'TimeSynchronizationSensor', MagnetometerSensor: str = 'MagnetometerSensor', LightSensor: str = 'LightSensor', ProximitySensor: str = 'ProximitySensor', LocationSensor: str = 'LocationSensor')
-
Contains definitions for all available metadata that an be requested from the cloud api.
Expand source code
@dataclass_json @dataclass # pylint: disable=C0103 class AvailableMetadata: """ Contains definitions for all available metadata that an be requested from the cloud api. """ Api: str = "Api" StationId: str = "StationId" StationUuid: str = "StationUuid" AuthEmail: str = "AuthEmail" IsBackfilled: str = "IsBackfilled" IsPrivate: str = "IsPrivate" IsScrambled: str = "IsScrambled" StationMake: str = "StationMake" StationModel: str = "StationModel" StationOs: str = "StationOs" StationOsVersion: str = "StationOsVersion" StationAppVersion: str = "StationAppVersion" BatteryLevel: str = "BatteryLevel" StationTemperature: str = "StationTemperature" AcquisitionUrl: str = "AcquisitionUrl" SynchUrl: str = "SynchUrl" AuthUrl: str = "AuthUrl" OsTs: str = "OsTs" MachTs: str = "MachTs" ServerTs: str = "ServerTs" DataKey: str = "DataKey" MachTimeZero: str = "MachTimeZero" BestLatency: str = "BestLatency" BestOffset: str = "BestOffset" AudioSensor: str = "AudioSensor" BarometerSensor: str = "BarometerSensor" AccelerometerSensor: str = "AccelerometerSensor" GyroscopeSensor: str = "GyroscopeSensor" TimeSynchronizationSensor: str = "TimeSynchronizationSensor" MagnetometerSensor: str = "MagnetometerSensor" LightSensor: str = "LightSensor" ProximitySensor: str = "ProximitySensor" LocationSensor: str = "LocationSensor" @staticmethod def all_available_metadata() -> List[str]: """ Returns a list of all available metadata definitions. :return: A list of all available metadata definitions. """ return [ AvailableMetadata.Api, AvailableMetadata.StationId, AvailableMetadata.StationUuid, AvailableMetadata.AuthEmail, AvailableMetadata.IsBackfilled, AvailableMetadata.IsPrivate, AvailableMetadata.IsScrambled, AvailableMetadata.StationMake, AvailableMetadata.StationModel, AvailableMetadata.StationOs, AvailableMetadata.StationOsVersion, AvailableMetadata.StationAppVersion, AvailableMetadata.BatteryLevel, AvailableMetadata.StationTemperature, AvailableMetadata.AcquisitionUrl, AvailableMetadata.SynchUrl, AvailableMetadata.AuthUrl, AvailableMetadata.OsTs, AvailableMetadata.MachTs, AvailableMetadata.ServerTs, AvailableMetadata.DataKey, AvailableMetadata.MachTimeZero, AvailableMetadata.BestLatency, AvailableMetadata.BestOffset, AvailableMetadata.AudioSensor, AvailableMetadata.BarometerSensor, AvailableMetadata.AccelerometerSensor, AvailableMetadata.GyroscopeSensor, AvailableMetadata.TimeSynchronizationSensor, AvailableMetadata.MagnetometerSensor, AvailableMetadata.LightSensor, AvailableMetadata.ProximitySensor, AvailableMetadata.LocationSensor, ]
Class variables
var AccelerometerSensor : str
var AcquisitionUrl : str
var Api : str
var AudioSensor : str
var AuthEmail : str
var AuthUrl : str
var BarometerSensor : str
var BatteryLevel : str
var BestLatency : str
var BestOffset : str
var DataKey : str
var GyroscopeSensor : str
var IsBackfilled : str
var IsPrivate : str
var IsScrambled : str
var LightSensor : str
var LocationSensor : str
var MachTimeZero : str
var MachTs : str
var MagnetometerSensor : str
var OsTs : str
var ProximitySensor : str
var ServerTs : str
var StationAppVersion : str
var StationId : str
var StationMake : str
var StationModel : str
var StationOs : str
var StationOsVersion : str
var StationTemperature : str
var StationUuid : str
var SynchUrl : str
var TimeSynchronizationSensor : str
Static methods
def all_available_metadata() ‑> List[str]
-
Returns a list of all available metadata definitions. :return: A list of all available metadata definitions.
Expand source code
@staticmethod def all_available_metadata() -> List[str]: """ Returns a list of all available metadata definitions. :return: A list of all available metadata definitions. """ return [ AvailableMetadata.Api, AvailableMetadata.StationId, AvailableMetadata.StationUuid, AvailableMetadata.AuthEmail, AvailableMetadata.IsBackfilled, AvailableMetadata.IsPrivate, AvailableMetadata.IsScrambled, AvailableMetadata.StationMake, AvailableMetadata.StationModel, AvailableMetadata.StationOs, AvailableMetadata.StationOsVersion, AvailableMetadata.StationAppVersion, AvailableMetadata.BatteryLevel, AvailableMetadata.StationTemperature, AvailableMetadata.AcquisitionUrl, AvailableMetadata.SynchUrl, AvailableMetadata.AuthUrl, AvailableMetadata.OsTs, AvailableMetadata.MachTs, AvailableMetadata.ServerTs, AvailableMetadata.DataKey, AvailableMetadata.MachTimeZero, AvailableMetadata.BestLatency, AvailableMetadata.BestOffset, AvailableMetadata.AudioSensor, AvailableMetadata.BarometerSensor, AvailableMetadata.AccelerometerSensor, AvailableMetadata.GyroscopeSensor, AvailableMetadata.TimeSynchronizationSensor, AvailableMetadata.MagnetometerSensor, AvailableMetadata.LightSensor, AvailableMetadata.ProximitySensor, AvailableMetadata.LocationSensor, ]
def from_dict(kvs: Union[dict, list, str, int, float, bool, ForwardRef(None)], *, infer_missing=False) ‑> ~A
-
Expand source code
@classmethod def from_dict(cls: Type[A], kvs: Json, *, infer_missing=False) -> A: return _decode_dataclass(cls, kvs, infer_missing)
def from_json(s: Union[str, bytes, bytearray], *, parse_float=None, parse_int=None, parse_constant=None, infer_missing=False, **kw) ‑> ~A
-
Expand source code
@classmethod def from_json(cls: Type[A], s: JsonData, *, parse_float=None, parse_int=None, parse_constant=None, infer_missing=False, **kw) -> A: kvs = json.loads(s, parse_float=parse_float, parse_int=parse_int, parse_constant=parse_constant, **kw) return cls.from_dict(kvs, infer_missing=infer_missing)
def schema(*, infer_missing: bool = False, only=None, exclude=(), many: bool = False, context=None, load_only=(), dump_only=(), partial: bool = False, unknown=None) ‑> dataclasses_json.mm.SchemaF[~A]
-
Expand source code
@classmethod def schema(cls: Type[A], *, infer_missing: bool = False, only=None, exclude=(), many: bool = False, context=None, load_only=(), dump_only=(), partial: bool = False, unknown=None) -> SchemaType: Schema = build_schema(cls, DataClassJsonMixin, infer_missing, partial) if unknown is None: undefined_parameter_action = _undefined_parameter_action_safe(cls) if undefined_parameter_action is not None: # We can just make use of the same-named mm keywords unknown = undefined_parameter_action.name.lower() return Schema(only=only, exclude=exclude, many=many, context=context, load_only=load_only, dump_only=dump_only, partial=partial, unknown=unknown)
Methods
def to_dict(self, encode_json=False) ‑> Dict[str, Union[dict, list, str, int, float, bool, ForwardRef(None)]]
-
Expand source code
def to_dict(self, encode_json=False) -> Dict[str, Json]: return _asdict(self, encode_json=encode_json)
def to_json(self, *, skipkeys: bool = False, ensure_ascii: bool = True, check_circular: bool = True, allow_nan: bool = True, indent: Union[int, str, ForwardRef(None)] = None, separators: Tuple[str, str] = None, default: Callable = None, sort_keys: bool = False, **kw) ‑> str
-
Expand source code
def to_json(self, *, skipkeys: bool = False, ensure_ascii: bool = True, check_circular: bool = True, allow_nan: bool = True, indent: Optional[Union[int, str]] = None, separators: Tuple[str, str] = None, default: Callable = None, sort_keys: bool = False, **kw) -> str: return json.dumps(self.to_dict(encode_json=False), cls=_ExtendedEncoder, skipkeys=skipkeys, ensure_ascii=ensure_ascii, check_circular=check_circular, allow_nan=allow_nan, indent=indent, separators=separators, default=default, sort_keys=sort_keys, **kw)
class BoundingBox (sw_lat_lng: LatLng, ne_lat_lng: LatLng)
-
Defines a bounding box given the South West and North East coordinates.
Expand source code
@dataclass_json @dataclass class BoundingBox: """ Defines a bounding box given the South West and North East coordinates. """ sw_lat_lng: LatLng ne_lat_lng: LatLng
Class variables
var ne_lat_lng : LatLng
var sw_lat_lng : LatLng
Static methods
def from_dict(kvs: Union[dict, list, str, int, float, bool, ForwardRef(None)], *, infer_missing=False) ‑> ~A
-
Expand source code
@classmethod def from_dict(cls: Type[A], kvs: Json, *, infer_missing=False) -> A: return _decode_dataclass(cls, kvs, infer_missing)
def from_json(s: Union[str, bytes, bytearray], *, parse_float=None, parse_int=None, parse_constant=None, infer_missing=False, **kw) ‑> ~A
-
Expand source code
@classmethod def from_json(cls: Type[A], s: JsonData, *, parse_float=None, parse_int=None, parse_constant=None, infer_missing=False, **kw) -> A: kvs = json.loads(s, parse_float=parse_float, parse_int=parse_int, parse_constant=parse_constant, **kw) return cls.from_dict(kvs, infer_missing=infer_missing)
def schema(*, infer_missing: bool = False, only=None, exclude=(), many: bool = False, context=None, load_only=(), dump_only=(), partial: bool = False, unknown=None) ‑> dataclasses_json.mm.SchemaF[~A]
-
Expand source code
@classmethod def schema(cls: Type[A], *, infer_missing: bool = False, only=None, exclude=(), many: bool = False, context=None, load_only=(), dump_only=(), partial: bool = False, unknown=None) -> SchemaType: Schema = build_schema(cls, DataClassJsonMixin, infer_missing, partial) if unknown is None: undefined_parameter_action = _undefined_parameter_action_safe(cls) if undefined_parameter_action is not None: # We can just make use of the same-named mm keywords unknown = undefined_parameter_action.name.lower() return Schema(only=only, exclude=exclude, many=many, context=context, load_only=load_only, dump_only=dump_only, partial=partial, unknown=unknown)
Methods
def to_dict(self, encode_json=False) ‑> Dict[str, Union[dict, list, str, int, float, bool, ForwardRef(None)]]
-
Expand source code
def to_dict(self, encode_json=False) -> Dict[str, Json]: return _asdict(self, encode_json=encode_json)
def to_json(self, *, skipkeys: bool = False, ensure_ascii: bool = True, check_circular: bool = True, allow_nan: bool = True, indent: Union[int, str, ForwardRef(None)] = None, separators: Tuple[str, str] = None, default: Callable = None, sort_keys: bool = False, **kw) ‑> str
-
Expand source code
def to_json(self, *, skipkeys: bool = False, ensure_ascii: bool = True, check_circular: bool = True, allow_nan: bool = True, indent: Optional[Union[int, str]] = None, separators: Tuple[str, str] = None, default: Callable = None, sort_keys: bool = False, **kw) -> str: return json.dumps(self.to_dict(encode_json=False), cls=_ExtendedEncoder, skipkeys=skipkeys, ensure_ascii=ensure_ascii, check_circular=check_circular, allow_nan=allow_nan, indent=indent, separators=separators, default=default, sort_keys=sort_keys, **kw)
class BoundingCircle (center: LatLng, radius: float)
-
Defines a bounding circle from a given center coordinate and a radius in meters.
Expand source code
@dataclass_json @dataclass class BoundingCircle: """ Defines a bounding circle from a given center coordinate and a radius in meters. """ center: LatLng radius: float
Class variables
var center : LatLng
var radius : float
Static methods
def from_dict(kvs: Union[dict, list, str, int, float, bool, ForwardRef(None)], *, infer_missing=False) ‑> ~A
-
Expand source code
@classmethod def from_dict(cls: Type[A], kvs: Json, *, infer_missing=False) -> A: return _decode_dataclass(cls, kvs, infer_missing)
def from_json(s: Union[str, bytes, bytearray], *, parse_float=None, parse_int=None, parse_constant=None, infer_missing=False, **kw) ‑> ~A
-
Expand source code
@classmethod def from_json(cls: Type[A], s: JsonData, *, parse_float=None, parse_int=None, parse_constant=None, infer_missing=False, **kw) -> A: kvs = json.loads(s, parse_float=parse_float, parse_int=parse_int, parse_constant=parse_constant, **kw) return cls.from_dict(kvs, infer_missing=infer_missing)
def schema(*, infer_missing: bool = False, only=None, exclude=(), many: bool = False, context=None, load_only=(), dump_only=(), partial: bool = False, unknown=None) ‑> dataclasses_json.mm.SchemaF[~A]
-
Expand source code
@classmethod def schema(cls: Type[A], *, infer_missing: bool = False, only=None, exclude=(), many: bool = False, context=None, load_only=(), dump_only=(), partial: bool = False, unknown=None) -> SchemaType: Schema = build_schema(cls, DataClassJsonMixin, infer_missing, partial) if unknown is None: undefined_parameter_action = _undefined_parameter_action_safe(cls) if undefined_parameter_action is not None: # We can just make use of the same-named mm keywords unknown = undefined_parameter_action.name.lower() return Schema(only=only, exclude=exclude, many=many, context=context, load_only=load_only, dump_only=dump_only, partial=partial, unknown=unknown)
Methods
def to_dict(self, encode_json=False) ‑> Dict[str, Union[dict, list, str, int, float, bool, ForwardRef(None)]]
-
Expand source code
def to_dict(self, encode_json=False) -> Dict[str, Json]: return _asdict(self, encode_json=encode_json)
def to_json(self, *, skipkeys: bool = False, ensure_ascii: bool = True, check_circular: bool = True, allow_nan: bool = True, indent: Union[int, str, ForwardRef(None)] = None, separators: Tuple[str, str] = None, default: Callable = None, sort_keys: bool = False, **kw) ‑> str
-
Expand source code
def to_json(self, *, skipkeys: bool = False, ensure_ascii: bool = True, check_circular: bool = True, allow_nan: bool = True, indent: Optional[Union[int, str]] = None, separators: Tuple[str, str] = None, default: Callable = None, sort_keys: bool = False, **kw) -> str: return json.dumps(self.to_dict(encode_json=False), cls=_ExtendedEncoder, skipkeys=skipkeys, ensure_ascii=ensure_ascii, check_circular=check_circular, allow_nan=allow_nan, indent=indent, separators=separators, default=default, sort_keys=sort_keys, **kw)
class DataAvailability (station_id: str, station_uuid: str, start: int, end: int, total_packets: int, expected_packets: int)
-
DataAvailability(station_id: str, station_uuid: str, start: int, end: int, total_packets: int, expected_packets: int)
Expand source code
@dataclass_json @dataclass class DataAvailability: station_id: str station_uuid: str start: int end: int total_packets: int expected_packets: int
Class variables
var end : int
var expected_packets : int
var start : int
var station_id : str
var station_uuid : str
var total_packets : int
Static methods
def from_dict(kvs: Union[dict, list, str, int, float, bool, ForwardRef(None)], *, infer_missing=False) ‑> ~A
-
Expand source code
@classmethod def from_dict(cls: Type[A], kvs: Json, *, infer_missing=False) -> A: return _decode_dataclass(cls, kvs, infer_missing)
def from_json(s: Union[str, bytes, bytearray], *, parse_float=None, parse_int=None, parse_constant=None, infer_missing=False, **kw) ‑> ~A
-
Expand source code
@classmethod def from_json(cls: Type[A], s: JsonData, *, parse_float=None, parse_int=None, parse_constant=None, infer_missing=False, **kw) -> A: kvs = json.loads(s, parse_float=parse_float, parse_int=parse_int, parse_constant=parse_constant, **kw) return cls.from_dict(kvs, infer_missing=infer_missing)
def schema(*, infer_missing: bool = False, only=None, exclude=(), many: bool = False, context=None, load_only=(), dump_only=(), partial: bool = False, unknown=None) ‑> dataclasses_json.mm.SchemaF[~A]
-
Expand source code
@classmethod def schema(cls: Type[A], *, infer_missing: bool = False, only=None, exclude=(), many: bool = False, context=None, load_only=(), dump_only=(), partial: bool = False, unknown=None) -> SchemaType: Schema = build_schema(cls, DataClassJsonMixin, infer_missing, partial) if unknown is None: undefined_parameter_action = _undefined_parameter_action_safe(cls) if undefined_parameter_action is not None: # We can just make use of the same-named mm keywords unknown = undefined_parameter_action.name.lower() return Schema(only=only, exclude=exclude, many=many, context=context, load_only=load_only, dump_only=dump_only, partial=partial, unknown=unknown)
Methods
def to_dict(self, encode_json=False) ‑> Dict[str, Union[dict, list, str, int, float, bool, ForwardRef(None)]]
-
Expand source code
def to_dict(self, encode_json=False) -> Dict[str, Json]: return _asdict(self, encode_json=encode_json)
def to_json(self, *, skipkeys: bool = False, ensure_ascii: bool = True, check_circular: bool = True, allow_nan: bool = True, indent: Union[int, str, ForwardRef(None)] = None, separators: Tuple[str, str] = None, default: Callable = None, sort_keys: bool = False, **kw) ‑> str
-
Expand source code
def to_json(self, *, skipkeys: bool = False, ensure_ascii: bool = True, check_circular: bool = True, allow_nan: bool = True, indent: Optional[Union[int, str]] = None, separators: Tuple[str, str] = None, default: Callable = None, sort_keys: bool = False, **kw) -> str: return json.dumps(self.to_dict(encode_json=False), cls=_ExtendedEncoder, skipkeys=skipkeys, ensure_ascii=ensure_ascii, check_circular=check_circular, allow_nan=allow_nan, indent=indent, separators=separators, default=default, sort_keys=sort_keys, **kw)
class DbPacket (_id: Optional[str], metadata: Optional[WrappedRedvoxPacketM], additional_metadata: Optional[AdditionalMetadata])
-
Representation of a packet loaded from the database.
Expand source code
@dataclass class DbPacket: """ Representation of a packet loaded from the database. """ _id: Optional[str] metadata: Optional[WrappedRedvoxPacketM] additional_metadata: Optional[AdditionalMetadata] @staticmethod def from_dict(json_dict: Dict) -> "DbPacket": """ Converts JSON to a DbPacket object. :param json_dict: JSON to convert. :return: An instance of a DbPacket. """ return DbPacket( _get("_id", json_dict), WrappedRedvoxPacketM.from_json(json.dumps(json_dict["metadata"])), AdditionalMetadata.from_dict(_get("additional_metadata", json_dict)), )
Class variables
var additional_metadata : Optional[AdditionalMetadata]
var metadata : Optional[WrappedRedvoxPacketM]
Static methods
def from_dict(json_dict: Dict) ‑> DbPacket
-
Converts JSON to a DbPacket object. :param json_dict: JSON to convert. :return: An instance of a DbPacket.
Expand source code
@staticmethod def from_dict(json_dict: Dict) -> "DbPacket": """ Converts JSON to a DbPacket object. :param json_dict: JSON to convert. :return: An instance of a DbPacket. """ return DbPacket( _get("_id", json_dict), WrappedRedvoxPacketM.from_json(json.dumps(json_dict["metadata"])), AdditionalMetadata.from_dict(_get("additional_metadata", json_dict)), )
class GeoMetadataReq (auth_token: str, start_ts_s: int, end_ts_s: int, bounding_box: Optional[BoundingBox], bounding_circle: Optional[BoundingCircle], fields: List[str])
-
A geo metadata request. Note that bounding_box and bounding_circle are mutually exclusive.
Expand source code
@dataclass_json @dataclass class GeoMetadataReq: """ A geo metadata request. Note that bounding_box and bounding_circle are mutually exclusive. """ auth_token: str start_ts_s: int end_ts_s: int bounding_box: Optional[BoundingBox] bounding_circle: Optional[BoundingCircle] fields: List[str]
Class variables
var auth_token : str
var bounding_box : Optional[BoundingBox]
var bounding_circle : Optional[BoundingCircle]
var end_ts_s : int
var fields : List[str]
var start_ts_s : int
Static methods
def from_dict(kvs: Union[dict, list, str, int, float, bool, ForwardRef(None)], *, infer_missing=False) ‑> ~A
-
Expand source code
@classmethod def from_dict(cls: Type[A], kvs: Json, *, infer_missing=False) -> A: return _decode_dataclass(cls, kvs, infer_missing)
def from_json(s: Union[str, bytes, bytearray], *, parse_float=None, parse_int=None, parse_constant=None, infer_missing=False, **kw) ‑> ~A
-
Expand source code
@classmethod def from_json(cls: Type[A], s: JsonData, *, parse_float=None, parse_int=None, parse_constant=None, infer_missing=False, **kw) -> A: kvs = json.loads(s, parse_float=parse_float, parse_int=parse_int, parse_constant=parse_constant, **kw) return cls.from_dict(kvs, infer_missing=infer_missing)
def schema(*, infer_missing: bool = False, only=None, exclude=(), many: bool = False, context=None, load_only=(), dump_only=(), partial: bool = False, unknown=None) ‑> dataclasses_json.mm.SchemaF[~A]
-
Expand source code
@classmethod def schema(cls: Type[A], *, infer_missing: bool = False, only=None, exclude=(), many: bool = False, context=None, load_only=(), dump_only=(), partial: bool = False, unknown=None) -> SchemaType: Schema = build_schema(cls, DataClassJsonMixin, infer_missing, partial) if unknown is None: undefined_parameter_action = _undefined_parameter_action_safe(cls) if undefined_parameter_action is not None: # We can just make use of the same-named mm keywords unknown = undefined_parameter_action.name.lower() return Schema(only=only, exclude=exclude, many=many, context=context, load_only=load_only, dump_only=dump_only, partial=partial, unknown=unknown)
Methods
def to_dict(self, encode_json=False) ‑> Dict[str, Union[dict, list, str, int, float, bool, ForwardRef(None)]]
-
Expand source code
def to_dict(self, encode_json=False) -> Dict[str, Json]: return _asdict(self, encode_json=encode_json)
def to_json(self, *, skipkeys: bool = False, ensure_ascii: bool = True, check_circular: bool = True, allow_nan: bool = True, indent: Union[int, str, ForwardRef(None)] = None, separators: Tuple[str, str] = None, default: Callable = None, sort_keys: bool = False, **kw) ‑> str
-
Expand source code
def to_json(self, *, skipkeys: bool = False, ensure_ascii: bool = True, check_circular: bool = True, allow_nan: bool = True, indent: Optional[Union[int, str]] = None, separators: Tuple[str, str] = None, default: Callable = None, sort_keys: bool = False, **kw) -> str: return json.dumps(self.to_dict(encode_json=False), cls=_ExtendedEncoder, skipkeys=skipkeys, ensure_ascii=ensure_ascii, check_circular=check_circular, allow_nan=allow_nan, indent=indent, separators=separators, default=default, sort_keys=sort_keys, **kw)
class GeoMetadataResp (err: Optional[str], db_packets: Optional[List[DbPacket]])
-
A geo metadata response for API M.
Expand source code
@dataclass class GeoMetadataResp: """ A geo metadata response for API M. """ err: Optional[str] db_packets: Optional[List[DbPacket]] @staticmethod def from_json(json_dict: Dict) -> "GeoMetadataResp": """ Converts a JSON dictionary into a response. :param json_dict: Dictionary to use for conversion. :return: The converted response. """ db_packets: Optional[List[DbPacket]] = None if "db_packets" in json_dict: packets: Optional[List[Dict]] = json_dict["db_packets"] if packets is not None and len(packets) > 0: db_packets = list(map(DbPacket.from_dict, packets)) return GeoMetadataResp(err=_get("err", json_dict), db_packets=db_packets)
Class variables
var db_packets : Optional[List[DbPacket]]
var err : Optional[str]
Static methods
def from_json(json_dict: Dict) ‑> GeoMetadataResp
-
Converts a JSON dictionary into a response. :param json_dict: Dictionary to use for conversion. :return: The converted response.
Expand source code
@staticmethod def from_json(json_dict: Dict) -> "GeoMetadataResp": """ Converts a JSON dictionary into a response. :param json_dict: Dictionary to use for conversion. :return: The converted response. """ db_packets: Optional[List[DbPacket]] = None if "db_packets" in json_dict: packets: Optional[List[Dict]] = json_dict["db_packets"] if packets is not None and len(packets) > 0: db_packets = list(map(DbPacket.from_dict, packets)) return GeoMetadataResp(err=_get("err", json_dict), db_packets=db_packets)
class LatLng (lat: float, lng: float)
-
Represents a latitude and longitude as decimal degrees.
Expand source code
@dataclass_json @dataclass class LatLng: """ Represents a latitude and longitude as decimal degrees. """ lat: float lng: float
Class variables
var lat : float
var lng : float
Static methods
def from_dict(kvs: Union[dict, list, str, int, float, bool, ForwardRef(None)], *, infer_missing=False) ‑> ~A
-
Expand source code
@classmethod def from_dict(cls: Type[A], kvs: Json, *, infer_missing=False) -> A: return _decode_dataclass(cls, kvs, infer_missing)
def from_json(s: Union[str, bytes, bytearray], *, parse_float=None, parse_int=None, parse_constant=None, infer_missing=False, **kw) ‑> ~A
-
Expand source code
@classmethod def from_json(cls: Type[A], s: JsonData, *, parse_float=None, parse_int=None, parse_constant=None, infer_missing=False, **kw) -> A: kvs = json.loads(s, parse_float=parse_float, parse_int=parse_int, parse_constant=parse_constant, **kw) return cls.from_dict(kvs, infer_missing=infer_missing)
def schema(*, infer_missing: bool = False, only=None, exclude=(), many: bool = False, context=None, load_only=(), dump_only=(), partial: bool = False, unknown=None) ‑> dataclasses_json.mm.SchemaF[~A]
-
Expand source code
@classmethod def schema(cls: Type[A], *, infer_missing: bool = False, only=None, exclude=(), many: bool = False, context=None, load_only=(), dump_only=(), partial: bool = False, unknown=None) -> SchemaType: Schema = build_schema(cls, DataClassJsonMixin, infer_missing, partial) if unknown is None: undefined_parameter_action = _undefined_parameter_action_safe(cls) if undefined_parameter_action is not None: # We can just make use of the same-named mm keywords unknown = undefined_parameter_action.name.lower() return Schema(only=only, exclude=exclude, many=many, context=context, load_only=load_only, dump_only=dump_only, partial=partial, unknown=unknown)
Methods
def to_dict(self, encode_json=False) ‑> Dict[str, Union[dict, list, str, int, float, bool, ForwardRef(None)]]
-
Expand source code
def to_dict(self, encode_json=False) -> Dict[str, Json]: return _asdict(self, encode_json=encode_json)
def to_json(self, *, skipkeys: bool = False, ensure_ascii: bool = True, check_circular: bool = True, allow_nan: bool = True, indent: Union[int, str, ForwardRef(None)] = None, separators: Tuple[str, str] = None, default: Callable = None, sort_keys: bool = False, **kw) ‑> str
-
Expand source code
def to_json(self, *, skipkeys: bool = False, ensure_ascii: bool = True, check_circular: bool = True, allow_nan: bool = True, indent: Optional[Union[int, str]] = None, separators: Tuple[str, str] = None, default: Callable = None, sort_keys: bool = False, **kw) -> str: return json.dumps(self.to_dict(encode_json=False), cls=_ExtendedEncoder, skipkeys=skipkeys, ensure_ascii=ensure_ascii, check_circular=check_circular, allow_nan=allow_nan, indent=indent, separators=separators, default=default, sort_keys=sort_keys, **kw)
class LocationMetadata (sensor_name: Optional[str] = None, timestamps_microseconds_utc_count: Optional[int] = None, payload_count: Optional[int] = None, sample_interval_mean: Optional[float] = None, sample_interval_std: Optional[float] = None, sample_interval_median: Optional[float] = None, latitude_mean: Optional[float] = None, latitude_std: Optional[float] = None, latitude_median: Optional[float] = None, longitude_mean: Optional[float] = None, longitude_std: Optional[float] = None, longitude_median: Optional[float] = None, altitude_mean: Optional[float] = None, altitude_std: Optional[float] = None, altitude_median: Optional[float] = None, speed_mean: Optional[float] = None, speed_std: Optional[float] = None, speed_median: Optional[float] = None, accuracy_mean: Optional[float] = None, accuracy_std: Optional[float] = None, accuracy_median: Optional[float] = None, metadata: Optional[List[str]] = None)
-
Metadata associated with the location sensor.
Expand source code
@dataclass_json @dataclass class LocationMetadata: """ Metadata associated with the location sensor. """ sensor_name: Optional[str] = None timestamps_microseconds_utc_count: Optional[int] = None payload_count: Optional[int] = None sample_interval_mean: Optional[float] = None sample_interval_std: Optional[float] = None sample_interval_median: Optional[float] = None latitude_mean: Optional[float] = None latitude_std: Optional[float] = None latitude_median: Optional[float] = None longitude_mean: Optional[float] = None longitude_std: Optional[float] = None longitude_median: Optional[float] = None altitude_mean: Optional[float] = None altitude_std: Optional[float] = None altitude_median: Optional[float] = None speed_mean: Optional[float] = None speed_std: Optional[float] = None speed_median: Optional[float] = None accuracy_mean: Optional[float] = None accuracy_std: Optional[float] = None accuracy_median: Optional[float] = None metadata: Optional[List[str]] = None
Class variables
var accuracy_mean : Optional[float]
var accuracy_median : Optional[float]
var accuracy_std : Optional[float]
var altitude_mean : Optional[float]
var altitude_median : Optional[float]
var altitude_std : Optional[float]
var latitude_mean : Optional[float]
var latitude_median : Optional[float]
var latitude_std : Optional[float]
var longitude_mean : Optional[float]
var longitude_median : Optional[float]
var longitude_std : Optional[float]
var metadata : Optional[List[str]]
var payload_count : Optional[int]
var sample_interval_mean : Optional[float]
var sample_interval_median : Optional[float]
var sample_interval_std : Optional[float]
var sensor_name : Optional[str]
var speed_mean : Optional[float]
var speed_median : Optional[float]
var speed_std : Optional[float]
var timestamps_microseconds_utc_count : Optional[int]
Static methods
def from_dict(kvs: Union[dict, list, str, int, float, bool, ForwardRef(None)], *, infer_missing=False) ‑> ~A
-
Expand source code
@classmethod def from_dict(cls: Type[A], kvs: Json, *, infer_missing=False) -> A: return _decode_dataclass(cls, kvs, infer_missing)
def from_json(s: Union[str, bytes, bytearray], *, parse_float=None, parse_int=None, parse_constant=None, infer_missing=False, **kw) ‑> ~A
-
Expand source code
@classmethod def from_json(cls: Type[A], s: JsonData, *, parse_float=None, parse_int=None, parse_constant=None, infer_missing=False, **kw) -> A: kvs = json.loads(s, parse_float=parse_float, parse_int=parse_int, parse_constant=parse_constant, **kw) return cls.from_dict(kvs, infer_missing=infer_missing)
def schema(*, infer_missing: bool = False, only=None, exclude=(), many: bool = False, context=None, load_only=(), dump_only=(), partial: bool = False, unknown=None) ‑> dataclasses_json.mm.SchemaF[~A]
-
Expand source code
@classmethod def schema(cls: Type[A], *, infer_missing: bool = False, only=None, exclude=(), many: bool = False, context=None, load_only=(), dump_only=(), partial: bool = False, unknown=None) -> SchemaType: Schema = build_schema(cls, DataClassJsonMixin, infer_missing, partial) if unknown is None: undefined_parameter_action = _undefined_parameter_action_safe(cls) if undefined_parameter_action is not None: # We can just make use of the same-named mm keywords unknown = undefined_parameter_action.name.lower() return Schema(only=only, exclude=exclude, many=many, context=context, load_only=load_only, dump_only=dump_only, partial=partial, unknown=unknown)
Methods
def to_dict(self, encode_json=False) ‑> Dict[str, Union[dict, list, str, int, float, bool, ForwardRef(None)]]
-
Expand source code
def to_dict(self, encode_json=False) -> Dict[str, Json]: return _asdict(self, encode_json=encode_json)
def to_json(self, *, skipkeys: bool = False, ensure_ascii: bool = True, check_circular: bool = True, allow_nan: bool = True, indent: Union[int, str, ForwardRef(None)] = None, separators: Tuple[str, str] = None, default: Callable = None, sort_keys: bool = False, **kw) ‑> str
-
Expand source code
def to_json(self, *, skipkeys: bool = False, ensure_ascii: bool = True, check_circular: bool = True, allow_nan: bool = True, indent: Optional[Union[int, str]] = None, separators: Tuple[str, str] = None, default: Callable = None, sort_keys: bool = False, **kw) -> str: return json.dumps(self.to_dict(encode_json=False), cls=_ExtendedEncoder, skipkeys=skipkeys, ensure_ascii=ensure_ascii, check_circular=check_circular, allow_nan=allow_nan, indent=indent, separators=separators, default=default, sort_keys=sort_keys, **kw)
class MetadataReq (auth_token: str, start_ts_s: int, end_ts_s: int, station_ids: List[str], fields: List[str], secret_token: Optional[str] = None)
-
The definition of a metadata request. Fields should include the definitions defined by AvailableMetadata.
Expand source code
@dataclass_json @dataclass class MetadataReq: """ The definition of a metadata request. Fields should include the definitions defined by AvailableMetadata. """ auth_token: str start_ts_s: int end_ts_s: int station_ids: List[str] fields: List[str] secret_token: Optional[str] = None
Class variables
var auth_token : str
var end_ts_s : int
var fields : List[str]
var secret_token : Optional[str]
var start_ts_s : int
var station_ids : List[str]
Static methods
def from_dict(kvs: Union[dict, list, str, int, float, bool, ForwardRef(None)], *, infer_missing=False) ‑> ~A
-
Expand source code
@classmethod def from_dict(cls: Type[A], kvs: Json, *, infer_missing=False) -> A: return _decode_dataclass(cls, kvs, infer_missing)
def from_json(s: Union[str, bytes, bytearray], *, parse_float=None, parse_int=None, parse_constant=None, infer_missing=False, **kw) ‑> ~A
-
Expand source code
@classmethod def from_json(cls: Type[A], s: JsonData, *, parse_float=None, parse_int=None, parse_constant=None, infer_missing=False, **kw) -> A: kvs = json.loads(s, parse_float=parse_float, parse_int=parse_int, parse_constant=parse_constant, **kw) return cls.from_dict(kvs, infer_missing=infer_missing)
def schema(*, infer_missing: bool = False, only=None, exclude=(), many: bool = False, context=None, load_only=(), dump_only=(), partial: bool = False, unknown=None) ‑> dataclasses_json.mm.SchemaF[~A]
-
Expand source code
@classmethod def schema(cls: Type[A], *, infer_missing: bool = False, only=None, exclude=(), many: bool = False, context=None, load_only=(), dump_only=(), partial: bool = False, unknown=None) -> SchemaType: Schema = build_schema(cls, DataClassJsonMixin, infer_missing, partial) if unknown is None: undefined_parameter_action = _undefined_parameter_action_safe(cls) if undefined_parameter_action is not None: # We can just make use of the same-named mm keywords unknown = undefined_parameter_action.name.lower() return Schema(only=only, exclude=exclude, many=many, context=context, load_only=load_only, dump_only=dump_only, partial=partial, unknown=unknown)
Methods
def to_dict(self, encode_json=False) ‑> Dict[str, Union[dict, list, str, int, float, bool, ForwardRef(None)]]
-
Expand source code
def to_dict(self, encode_json=False) -> Dict[str, Json]: return _asdict(self, encode_json=encode_json)
def to_json(self, *, skipkeys: bool = False, ensure_ascii: bool = True, check_circular: bool = True, allow_nan: bool = True, indent: Union[int, str, ForwardRef(None)] = None, separators: Tuple[str, str] = None, default: Callable = None, sort_keys: bool = False, **kw) ‑> str
-
Expand source code
def to_json(self, *, skipkeys: bool = False, ensure_ascii: bool = True, check_circular: bool = True, allow_nan: bool = True, indent: Optional[Union[int, str]] = None, separators: Tuple[str, str] = None, default: Callable = None, sort_keys: bool = False, **kw) -> str: return json.dumps(self.to_dict(encode_json=False), cls=_ExtendedEncoder, skipkeys=skipkeys, ensure_ascii=ensure_ascii, check_circular=check_circular, allow_nan=allow_nan, indent=indent, separators=separators, default=default, sort_keys=sort_keys, **kw)
class MetadataResp (metadata: List[PacketMetadataResult])
-
Response of a metadata request.
Expand source code
@dataclass_json @dataclass class MetadataResp: """ Response of a metadata request. """ metadata: List[PacketMetadataResult]
Class variables
var metadata : List[PacketMetadataResult]
Static methods
def from_dict(kvs: Union[dict, list, str, int, float, bool, ForwardRef(None)], *, infer_missing=False) ‑> ~A
-
Expand source code
@classmethod def from_dict(cls: Type[A], kvs: Json, *, infer_missing=False) -> A: return _decode_dataclass(cls, kvs, infer_missing)
def from_json(s: Union[str, bytes, bytearray], *, parse_float=None, parse_int=None, parse_constant=None, infer_missing=False, **kw) ‑> ~A
-
Expand source code
@classmethod def from_json(cls: Type[A], s: JsonData, *, parse_float=None, parse_int=None, parse_constant=None, infer_missing=False, **kw) -> A: kvs = json.loads(s, parse_float=parse_float, parse_int=parse_int, parse_constant=parse_constant, **kw) return cls.from_dict(kvs, infer_missing=infer_missing)
def schema(*, infer_missing: bool = False, only=None, exclude=(), many: bool = False, context=None, load_only=(), dump_only=(), partial: bool = False, unknown=None) ‑> dataclasses_json.mm.SchemaF[~A]
-
Expand source code
@classmethod def schema(cls: Type[A], *, infer_missing: bool = False, only=None, exclude=(), many: bool = False, context=None, load_only=(), dump_only=(), partial: bool = False, unknown=None) -> SchemaType: Schema = build_schema(cls, DataClassJsonMixin, infer_missing, partial) if unknown is None: undefined_parameter_action = _undefined_parameter_action_safe(cls) if undefined_parameter_action is not None: # We can just make use of the same-named mm keywords unknown = undefined_parameter_action.name.lower() return Schema(only=only, exclude=exclude, many=many, context=context, load_only=load_only, dump_only=dump_only, partial=partial, unknown=unknown)
Methods
def to_dict(self, encode_json=False) ‑> Dict[str, Union[dict, list, str, int, float, bool, ForwardRef(None)]]
-
Expand source code
def to_dict(self, encode_json=False) -> Dict[str, Json]: return _asdict(self, encode_json=encode_json)
def to_json(self, *, skipkeys: bool = False, ensure_ascii: bool = True, check_circular: bool = True, allow_nan: bool = True, indent: Union[int, str, ForwardRef(None)] = None, separators: Tuple[str, str] = None, default: Callable = None, sort_keys: bool = False, **kw) ‑> str
-
Expand source code
def to_json(self, *, skipkeys: bool = False, ensure_ascii: bool = True, check_circular: bool = True, allow_nan: bool = True, indent: Optional[Union[int, str]] = None, separators: Tuple[str, str] = None, default: Callable = None, sort_keys: bool = False, **kw) -> str: return json.dumps(self.to_dict(encode_json=False), cls=_ExtendedEncoder, skipkeys=skipkeys, ensure_ascii=ensure_ascii, check_circular=check_circular, allow_nan=allow_nan, indent=indent, separators=separators, default=default, sort_keys=sort_keys, **kw)
class MetadataRespM (db_packets: List[DbPacket])
-
A metadata response for API M.
Expand source code
@dataclass class MetadataRespM: """ A metadata response for API M. """ db_packets: List[DbPacket] @staticmethod def from_json(json_dicts: Dict) -> "MetadataRespM": """ Converts a JSON dictionary into a response. :param json_dicts: Dictionary to use for conversion. :return: The converted response. """ return MetadataRespM(list(map(DbPacket.from_dict, json_dicts["db_packets"])))
Class variables
var db_packets : List[DbPacket]
Static methods
def from_json(json_dicts: Dict) ‑> MetadataRespM
-
Converts a JSON dictionary into a response. :param json_dicts: Dictionary to use for conversion. :return: The converted response.
Expand source code
@staticmethod def from_json(json_dicts: Dict) -> "MetadataRespM": """ Converts a JSON dictionary into a response. :param json_dicts: Dictionary to use for conversion. :return: The converted response. """ return MetadataRespM(list(map(DbPacket.from_dict, json_dicts["db_packets"])))
class PacketMetadataResult (api: Optional[int] = None, station_id: Optional[str] = None, station_uuid: Optional[str] = None, auth_email: Optional[str] = None, is_backfilled: Optional[bool] = None, is_private: Optional[bool] = None, is_scrambled: Optional[bool] = None, station_make: Optional[str] = None, station_model: Optional[str] = None, station_os: Optional[str] = None, station_os_version: Optional[str] = None, station_app_version: Optional[str] = None, battery_level: Optional[float] = None, station_temperature: Optional[float] = None, acquisition_url: Optional[str] = None, synch_url: Optional[str] = None, auth_url: Optional[str] = None, os_ts: Optional[int] = None, mach_ts: Optional[int] = None, server_ts: Optional[int] = None, data_key: Optional[str] = None, mach_time_zero: Optional[float] = None, best_latency: Optional[float] = None, best_offset: Optional[float] = None, audio_sensor: Optional[AudioMetadata] = None, barometer_sensor: Optional[SingleMetadata] = None, location_sensor: Optional[LocationMetadata] = None, time_synchronization_sensor: Optional[SingleMetadata] = None, accelerometer_sensor: Optional[XyzMetadata] = None, magnetometer_sensor: Optional[XyzMetadata] = None, gyroscope_sensor: Optional[XyzMetadata] = None, light_sensor: Optional[SingleMetadata] = None, proximity_sensor: Optional[SingleMetadata] = None)
-
Metadata associated with RedVox API 900 packets.
Expand source code
@dataclass_json @dataclass class PacketMetadataResult: """ Metadata associated with RedVox API 900 packets. """ api: Optional[int] = None station_id: Optional[str] = None station_uuid: Optional[str] = None auth_email: Optional[str] = None is_backfilled: Optional[bool] = None is_private: Optional[bool] = None is_scrambled: Optional[bool] = None station_make: Optional[str] = None station_model: Optional[str] = None station_os: Optional[str] = None station_os_version: Optional[str] = None station_app_version: Optional[str] = None battery_level: Optional[float] = None station_temperature: Optional[float] = None acquisition_url: Optional[str] = None synch_url: Optional[str] = None auth_url: Optional[str] = None os_ts: Optional[int] = None mach_ts: Optional[int] = None server_ts: Optional[int] = None data_key: Optional[str] = None mach_time_zero: Optional[float] = None best_latency: Optional[float] = None best_offset: Optional[float] = None audio_sensor: Optional[AudioMetadata] = None barometer_sensor: Optional[SingleMetadata] = None location_sensor: Optional[LocationMetadata] = None time_synchronization_sensor: Optional[SingleMetadata] = None accelerometer_sensor: Optional[XyzMetadata] = None magnetometer_sensor: Optional[XyzMetadata] = None gyroscope_sensor: Optional[XyzMetadata] = None light_sensor: Optional[SingleMetadata] = None proximity_sensor: Optional[SingleMetadata] = None
Class variables
var accelerometer_sensor : Optional[XyzMetadata]
var acquisition_url : Optional[str]
var api : Optional[int]
var audio_sensor : Optional[AudioMetadata]
var auth_email : Optional[str]
var auth_url : Optional[str]
var barometer_sensor : Optional[SingleMetadata]
var battery_level : Optional[float]
var best_latency : Optional[float]
var best_offset : Optional[float]
var data_key : Optional[str]
var gyroscope_sensor : Optional[XyzMetadata]
var is_backfilled : Optional[bool]
var is_private : Optional[bool]
var is_scrambled : Optional[bool]
var light_sensor : Optional[SingleMetadata]
var location_sensor : Optional[LocationMetadata]
var mach_time_zero : Optional[float]
var mach_ts : Optional[int]
var magnetometer_sensor : Optional[XyzMetadata]
var os_ts : Optional[int]
var proximity_sensor : Optional[SingleMetadata]
var server_ts : Optional[int]
var station_app_version : Optional[str]
var station_id : Optional[str]
var station_make : Optional[str]
var station_model : Optional[str]
var station_os : Optional[str]
var station_os_version : Optional[str]
var station_temperature : Optional[float]
var station_uuid : Optional[str]
var synch_url : Optional[str]
var time_synchronization_sensor : Optional[SingleMetadata]
Static methods
def from_dict(kvs: Union[dict, list, str, int, float, bool, ForwardRef(None)], *, infer_missing=False) ‑> ~A
-
Expand source code
@classmethod def from_dict(cls: Type[A], kvs: Json, *, infer_missing=False) -> A: return _decode_dataclass(cls, kvs, infer_missing)
def from_json(s: Union[str, bytes, bytearray], *, parse_float=None, parse_int=None, parse_constant=None, infer_missing=False, **kw) ‑> ~A
-
Expand source code
@classmethod def from_json(cls: Type[A], s: JsonData, *, parse_float=None, parse_int=None, parse_constant=None, infer_missing=False, **kw) -> A: kvs = json.loads(s, parse_float=parse_float, parse_int=parse_int, parse_constant=parse_constant, **kw) return cls.from_dict(kvs, infer_missing=infer_missing)
def schema(*, infer_missing: bool = False, only=None, exclude=(), many: bool = False, context=None, load_only=(), dump_only=(), partial: bool = False, unknown=None) ‑> dataclasses_json.mm.SchemaF[~A]
-
Expand source code
@classmethod def schema(cls: Type[A], *, infer_missing: bool = False, only=None, exclude=(), many: bool = False, context=None, load_only=(), dump_only=(), partial: bool = False, unknown=None) -> SchemaType: Schema = build_schema(cls, DataClassJsonMixin, infer_missing, partial) if unknown is None: undefined_parameter_action = _undefined_parameter_action_safe(cls) if undefined_parameter_action is not None: # We can just make use of the same-named mm keywords unknown = undefined_parameter_action.name.lower() return Schema(only=only, exclude=exclude, many=many, context=context, load_only=load_only, dump_only=dump_only, partial=partial, unknown=unknown)
Methods
def to_dict(self, encode_json=False) ‑> Dict[str, Union[dict, list, str, int, float, bool, ForwardRef(None)]]
-
Expand source code
def to_dict(self, encode_json=False) -> Dict[str, Json]: return _asdict(self, encode_json=encode_json)
def to_json(self, *, skipkeys: bool = False, ensure_ascii: bool = True, check_circular: bool = True, allow_nan: bool = True, indent: Union[int, str, ForwardRef(None)] = None, separators: Tuple[str, str] = None, default: Callable = None, sort_keys: bool = False, **kw) ‑> str
-
Expand source code
def to_json(self, *, skipkeys: bool = False, ensure_ascii: bool = True, check_circular: bool = True, allow_nan: bool = True, indent: Optional[Union[int, str]] = None, separators: Tuple[str, str] = None, default: Callable = None, sort_keys: bool = False, **kw) -> str: return json.dumps(self.to_dict(encode_json=False), cls=_ExtendedEncoder, skipkeys=skipkeys, ensure_ascii=ensure_ascii, check_circular=check_circular, allow_nan=allow_nan, indent=indent, separators=separators, default=default, sort_keys=sort_keys, **kw)
class SingleMetadata (sensor_name: Optional[str] = None, timestamps_microseconds_utc_count: Optional[int] = None, payload_count: Optional[int] = None, sample_interval_mean: Optional[float] = None, sample_interval_std: Optional[float] = None, sample_interval_median: Optional[float] = None, value_mean: Optional[float] = None, value_std: Optional[float] = None, value_median: Optional[float] = None, metadata: Optional[List[str]] = None)
-
Metadata associated with sensors that only contain a single dimensional channel of data (barometer, light, proximity).
Expand source code
@dataclass_json @dataclass class SingleMetadata: """ Metadata associated with sensors that only contain a single dimensional channel of data (barometer, light, proximity). """ sensor_name: Optional[str] = None timestamps_microseconds_utc_count: Optional[int] = None payload_count: Optional[int] = None sample_interval_mean: Optional[float] = None sample_interval_std: Optional[float] = None sample_interval_median: Optional[float] = None value_mean: Optional[float] = None value_std: Optional[float] = None value_median: Optional[float] = None metadata: Optional[List[str]] = None
Class variables
var metadata : Optional[List[str]]
var payload_count : Optional[int]
var sample_interval_mean : Optional[float]
var sample_interval_median : Optional[float]
var sample_interval_std : Optional[float]
var sensor_name : Optional[str]
var timestamps_microseconds_utc_count : Optional[int]
var value_mean : Optional[float]
var value_median : Optional[float]
var value_std : Optional[float]
Static methods
def from_dict(kvs: Union[dict, list, str, int, float, bool, ForwardRef(None)], *, infer_missing=False) ‑> ~A
-
Expand source code
@classmethod def from_dict(cls: Type[A], kvs: Json, *, infer_missing=False) -> A: return _decode_dataclass(cls, kvs, infer_missing)
def from_json(s: Union[str, bytes, bytearray], *, parse_float=None, parse_int=None, parse_constant=None, infer_missing=False, **kw) ‑> ~A
-
Expand source code
@classmethod def from_json(cls: Type[A], s: JsonData, *, parse_float=None, parse_int=None, parse_constant=None, infer_missing=False, **kw) -> A: kvs = json.loads(s, parse_float=parse_float, parse_int=parse_int, parse_constant=parse_constant, **kw) return cls.from_dict(kvs, infer_missing=infer_missing)
def schema(*, infer_missing: bool = False, only=None, exclude=(), many: bool = False, context=None, load_only=(), dump_only=(), partial: bool = False, unknown=None) ‑> dataclasses_json.mm.SchemaF[~A]
-
Expand source code
@classmethod def schema(cls: Type[A], *, infer_missing: bool = False, only=None, exclude=(), many: bool = False, context=None, load_only=(), dump_only=(), partial: bool = False, unknown=None) -> SchemaType: Schema = build_schema(cls, DataClassJsonMixin, infer_missing, partial) if unknown is None: undefined_parameter_action = _undefined_parameter_action_safe(cls) if undefined_parameter_action is not None: # We can just make use of the same-named mm keywords unknown = undefined_parameter_action.name.lower() return Schema(only=only, exclude=exclude, many=many, context=context, load_only=load_only, dump_only=dump_only, partial=partial, unknown=unknown)
Methods
def to_dict(self, encode_json=False) ‑> Dict[str, Union[dict, list, str, int, float, bool, ForwardRef(None)]]
-
Expand source code
def to_dict(self, encode_json=False) -> Dict[str, Json]: return _asdict(self, encode_json=encode_json)
def to_json(self, *, skipkeys: bool = False, ensure_ascii: bool = True, check_circular: bool = True, allow_nan: bool = True, indent: Union[int, str, ForwardRef(None)] = None, separators: Tuple[str, str] = None, default: Callable = None, sort_keys: bool = False, **kw) ‑> str
-
Expand source code
def to_json(self, *, skipkeys: bool = False, ensure_ascii: bool = True, check_circular: bool = True, allow_nan: bool = True, indent: Optional[Union[int, str]] = None, separators: Tuple[str, str] = None, default: Callable = None, sort_keys: bool = False, **kw) -> str: return json.dumps(self.to_dict(encode_json=False), cls=_ExtendedEncoder, skipkeys=skipkeys, ensure_ascii=ensure_ascii, check_circular=check_circular, allow_nan=allow_nan, indent=indent, separators=separators, default=default, sort_keys=sort_keys, **kw)
class StationStatus (api: str, sub_api: Optional[str], recording_state: str, app_start_timestamp: float, timestamp: float, synch_enabled: bool, synch_latency: Optional[float], station_id: str, station_uuid: str, authenticated_user: Optional[str], private: bool, sampling_rate: float, bit_depth: Optional[float], sensor_name: str, samples_per_packet: int, additional_sensors: List[Tuple[str, str]], movement_detected: Optional[bool], location_provider: Optional[str], latitude: Optional[float], longitude: Optional[float], altitude: Optional[float], speed: Optional[float], make: str, model: str, os: str, os_version: str, client_version: str, settings: Optional[Dict], network_type: Optional[str], power_state: Optional[str], screen_state: Optional[str], cell_service_state: Optional[str], battery: Optional[float], temperature: Optional[float], network_strength: Optional[float], diffs: Optional[List[Dict]])
-
StationStatus(api: str, sub_api: Optional[str], recording_state: str, app_start_timestamp: float, timestamp: float, synch_enabled: bool, synch_latency: Optional[float], station_id: str, station_uuid: str, authenticated_user: Optional[str], private: bool, sampling_rate: float, bit_depth: Optional[float], sensor_name: str, samples_per_packet: int, additional_sensors: List[Tuple[str, str]], movement_detected: Optional[bool], location_provider: Optional[str], latitude: Optional[float], longitude: Optional[float], altitude: Optional[float], speed: Optional[float], make: str, model: str, os: str, os_version: str, client_version: str, settings: Optional[Dict], network_type: Optional[str], power_state: Optional[str], screen_state: Optional[str], cell_service_state: Optional[str], battery: Optional[float], temperature: Optional[float], network_strength: Optional[float], diffs: Optional[List[Dict]])
Expand source code
@dataclass_json @dataclass class StationStatus: # API status api: str sub_api: Optional[str] # Recording status recording_state: str # Timing status app_start_timestamp: float timestamp: float synch_enabled: bool synch_latency: Optional[float] # Authentication status station_id: str station_uuid: str authenticated_user: Optional[str] private: bool # Audio status sampling_rate: float bit_depth: Optional[float] sensor_name: str samples_per_packet: int # Additional sensor status additional_sensors: List[Tuple[str, str]] # Movement status movement_detected: Optional[bool] # Location status location_provider: Optional[str] latitude: Optional[float] longitude: Optional[float] altitude: Optional[float] speed: Optional[float] # Station info make: str model: str os: str os_version: str client_version: str settings: Optional[Dict] # Station metrics network_type: Optional[str] power_state: Optional[str] screen_state: Optional[str] cell_service_state: Optional[str] battery: Optional[float] temperature: Optional[float] network_strength: Optional[float] diffs: Optional[List[Dict]]
Class variables
var additional_sensors : List[Tuple[str, str]]
var altitude : Optional[float]
var api : str
var app_start_timestamp : float
var authenticated_user : Optional[str]
var battery : Optional[float]
var bit_depth : Optional[float]
var cell_service_state : Optional[str]
var client_version : str
var diffs : Optional[List[Dict]]
var latitude : Optional[float]
var location_provider : Optional[str]
var longitude : Optional[float]
var make : str
var model : str
var movement_detected : Optional[bool]
var network_strength : Optional[float]
var network_type : Optional[str]
var os : str
var os_version : str
var power_state : Optional[str]
var private : bool
var recording_state : str
var samples_per_packet : int
var sampling_rate : float
var screen_state : Optional[str]
var sensor_name : str
var settings : Optional[Dict]
var speed : Optional[float]
var station_id : str
var station_uuid : str
var sub_api : Optional[str]
var synch_enabled : bool
var synch_latency : Optional[float]
var temperature : Optional[float]
var timestamp : float
Static methods
def from_dict(kvs: Union[dict, list, str, int, float, bool, ForwardRef(None)], *, infer_missing=False) ‑> ~A
-
Expand source code
@classmethod def from_dict(cls: Type[A], kvs: Json, *, infer_missing=False) -> A: return _decode_dataclass(cls, kvs, infer_missing)
def from_json(s: Union[str, bytes, bytearray], *, parse_float=None, parse_int=None, parse_constant=None, infer_missing=False, **kw) ‑> ~A
-
Expand source code
@classmethod def from_json(cls: Type[A], s: JsonData, *, parse_float=None, parse_int=None, parse_constant=None, infer_missing=False, **kw) -> A: kvs = json.loads(s, parse_float=parse_float, parse_int=parse_int, parse_constant=parse_constant, **kw) return cls.from_dict(kvs, infer_missing=infer_missing)
def schema(*, infer_missing: bool = False, only=None, exclude=(), many: bool = False, context=None, load_only=(), dump_only=(), partial: bool = False, unknown=None) ‑> dataclasses_json.mm.SchemaF[~A]
-
Expand source code
@classmethod def schema(cls: Type[A], *, infer_missing: bool = False, only=None, exclude=(), many: bool = False, context=None, load_only=(), dump_only=(), partial: bool = False, unknown=None) -> SchemaType: Schema = build_schema(cls, DataClassJsonMixin, infer_missing, partial) if unknown is None: undefined_parameter_action = _undefined_parameter_action_safe(cls) if undefined_parameter_action is not None: # We can just make use of the same-named mm keywords unknown = undefined_parameter_action.name.lower() return Schema(only=only, exclude=exclude, many=many, context=context, load_only=load_only, dump_only=dump_only, partial=partial, unknown=unknown)
Methods
def to_dict(self, encode_json=False) ‑> Dict[str, Union[dict, list, str, int, float, bool, ForwardRef(None)]]
-
Expand source code
def to_dict(self, encode_json=False) -> Dict[str, Json]: return _asdict(self, encode_json=encode_json)
def to_json(self, *, skipkeys: bool = False, ensure_ascii: bool = True, check_circular: bool = True, allow_nan: bool = True, indent: Union[int, str, ForwardRef(None)] = None, separators: Tuple[str, str] = None, default: Callable = None, sort_keys: bool = False, **kw) ‑> str
-
Expand source code
def to_json(self, *, skipkeys: bool = False, ensure_ascii: bool = True, check_circular: bool = True, allow_nan: bool = True, indent: Optional[Union[int, str]] = None, separators: Tuple[str, str] = None, default: Callable = None, sort_keys: bool = False, **kw) -> str: return json.dumps(self.to_dict(encode_json=False), cls=_ExtendedEncoder, skipkeys=skipkeys, ensure_ascii=ensure_ascii, check_circular=check_circular, allow_nan=allow_nan, indent=indent, separators=separators, default=default, sort_keys=sort_keys, **kw)
class StationStatusReq (secret_token: Optional[str], auth_token: str, start_ts_s: float, end_ts_s: float, station_ids: List[str])
-
StationStatusReq(secret_token: Optional[str], auth_token: str, start_ts_s: float, end_ts_s: float, station_ids: List[str])
Expand source code
@dataclass_json @dataclass class StationStatusReq: secret_token: Optional[str] auth_token: str start_ts_s: float end_ts_s: float station_ids: List[str]
Class variables
var auth_token : str
var end_ts_s : float
var secret_token : Optional[str]
var start_ts_s : float
var station_ids : List[str]
Static methods
def from_dict(kvs: Union[dict, list, str, int, float, bool, ForwardRef(None)], *, infer_missing=False) ‑> ~A
-
Expand source code
@classmethod def from_dict(cls: Type[A], kvs: Json, *, infer_missing=False) -> A: return _decode_dataclass(cls, kvs, infer_missing)
def from_json(s: Union[str, bytes, bytearray], *, parse_float=None, parse_int=None, parse_constant=None, infer_missing=False, **kw) ‑> ~A
-
Expand source code
@classmethod def from_json(cls: Type[A], s: JsonData, *, parse_float=None, parse_int=None, parse_constant=None, infer_missing=False, **kw) -> A: kvs = json.loads(s, parse_float=parse_float, parse_int=parse_int, parse_constant=parse_constant, **kw) return cls.from_dict(kvs, infer_missing=infer_missing)
def schema(*, infer_missing: bool = False, only=None, exclude=(), many: bool = False, context=None, load_only=(), dump_only=(), partial: bool = False, unknown=None) ‑> dataclasses_json.mm.SchemaF[~A]
-
Expand source code
@classmethod def schema(cls: Type[A], *, infer_missing: bool = False, only=None, exclude=(), many: bool = False, context=None, load_only=(), dump_only=(), partial: bool = False, unknown=None) -> SchemaType: Schema = build_schema(cls, DataClassJsonMixin, infer_missing, partial) if unknown is None: undefined_parameter_action = _undefined_parameter_action_safe(cls) if undefined_parameter_action is not None: # We can just make use of the same-named mm keywords unknown = undefined_parameter_action.name.lower() return Schema(only=only, exclude=exclude, many=many, context=context, load_only=load_only, dump_only=dump_only, partial=partial, unknown=unknown)
Methods
def to_dict(self, encode_json=False) ‑> Dict[str, Union[dict, list, str, int, float, bool, ForwardRef(None)]]
-
Expand source code
def to_dict(self, encode_json=False) -> Dict[str, Json]: return _asdict(self, encode_json=encode_json)
def to_json(self, *, skipkeys: bool = False, ensure_ascii: bool = True, check_circular: bool = True, allow_nan: bool = True, indent: Union[int, str, ForwardRef(None)] = None, separators: Tuple[str, str] = None, default: Callable = None, sort_keys: bool = False, **kw) ‑> str
-
Expand source code
def to_json(self, *, skipkeys: bool = False, ensure_ascii: bool = True, check_circular: bool = True, allow_nan: bool = True, indent: Optional[Union[int, str]] = None, separators: Tuple[str, str] = None, default: Callable = None, sort_keys: bool = False, **kw) -> str: return json.dumps(self.to_dict(encode_json=False), cls=_ExtendedEncoder, skipkeys=skipkeys, ensure_ascii=ensure_ascii, check_circular=check_circular, allow_nan=allow_nan, indent=indent, separators=separators, default=default, sort_keys=sort_keys, **kw)
class StationStatusResp (station_statuses: List[StationStatus], data_availabilities: List[DataAvailability])
-
StationStatusResp(station_statuses: List[redvox.cloud.metadata_api.StationStatus], data_availabilities: List[redvox.cloud.metadata_api.DataAvailability])
Expand source code
@dataclass_json @dataclass class StationStatusResp: station_statuses: List[StationStatus] data_availabilities: List[DataAvailability]
Class variables
var data_availabilities : List[DataAvailability]
var station_statuses : List[StationStatus]
Static methods
def from_dict(kvs: Union[dict, list, str, int, float, bool, ForwardRef(None)], *, infer_missing=False) ‑> ~A
-
Expand source code
@classmethod def from_dict(cls: Type[A], kvs: Json, *, infer_missing=False) -> A: return _decode_dataclass(cls, kvs, infer_missing)
def from_json(s: Union[str, bytes, bytearray], *, parse_float=None, parse_int=None, parse_constant=None, infer_missing=False, **kw) ‑> ~A
-
Expand source code
@classmethod def from_json(cls: Type[A], s: JsonData, *, parse_float=None, parse_int=None, parse_constant=None, infer_missing=False, **kw) -> A: kvs = json.loads(s, parse_float=parse_float, parse_int=parse_int, parse_constant=parse_constant, **kw) return cls.from_dict(kvs, infer_missing=infer_missing)
def schema(*, infer_missing: bool = False, only=None, exclude=(), many: bool = False, context=None, load_only=(), dump_only=(), partial: bool = False, unknown=None) ‑> dataclasses_json.mm.SchemaF[~A]
-
Expand source code
@classmethod def schema(cls: Type[A], *, infer_missing: bool = False, only=None, exclude=(), many: bool = False, context=None, load_only=(), dump_only=(), partial: bool = False, unknown=None) -> SchemaType: Schema = build_schema(cls, DataClassJsonMixin, infer_missing, partial) if unknown is None: undefined_parameter_action = _undefined_parameter_action_safe(cls) if undefined_parameter_action is not None: # We can just make use of the same-named mm keywords unknown = undefined_parameter_action.name.lower() return Schema(only=only, exclude=exclude, many=many, context=context, load_only=load_only, dump_only=dump_only, partial=partial, unknown=unknown)
Methods
def to_dict(self, encode_json=False) ‑> Dict[str, Union[dict, list, str, int, float, bool, ForwardRef(None)]]
-
Expand source code
def to_dict(self, encode_json=False) -> Dict[str, Json]: return _asdict(self, encode_json=encode_json)
def to_json(self, *, skipkeys: bool = False, ensure_ascii: bool = True, check_circular: bool = True, allow_nan: bool = True, indent: Union[int, str, ForwardRef(None)] = None, separators: Tuple[str, str] = None, default: Callable = None, sort_keys: bool = False, **kw) ‑> str
-
Expand source code
def to_json(self, *, skipkeys: bool = False, ensure_ascii: bool = True, check_circular: bool = True, allow_nan: bool = True, indent: Optional[Union[int, str]] = None, separators: Tuple[str, str] = None, default: Callable = None, sort_keys: bool = False, **kw) -> str: return json.dumps(self.to_dict(encode_json=False), cls=_ExtendedEncoder, skipkeys=skipkeys, ensure_ascii=ensure_ascii, check_circular=check_circular, allow_nan=allow_nan, indent=indent, separators=separators, default=default, sort_keys=sort_keys, **kw)
class TimingMeta (station_id: str, start_ts_os: float, start_ts_mach: float, server_ts: float, mach_time_zero: float, best_latency: float, best_offset: float)
-
Timing metadata extracted from an individual packet.
Expand source code
@dataclass_json @dataclass class TimingMeta: """ Timing metadata extracted from an individual packet. """ station_id: str start_ts_os: float start_ts_mach: float server_ts: float mach_time_zero: float best_latency: float best_offset: float
Class variables
var best_latency : float
var best_offset : float
var mach_time_zero : float
var server_ts : float
var start_ts_mach : float
var start_ts_os : float
var station_id : str
Static methods
def from_dict(kvs: Union[dict, list, str, int, float, bool, ForwardRef(None)], *, infer_missing=False) ‑> ~A
-
Expand source code
@classmethod def from_dict(cls: Type[A], kvs: Json, *, infer_missing=False) -> A: return _decode_dataclass(cls, kvs, infer_missing)
def from_json(s: Union[str, bytes, bytearray], *, parse_float=None, parse_int=None, parse_constant=None, infer_missing=False, **kw) ‑> ~A
-
Expand source code
@classmethod def from_json(cls: Type[A], s: JsonData, *, parse_float=None, parse_int=None, parse_constant=None, infer_missing=False, **kw) -> A: kvs = json.loads(s, parse_float=parse_float, parse_int=parse_int, parse_constant=parse_constant, **kw) return cls.from_dict(kvs, infer_missing=infer_missing)
def schema(*, infer_missing: bool = False, only=None, exclude=(), many: bool = False, context=None, load_only=(), dump_only=(), partial: bool = False, unknown=None) ‑> dataclasses_json.mm.SchemaF[~A]
-
Expand source code
@classmethod def schema(cls: Type[A], *, infer_missing: bool = False, only=None, exclude=(), many: bool = False, context=None, load_only=(), dump_only=(), partial: bool = False, unknown=None) -> SchemaType: Schema = build_schema(cls, DataClassJsonMixin, infer_missing, partial) if unknown is None: undefined_parameter_action = _undefined_parameter_action_safe(cls) if undefined_parameter_action is not None: # We can just make use of the same-named mm keywords unknown = undefined_parameter_action.name.lower() return Schema(only=only, exclude=exclude, many=many, context=context, load_only=load_only, dump_only=dump_only, partial=partial, unknown=unknown)
Methods
def to_dict(self, encode_json=False) ‑> Dict[str, Union[dict, list, str, int, float, bool, ForwardRef(None)]]
-
Expand source code
def to_dict(self, encode_json=False) -> Dict[str, Json]: return _asdict(self, encode_json=encode_json)
def to_json(self, *, skipkeys: bool = False, ensure_ascii: bool = True, check_circular: bool = True, allow_nan: bool = True, indent: Union[int, str, ForwardRef(None)] = None, separators: Tuple[str, str] = None, default: Callable = None, sort_keys: bool = False, **kw) ‑> str
-
Expand source code
def to_json(self, *, skipkeys: bool = False, ensure_ascii: bool = True, check_circular: bool = True, allow_nan: bool = True, indent: Optional[Union[int, str]] = None, separators: Tuple[str, str] = None, default: Callable = None, sort_keys: bool = False, **kw) -> str: return json.dumps(self.to_dict(encode_json=False), cls=_ExtendedEncoder, skipkeys=skipkeys, ensure_ascii=ensure_ascii, check_circular=check_circular, allow_nan=allow_nan, indent=indent, separators=separators, default=default, sort_keys=sort_keys, **kw)
class TimingMetaRequest (auth_token: str, start_ts_s: int, end_ts_s: int, station_ids: List[str], secret_token: Optional[str] = None)
-
Request for timing metadata.
Expand source code
@dataclass_json @dataclass class TimingMetaRequest: """ Request for timing metadata. """ auth_token: str start_ts_s: int end_ts_s: int station_ids: List[str] secret_token: Optional[str] = None
Class variables
var auth_token : str
var end_ts_s : int
var secret_token : Optional[str]
var start_ts_s : int
var station_ids : List[str]
Static methods
def from_dict(kvs: Union[dict, list, str, int, float, bool, ForwardRef(None)], *, infer_missing=False) ‑> ~A
-
Expand source code
@classmethod def from_dict(cls: Type[A], kvs: Json, *, infer_missing=False) -> A: return _decode_dataclass(cls, kvs, infer_missing)
def from_json(s: Union[str, bytes, bytearray], *, parse_float=None, parse_int=None, parse_constant=None, infer_missing=False, **kw) ‑> ~A
-
Expand source code
@classmethod def from_json(cls: Type[A], s: JsonData, *, parse_float=None, parse_int=None, parse_constant=None, infer_missing=False, **kw) -> A: kvs = json.loads(s, parse_float=parse_float, parse_int=parse_int, parse_constant=parse_constant, **kw) return cls.from_dict(kvs, infer_missing=infer_missing)
def schema(*, infer_missing: bool = False, only=None, exclude=(), many: bool = False, context=None, load_only=(), dump_only=(), partial: bool = False, unknown=None) ‑> dataclasses_json.mm.SchemaF[~A]
-
Expand source code
@classmethod def schema(cls: Type[A], *, infer_missing: bool = False, only=None, exclude=(), many: bool = False, context=None, load_only=(), dump_only=(), partial: bool = False, unknown=None) -> SchemaType: Schema = build_schema(cls, DataClassJsonMixin, infer_missing, partial) if unknown is None: undefined_parameter_action = _undefined_parameter_action_safe(cls) if undefined_parameter_action is not None: # We can just make use of the same-named mm keywords unknown = undefined_parameter_action.name.lower() return Schema(only=only, exclude=exclude, many=many, context=context, load_only=load_only, dump_only=dump_only, partial=partial, unknown=unknown)
Methods
def to_dict(self, encode_json=False) ‑> Dict[str, Union[dict, list, str, int, float, bool, ForwardRef(None)]]
-
Expand source code
def to_dict(self, encode_json=False) -> Dict[str, Json]: return _asdict(self, encode_json=encode_json)
def to_json(self, *, skipkeys: bool = False, ensure_ascii: bool = True, check_circular: bool = True, allow_nan: bool = True, indent: Union[int, str, ForwardRef(None)] = None, separators: Tuple[str, str] = None, default: Callable = None, sort_keys: bool = False, **kw) ‑> str
-
Expand source code
def to_json(self, *, skipkeys: bool = False, ensure_ascii: bool = True, check_circular: bool = True, allow_nan: bool = True, indent: Optional[Union[int, str]] = None, separators: Tuple[str, str] = None, default: Callable = None, sort_keys: bool = False, **kw) -> str: return json.dumps(self.to_dict(encode_json=False), cls=_ExtendedEncoder, skipkeys=skipkeys, ensure_ascii=ensure_ascii, check_circular=check_circular, allow_nan=allow_nan, indent=indent, separators=separators, default=default, sort_keys=sort_keys, **kw)
class TimingMetaResponse (items: List[TimingMeta])
-
Response of obtaining timing metadta.
Expand source code
@dataclass_json @dataclass class TimingMetaResponse: """ Response of obtaining timing metadta. """ items: List[TimingMeta]
Class variables
var items : List[TimingMeta]
Static methods
def from_dict(kvs: Union[dict, list, str, int, float, bool, ForwardRef(None)], *, infer_missing=False) ‑> ~A
-
Expand source code
@classmethod def from_dict(cls: Type[A], kvs: Json, *, infer_missing=False) -> A: return _decode_dataclass(cls, kvs, infer_missing)
def from_json(s: Union[str, bytes, bytearray], *, parse_float=None, parse_int=None, parse_constant=None, infer_missing=False, **kw) ‑> ~A
-
Expand source code
@classmethod def from_json(cls: Type[A], s: JsonData, *, parse_float=None, parse_int=None, parse_constant=None, infer_missing=False, **kw) -> A: kvs = json.loads(s, parse_float=parse_float, parse_int=parse_int, parse_constant=parse_constant, **kw) return cls.from_dict(kvs, infer_missing=infer_missing)
def schema(*, infer_missing: bool = False, only=None, exclude=(), many: bool = False, context=None, load_only=(), dump_only=(), partial: bool = False, unknown=None) ‑> dataclasses_json.mm.SchemaF[~A]
-
Expand source code
@classmethod def schema(cls: Type[A], *, infer_missing: bool = False, only=None, exclude=(), many: bool = False, context=None, load_only=(), dump_only=(), partial: bool = False, unknown=None) -> SchemaType: Schema = build_schema(cls, DataClassJsonMixin, infer_missing, partial) if unknown is None: undefined_parameter_action = _undefined_parameter_action_safe(cls) if undefined_parameter_action is not None: # We can just make use of the same-named mm keywords unknown = undefined_parameter_action.name.lower() return Schema(only=only, exclude=exclude, many=many, context=context, load_only=load_only, dump_only=dump_only, partial=partial, unknown=unknown)
Methods
def to_dict(self, encode_json=False) ‑> Dict[str, Union[dict, list, str, int, float, bool, ForwardRef(None)]]
-
Expand source code
def to_dict(self, encode_json=False) -> Dict[str, Json]: return _asdict(self, encode_json=encode_json)
def to_json(self, *, skipkeys: bool = False, ensure_ascii: bool = True, check_circular: bool = True, allow_nan: bool = True, indent: Union[int, str, ForwardRef(None)] = None, separators: Tuple[str, str] = None, default: Callable = None, sort_keys: bool = False, **kw) ‑> str
-
Expand source code
def to_json(self, *, skipkeys: bool = False, ensure_ascii: bool = True, check_circular: bool = True, allow_nan: bool = True, indent: Optional[Union[int, str]] = None, separators: Tuple[str, str] = None, default: Callable = None, sort_keys: bool = False, **kw) -> str: return json.dumps(self.to_dict(encode_json=False), cls=_ExtendedEncoder, skipkeys=skipkeys, ensure_ascii=ensure_ascii, check_circular=check_circular, allow_nan=allow_nan, indent=indent, separators=separators, default=default, sort_keys=sort_keys, **kw)
class XyzMetadata (sensor_name: Optional[str] = None, timestamps_microseconds_utc_count: Optional[int] = None, payload_count: Optional[int] = None, sample_interval_mean: Optional[float] = None, sample_interval_std: Optional[float] = None, sample_interval_median: Optional[float] = None, x_mean: Optional[float] = None, x_std: Optional[float] = None, x_median: Optional[float] = None, y_mean: Optional[float] = None, y_std: Optional[float] = None, y_median: Optional[float] = None, z_mean: Optional[float] = None, z_std: Optional[float] = None, z_median: Optional[float] = None, metadata: Optional[List[str]] = None)
-
Metadata for sensors that have 3-dimensions of data (accelerometer, gyroscope, magenetometer)
Expand source code
@dataclass_json @dataclass class XyzMetadata: """ Metadata for sensors that have 3-dimensions of data (accelerometer, gyroscope, magenetometer) """ sensor_name: Optional[str] = None timestamps_microseconds_utc_count: Optional[int] = None payload_count: Optional[int] = None sample_interval_mean: Optional[float] = None sample_interval_std: Optional[float] = None sample_interval_median: Optional[float] = None x_mean: Optional[float] = None x_std: Optional[float] = None x_median: Optional[float] = None y_mean: Optional[float] = None y_std: Optional[float] = None y_median: Optional[float] = None z_mean: Optional[float] = None z_std: Optional[float] = None z_median: Optional[float] = None metadata: Optional[List[str]] = None
Class variables
var metadata : Optional[List[str]]
var payload_count : Optional[int]
var sample_interval_mean : Optional[float]
var sample_interval_median : Optional[float]
var sample_interval_std : Optional[float]
var sensor_name : Optional[str]
var timestamps_microseconds_utc_count : Optional[int]
var x_mean : Optional[float]
var x_median : Optional[float]
var x_std : Optional[float]
var y_mean : Optional[float]
var y_median : Optional[float]
var y_std : Optional[float]
var z_mean : Optional[float]
var z_median : Optional[float]
var z_std : Optional[float]
Static methods
def from_dict(kvs: Union[dict, list, str, int, float, bool, ForwardRef(None)], *, infer_missing=False) ‑> ~A
-
Expand source code
@classmethod def from_dict(cls: Type[A], kvs: Json, *, infer_missing=False) -> A: return _decode_dataclass(cls, kvs, infer_missing)
def from_json(s: Union[str, bytes, bytearray], *, parse_float=None, parse_int=None, parse_constant=None, infer_missing=False, **kw) ‑> ~A
-
Expand source code
@classmethod def from_json(cls: Type[A], s: JsonData, *, parse_float=None, parse_int=None, parse_constant=None, infer_missing=False, **kw) -> A: kvs = json.loads(s, parse_float=parse_float, parse_int=parse_int, parse_constant=parse_constant, **kw) return cls.from_dict(kvs, infer_missing=infer_missing)
def schema(*, infer_missing: bool = False, only=None, exclude=(), many: bool = False, context=None, load_only=(), dump_only=(), partial: bool = False, unknown=None) ‑> dataclasses_json.mm.SchemaF[~A]
-
Expand source code
@classmethod def schema(cls: Type[A], *, infer_missing: bool = False, only=None, exclude=(), many: bool = False, context=None, load_only=(), dump_only=(), partial: bool = False, unknown=None) -> SchemaType: Schema = build_schema(cls, DataClassJsonMixin, infer_missing, partial) if unknown is None: undefined_parameter_action = _undefined_parameter_action_safe(cls) if undefined_parameter_action is not None: # We can just make use of the same-named mm keywords unknown = undefined_parameter_action.name.lower() return Schema(only=only, exclude=exclude, many=many, context=context, load_only=load_only, dump_only=dump_only, partial=partial, unknown=unknown)
Methods
def to_dict(self, encode_json=False) ‑> Dict[str, Union[dict, list, str, int, float, bool, ForwardRef(None)]]
-
Expand source code
def to_dict(self, encode_json=False) -> Dict[str, Json]: return _asdict(self, encode_json=encode_json)
def to_json(self, *, skipkeys: bool = False, ensure_ascii: bool = True, check_circular: bool = True, allow_nan: bool = True, indent: Union[int, str, ForwardRef(None)] = None, separators: Tuple[str, str] = None, default: Callable = None, sort_keys: bool = False, **kw) ‑> str
-
Expand source code
def to_json(self, *, skipkeys: bool = False, ensure_ascii: bool = True, check_circular: bool = True, allow_nan: bool = True, indent: Optional[Union[int, str]] = None, separators: Tuple[str, str] = None, default: Callable = None, sort_keys: bool = False, **kw) -> str: return json.dumps(self.to_dict(encode_json=False), cls=_ExtendedEncoder, skipkeys=skipkeys, ensure_ascii=ensure_ascii, check_circular=check_circular, allow_nan=allow_nan, indent=indent, separators=separators, default=default, sort_keys=sort_keys, **kw)