Skip to content

Generate SQL tables, load and extract data, based on JSON Table Schema descriptors.

License

Notifications You must be signed in to change notification settings

sirex/jsontableschema-sql-py

 
 

Repository files navigation

jsontableschema-sql-py

Travis Coveralls PyPi Gitter

Generate and load SQL tables based on JSON Table Schema descriptors.

Tabular Storage

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)

Mappings

schema.json -> SQL table schema
data.csv -> SQL talbe data

Drivers

SQLAlchemy is used - docs.

Documentation

API documentation is presented as docstings:

Contributing

Please read the contribution guideline:

How to Contribute

Thanks!

About

Generate SQL tables, load and extract data, based on JSON Table Schema descriptors.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Python 97.6%
  • Makefile 2.4%