semvec/pypi-packages huggingface dataset:
esqlite 0.0.1
esqlite means 'easy sqlite', is a sqlite3 wrapper.
License: MIT Licence
Keywords: pip,esqlite

# esqlite
esqlite means 'easy sqlite', is a sqlite3 wrapper.
method 'execute' for execute any SQL and return result set.
method 'batch_save' for batch insert dict list data. Table will be created if the table not exists.

## install
```cmd
pip install esqlite
```

## example
```python
import esqlite

db = esqlite.DB('test.db')
data = [{'id': 1, 'name': 'Bob'}, {'id': 2, 'name': 'Lena'}]
# batch save, default init table with dict keys
db.batch_save('user', data, cleanup=True)
# insert
db.execute('insert into user(id, name) values (?,?)', [3, 'C++'])
print(db.execute('select * from user'))
# update
db.execute('update user set name=? where id=?', ['Python', 3])
print(db.execute('select * from user'))
# delete
db.execute('delete from user where id=?', [3])
# find
print(db.execute('select * from user order by id desc'))

```
file `test.db` will be created and console will print:
```text
[{'id': 1, 'name': 'Bob'}, {'id': 2, 'name': 'Lena'}, {'id': 3, 'name': 'C++'}]
[{'id': 1, 'name': 'Bob'}, {'id': 2, 'name': 'Lena'}, {'id': 3, 'name': 'Python'}]
[{'id': 2, 'name': 'Lena'}, {'id': 1, 'name': 'Bob'}]
```
edata 0.0.1
edata means 'easy data', is a wrapper of csv, xlrd, xlwt, pylightxl
License: MIT Licence
Keywords: pip,edata

# edata
edata means 'easy data', is a wrapper of csv, xlrd, xlwt, pylightxl.
edata can be used to read csv, xls, xlsx format file as dict list data and write dict list data to those format file.


## install
```cmd
pip install edata
```

## example
```python
import edata

data_list = [{'id': 1, 'name': 'Lena'},
             {'id': 2, 'name': 'Java'},
             {'id': 3, 'name': 'Gaga'}]

# write data to file
edata.write('test.csv', data_list[0:100])
edata.write('test.xls', data_list[0:100])
edata.write('test.xlsx', data_list[0:100])
# read data from file
print(edata.read('test.csv'))
print(edata.read('test.xls'))
print(edata.read('test.xlsx'))
# get sheet names
print(edata.get_sheet_names('test.xls'))
print(edata.get_sheet_names('test.xlsx'))

```
3 file will be created and console will print:
```text
[{'id': '1', 'name': 'Lena'}, {'id': '2', 'name': 'Java'}, {'id': '3', 'name': 'Gaga'}]
[{'id': 1, 'name': 'Lena'}, {'id': 2, 'name': 'Java'}, {'id': 3, 'name': 'Gaga'}]
[{'id': 1, 'name': 'Lena'}, {'id': 2, 'name': 'Java'}, {'id': 3, 'name': 'Gaga'}]
['Sheet1']
['Sheet1']
```