Metadata-Version: 2.1
Name: wraplite
Version: 0.2.3.dev29
Summary: Python No SQL SQLite Wrapper
Home-page: https://github.com/ruipiresc/ruipiresc.python.wraplite
Author: Rui Pires
Author-email: ruipiresc@gmail.com
License: GPLv3
Keywords: nosql sqlite wrapper wraplite sql
Platform: UNKNOWN
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: GNU General Public License v3 (GPLv3)
Classifier: Natural Language :: English
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: Implementation :: PyPy
Classifier: Programming Language :: SQL
Classifier: Topic :: Utilities
Requires-Python: >=3.8
Description-Content-Type: text/markdown
Requires-Dist: pandas

# WrapLite
Python No SQL SQLite Wrapper

## Installation

```
pip install wraplite
```

## Usage

```python
import wraplite as wl
import datetime as dt
import pandas as pd

# get will automatically create the database if need
simpsons = wl.get('simpsons')

# table definition without any SQL knowledge
simpsons.create_table('sons', wl.TableFormat(
    id = str,
    name = str,
    email = str,
    birthday = dt.date,
    address = str,
).primary_keys(['id']))

data = []
data.append({
  'id': 1,
  'name': 'Bart',
  'email': 'bart@simpsons.com',
  'birthday': dt.date('23-02-1980'),
  'address': '742 Evergreen Terrace in Springfield',
})
data.append({
  'id': 2,
  'name': 'Lisa',
  'email': 'lisa@simpsons.com',
  'birthday': dt.date('09-05-1981'),
  'address': '742 Evergreen Terrace in Springfield',
})

# insert to table with any pandas DataFrame that respect the table format
simpsons.sons.insert(pd.DataFrame(data))
```


