Skip to content

Commit

Permalink
[#18] renamed module to jsontableschema_sql
Browse files Browse the repository at this point in the history
  • Loading branch information
roll committed Mar 5, 2016
1 parent d8dc498 commit 36feb3c
Show file tree
Hide file tree
Showing 9 changed files with 9 additions and 9 deletions.
8 changes: 4 additions & 4 deletions README.md
Expand Up @@ -12,19 +12,19 @@ Package implements [Tabular Storage](https://github.com/okfn/datapackage-storage
SQLAlchemy is used as sql wrapper. We can get storage this way:

```python
import jtssql
from sqlalchemy import create_engine
from jsontableschema_sql import Storage

engine = create_engine('sqlite:///:memory:', prefix='prefix')
storage = jtssql.Storage(engine)
storage = Storage(engine)
```

Then we could interact with storage:

```python
storage.tables
storage.check('table_name') # check existence
storage.create('table_name', shema)
storage.create('table_name', schema)
storage.delete('table_name')
storage.describe('table_name') # return schema
storage.read('table_name') # return data
Expand All @@ -45,7 +45,7 @@ SQLAlchemy is used - [docs](http://www.sqlalchemy.org/).
## Documentation

API documentation is presented as docstings:
- [Storage](https://github.com/okfn/jsontableschema-sql-py/blob/master/jtssql/storage.py)
- [Storage](https://github.com/okfn/jsontableschema-sql-py/blob/master/jsontableschema_sql/storage.py)

## Contributing

Expand Down
4 changes: 2 additions & 2 deletions examples/base.py
Expand Up @@ -8,14 +8,14 @@
from sqlalchemy import create_engine

sys.path.insert(0, '.')
import jtssql
from jsontableschema_sql import Storage


def run(url, prefix, table, schema, data):

# Storage
engine = create_engine(url)
storage = jtssql.Storage(engine=engine, prefix=prefix)
storage = Storage(engine=engine, prefix=prefix)

# Check table
if storage.check(table):
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion setup.py
Expand Up @@ -18,7 +18,7 @@ def read(*paths):


# Prepare
PACKAGE = 'jtssql'
PACKAGE = 'jsontableschema_sql'
INSTALL_REQUIRES = [
'six',
'sqlalchemy',
Expand Down
2 changes: 1 addition & 1 deletion tests/module/test_storage.py
Expand Up @@ -8,7 +8,7 @@
import unittest
from mock import MagicMock, patch, ANY
from importlib import import_module
module = import_module('jtssql.storage')
module = import_module('jsontableschema_sql.storage')


class TestTable(unittest.TestCase):
Expand Down
2 changes: 1 addition & 1 deletion tox.ini
@@ -1,5 +1,5 @@
[tox]
package=jtssql
package=jsontableschema_sql
skip_missing_interpreters=true
envlist=
py27
Expand Down

0 comments on commit 36feb3c

Please sign in to comment.