In-memory Backend (cyclus.memback)

An in-memory Python backend for Cyclus.

class cyclus.memback.MemBack

An in-memory Python backend database.

Note that even though the underlying C++ class is a RecBackend, the Python wrapper inherits from FullBackend and the QueryableBackend interface in implemented in Cython.


registry : set, bool, or None, optional

The initial registry to start the backend with. Defaults is True, which stores all of the tables.

fallback : QueryableBackend-like, optional

A backend, which implements query(), that this backend can use to look up values if the table is not in the current cache.


Closes the backend, flushing it in the process.


No-op since in-memory.


The name of the database.


Queries a database table.


table : str

The table name.

conds : iterable, optional

A list of conditions.


results : pd.DataFrame

Pandas DataFrame the represents the table. If None is returned, the table could not be found.


A set of table names to store when store_all_tables is true. Setting this to True will store all tables. Setting this to None or False will clear all currently registered table names. Otherwise, Setting this to a set of strings will restrict the storage to just the specified tables. Setting the registry will also clear old cache values.


Whether or not the backend will store all tables or only those in the registry.


Retrieves the set of tables present in the database.