vallenae.io.TrfDatabase

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

IO Wrapper for trfdb (transient feature) database file.

Attributes

connected

Check if connected to SQLite database.

filename

Filename of database.

Methods

__init__(filename[, mode])

Open trfdb database file.

close()

Close database connection.

columns()

Columns of data table.

connection()

Get SQLite connection object.

create(filename)

Create empty trfdb.

fieldinfo()

Read fieldinfo table.

globalinfo()

Read globalinfo table.

iread(*[, trai, query_filter])

Stream features with returned iterable.

listen([existing, wait, query_filter])

Listen to database changes and return new records.

read(**kwargs)

Read features to Pandas DataFrame.

rows()

Number of rows in data table.

tables()

Get table names.

write(feature_set)

Write feature record to trfdb.

write_fieldinfo(field, info)

Write to fieldinfo table.