battfeed 0.5.0__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- battfeed/__init__.py +53 -0
- battfeed/cli.py +670 -0
- battfeed/config.py +415 -0
- battfeed/harvester.py +285 -0
- battfeed/importer.py +298 -0
- battfeed/ingest_state.py +381 -0
- battfeed/protocols.py +162 -0
- battfeed/registry.py +81 -0
- battfeed/sinks/__init__.py +16 -0
- battfeed/sinks/bdf_csv.py +270 -0
- battfeed/sinks/http_push.py +385 -0
- battfeed/sinks/parquet.py +190 -0
- battfeed/sinks/routing.py +412 -0
- battfeed/sources/__init__.py +22 -0
- battfeed/sources/android/__init__.py +10 -0
- battfeed/sources/android/adb.py +135 -0
- battfeed/sources/android/parser.py +267 -0
- battfeed/sources/android/source.py +291 -0
- battfeed/sources/csvtail.py +125 -0
- battfeed/sources/dji/__init__.py +12 -0
- battfeed/sources/dji/gate.py +354 -0
- battfeed/sources/dji/parser.py +183 -0
- battfeed/sources/dji/source.py +322 -0
- battfeed/sources/mc3000/__init__.py +13 -0
- battfeed/sources/mc3000/protocol.py +331 -0
- battfeed/sources/mc3000/reader.py +71 -0
- battfeed/sources/mc3000/source.py +250 -0
- battfeed/sources/mc3000/transports/__init__.py +32 -0
- battfeed/sources/mc3000/transports/base.py +48 -0
- battfeed/sources/mc3000/transports/ble.py +231 -0
- battfeed/sources/mc3000/transports/mock.py +181 -0
- battfeed/sources/mc3000/transports/usb.py +88 -0
- battfeed/sources/simulator.py +82 -0
- battfeed/sources/streaming.py +420 -0
- battfeed/sources/wmi_battery.py +86 -0
- battfeed/testing/__init__.py +22 -0
- battfeed/testing/contract.py +221 -0
- battfeed/testing/replay.py +322 -0
- battfeed-0.5.0.dist-info/METADATA +564 -0
- battfeed-0.5.0.dist-info/RECORD +45 -0
- battfeed-0.5.0.dist-info/WHEEL +5 -0
- battfeed-0.5.0.dist-info/entry_points.txt +10 -0
- battfeed-0.5.0.dist-info/licenses/LICENSE +201 -0
- battfeed-0.5.0.dist-info/licenses/NOTICE +5 -0
- battfeed-0.5.0.dist-info/top_level.txt +1 -0
battfeed/__init__.py
ADDED
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
"""battfeed turns live battery data sources into BDF (Battery Data Format) feeds.
|
|
2
|
+
|
|
3
|
+
Acquisition layer of the open battery-data stack: implement a
|
|
4
|
+
:class:`DataSource`, point a :class:`Harvester` at it, and get conforming
|
|
5
|
+
``.bdf.csv`` files out. Normalisation of exported vendor files is the job
|
|
6
|
+
of the ``batterydf`` package (Battery Data Alliance), not of battfeed.
|
|
7
|
+
"""
|
|
8
|
+
|
|
9
|
+
from importlib.metadata import PackageNotFoundError, version
|
|
10
|
+
|
|
11
|
+
try:
|
|
12
|
+
__version__ = version("battfeed")
|
|
13
|
+
except PackageNotFoundError: # running from a source tree without installation
|
|
14
|
+
__version__ = "0.5.0"
|
|
15
|
+
|
|
16
|
+
from .config import Config, ConfigError, load_config
|
|
17
|
+
from .harvester import CollectStats, ErrorPolicy, Harvester, SourceFailure
|
|
18
|
+
from .importer import ImportStats, run_import
|
|
19
|
+
from .ingest_state import ImportLedger
|
|
20
|
+
from .protocols import RESERVED_KEYS, DataSource, Sample, SampleValue, Sink
|
|
21
|
+
from .registry import available_sources, create_source
|
|
22
|
+
from .sinks.bdf_csv import BdfCsvSink
|
|
23
|
+
from .sinks.http_push import HttpPushSink
|
|
24
|
+
from .sinks.parquet import ParquetSink
|
|
25
|
+
from .sinks.routing import RoutingSink
|
|
26
|
+
from .sources.streaming import DeadReaderError, StreamingSource
|
|
27
|
+
|
|
28
|
+
__all__ = [
|
|
29
|
+
"DataSource",
|
|
30
|
+
"Sink",
|
|
31
|
+
"Sample",
|
|
32
|
+
"SampleValue",
|
|
33
|
+
"RESERVED_KEYS",
|
|
34
|
+
"Config",
|
|
35
|
+
"ConfigError",
|
|
36
|
+
"load_config",
|
|
37
|
+
"Harvester",
|
|
38
|
+
"CollectStats",
|
|
39
|
+
"ErrorPolicy",
|
|
40
|
+
"SourceFailure",
|
|
41
|
+
"ImportLedger",
|
|
42
|
+
"ImportStats",
|
|
43
|
+
"run_import",
|
|
44
|
+
"StreamingSource",
|
|
45
|
+
"DeadReaderError",
|
|
46
|
+
"BdfCsvSink",
|
|
47
|
+
"RoutingSink",
|
|
48
|
+
"HttpPushSink",
|
|
49
|
+
"ParquetSink",
|
|
50
|
+
"available_sources",
|
|
51
|
+
"create_source",
|
|
52
|
+
"__version__",
|
|
53
|
+
]
|