dataclasses
¶
Module Contents¶
Classes¶
Class to hold data object from ODC |
|
Table of values from json-formatted data |
|
Class to generate numpy function from resource |
|
Table that can be queried for given x and y value. |
|
Class to hold data object from ODC |
|
Class returning TAP service using the pyvo package. |
|
Class for handling wave audio files from KM3NeT hydrophones |
|
Helper to handle hdf5 headers |
Functions¶
|
function to display contents of list of dictionaries as table. |
|
Formatting the json string to make it useable from json.loads |
|
Reformat dictionary with entries of similar keys to unnested dictionary |
-
class
dataclasses.
KM3Object
[source]¶ Class to hold data object from ODC
-
class
dataclasses.
Table
[source]¶ Bases:
dataclasses.KM3Object
Table of values from json-formatted data
-
class
dataclasses.
Function
[source]¶ Bases:
dataclasses.KM3Object
Class to generate numpy function from resource
-
class
dataclasses.
LookUpTable
[source]¶ Bases:
dataclasses.KM3Object
Table that can be queried for given x and y value.
-
class
dataclasses.
HDFTable
[source]¶ Bases:
dataclasses.KM3Object
Class to hold data object from ODC
-
class
dataclasses.
SCSServiceVO
[source]¶ Bases:
dataclasses.KM3Object
Class returning TAP service using the pyvo package.
For further use of pyvo, see https://pyvo.readthedocs.io/en/latest/
-
class
dataclasses.
AudioWave
[source]¶ Bases:
dataclasses.KM3Object
Class for handling wave audio files from KM3NeT hydrophones
-
dataclasses.
print_nice
(inlist, selection={'Identifier': 'odcid', 'Title': 'title', 'Description': 'description'})[source]¶ function to display contents of list of dictionaries as table. Option ‘selection’ takes dictionary with pairs of (columnname, key).
-
class
dataclasses.
BytesEncoder
(*, skipkeys=False, ensure_ascii=True, check_circular=True, allow_nan=True, sort_keys=False, indent=None, separators=None, default=None)[source]¶ Bases:
json.JSONEncoder
Helper to handle hdf5 headers
-
default
(self, obj)[source]¶ Implement this method in a subclass such that it returns a serializable object for
o
, or calls the base implementation (to raise aTypeError
).For example, to support arbitrary iterators, you could implement default like this:
def default(self, o): try: iterable = iter(o) except TypeError: pass else: return list(iterable) # Let the base class default method raise the TypeError return JSONEncoder.default(self, o)
-