Python No SQL SQLite Wrapper
Project description
WrapLite
Python No SQL SQLite Wrapper
Installation
pip install wraplite
Usage
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))
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
wraplite-0.2.3.dev21.tar.gz
(4.1 kB
view hashes)
Built Distribution
Close
Hashes for wraplite-0.2.3.dev21-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3222e2b317ba26578fc37e7f389387879b249d49b1e833a8d60a7d3d59067b2f |
|
MD5 | 5a6b9a96c0d6d4d3b197e6d00a7c0ac9 |
|
BLAKE2b-256 | b0afdd833ed2a9ec13ac901bc55015399d4c01cb8a0d0d2ab6b440685ce808a1 |