Generate and load SQL tables based on JSON Table Schema descriptors.
Package implements Tabular Storage interface.
SQLAlchemy is used as sql wrapper. We can get storage this way:
from sqlalchemy import create_engine
from jsontableschema_sql import Storage
engine = create_engine('sqlite:///:memory:', prefix='prefix')
storage = Storage(engine)
Then we could interact with storage:
storage.tables
storage.check('table_name') # check existence
storage.create('table_name', schema)
storage.delete('table_name')
storage.describe('table_name') # return schema
storage.read('table_name') # return data
storage.write('table_name', data)
schema.json -> SQL table schema
data.csv -> SQL talbe data
SQLAlchemy is used - docs.
API documentation is presented as docstings:
Please read the contribution guideline:
Thanks!