SQLite
SQLite#
Capability |
Support |
---|---|
Persistence |
✓ |
Files |
✗ |
Simulation |
✗ |
Cache |
✗ |
The SQLite wrapper can store ontology individuals using several tables in an SQLite database file. It is actually just a special case of the more feature-rich SQLAlchemy wrapper. The SQLite wrapper is included with SimPhoNy and available under simphony_osp.wrappers.SQLite
.
[1]:
from simphony_osp.wrappers import SQLite
⠀
Configuration
The configuration string for the SQLite wrapper is the path to the database file to be used. To use the wrapper, just call it providing the two arguments that SimPhoNy wrappers require: the configuration string and the create
argument.
[2]:
sqlite = SQLite('database.db', True)
Tip
Keep in mind that the SQLite wrapper really just calls the SQLAlchemy wrapper adding the suffix sqlite:///
to the given configuration string.