RunsStoreΒΆ

Defined in dccd.storage.runs_sqlite

class RunsStore(db_path)[source]

Bases: object

Append-only SQLite store for JobRun records.

Parameters:
db_pathstr or Path

Path to the SQLite database file. Created if absent.

Examples

>>> import tempfile, os
>>> with tempfile.NamedTemporaryFile(suffix='.db', delete=False) as f:
...     path = f.name
>>> store = RunsStore(path)
>>> store.create_run('r1', 'backfill:binance:BTC/USDT:ohlc', 'backfill', 'binance', 'BTC/USDT', 'ohlc')
>>> os.unlink(path)