The ionize Database

class ionize.Database(source=None)[source]

A database containing ion information.

data

attrgetter(attr, ...) –> attrgetter object

Return a callable object that fetches the given attribute(s) from its operand. After f = attrgetter(‘name’), the call f(r) returns r.name. After g = attrgetter(‘name’, ‘date’), the call g(r) returns (r.name, r.date). After h = attrgetter(‘name.first’, ‘name.last’), the call h(r) returns (r.name.first, r.name.last).

keys()[source]

Return the keys of the database as a list.

load(name)[source]

Return an ion from the database based on the name.

search(searchstring)[source]

Return each name in the database that matches the searchstring.

The searchstring can be a regular expression.

serialize()[source]

Return a JSON formatted serialization of the database.

source

attrgetter(attr, ...) –> attrgetter object

Return a callable object that fetches the given attribute(s) from its operand. After f = attrgetter(‘name’), the call f(r) returns r.name. After g = attrgetter(‘name’, ‘date’), the call g(r) returns (r.name, r.date). After h = attrgetter(‘name.first’, ‘name.last’), the call h(r) returns (r.name.first, r.name.last).