vallenae.io.PriDatabase

class vallenae.io.PriDatabase(filename, mode='ro')[source]

IO Wrapper for pridb database file.

Attributes

connected

Check if connected to SQLite database.

filename

Filename of database.

Methods

__init__(filename[, mode])

Open pridb database file.

channel()

Get list of channels.

close()

Close database connection.

columns()

Columns of data table.

connection()

Get SQLite connection object.

create(filename)

Create empty pridb.

fieldinfo()

Read fieldinfo table.

globalinfo()

Read globalinfo table.

iread_hits(*[, channel, time_start, ...])

Stream hits with returned iterable.

iread_markers(*[, time_start, time_stop, ...])

Stream markers with returned iterable.

iread_parametric(*[, time_start, time_stop, ...])

Stream parametric data with returned iterable.

iread_status(*[, channel, time_start, ...])

Stream status data with returned iterable.

listen([existing, wait, query_filter])

Listen to database changes and return new records.

read(**kwargs)

Read all data set types (hits, markers, parametric data, status data) from pridb to Pandas DataFrame.

read_hits(**kwargs)

Read hits to Pandas DataFrame.

read_markers(**kwargs)

Read marker to Pandas DataFrame.

read_parametric(**kwargs)

Read parametric data to Pandas DataFrame.

read_status(**kwargs)

Read status data to Pandas DataFrame.

rows()

Number of rows in data table.

tables()

Get table names.

write_fieldinfo(field, info)

Write to fieldinfo table.

write_hit(hit)

Write hit to pridb.

write_marker(marker)

Write marker to pridb.

write_parametric(parametric)

Write parametric data to pridb.

write_status(status)

Write status data to pridb.