The easiest way to work with simple SQLite tables.
Project description
DBasTable
A simplier way to access SQLite tables, just like Numpy structured arrarys or Pandas dataframes.
>>> from dbastable import SQLDatabase
>>> db = SQLDatabase('test.db', autocommit=True)
>>> db.add_table('table1')
>>> db['table1']['col1'] = [1, 2, 3, 4]
>>> db['table1']['col2'] = ['a', 'b', 'c', 'd']
>>> print(db['table1'][2].values)
(3, 'c')
Its design is based mainly in the way you interact with Numpy structured arrays, Pandas dataframes and Astropy Tables, while keep the possibility of non-volatile and in-disk data storage.
What is it for?
The design of this package was made for very simple interactions with Python's sqlite implementation, so you can interact with sqlite databases without know SQL commands. So, if you need to work with simple tables, composed by columns of data in standard python formats and don't want to perform SQL queries manually, may be this package is for you.
What is it NOT for?
As menioned above, we intended to perform only simple operations with this package. So, we intentionally limited the functionality. Do not expect perform complex queries here. This package is for simplicity. There are several alternatives that are more feature-complete.
Do not use in large production
I'm not a SQL master, nor a digital security guru. I'm an astrophysicist that do some python. So, if you want to use it, use with care.
Install and Documentation
Installation
The easiest way to install dbastable is via pip
pip install dbastable
Alternatively, you can clone the repository and install it manually:
git clone
cd dbastable
pip install -U .
or
pip install -U git+https://github.com/juliotux/dbastable
Development version is also available in pip:
pip install -U --pre dbastable
Documentation
The documentation is available at https://dbastable.readthedocs.io/en/latest/
License
dbastable
is licensed under the terms of the MIT license. See the file LICENSE
for information on the history of this software, terms & conditions for usage, and a DISCLAIMER OF ALL WARRANTIES.
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
Built Distribution
File details
Details for the file dbastable-0.5.dev1.tar.gz
.
File metadata
- Download URL: dbastable-0.5.dev1.tar.gz
- Upload date:
- Size: 40.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 69ddc40f2dd3bdaf18be58f3c72a0d7659421b608403c864c284c1d134728285 |
|
MD5 | bc706ca51c29b639a5ba4a9ac103b582 |
|
BLAKE2b-256 | cfce08cbf67fc5b19759485d597b079dfaa589c03fd4cc8f0c5a66b1349bb7c6 |
File details
Details for the file dbastable-0.5.dev1-py3-none-any.whl
.
File metadata
- Download URL: dbastable-0.5.dev1-py3-none-any.whl
- Upload date:
- Size: 29.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3a018709a48327bc28b98ac13478030a6456f785792a7f9d7587535124f3859e |
|
MD5 | 9ece67da123f927a6a046370f9cd4af0 |
|
BLAKE2b-256 | ab2b8f13c4ae519a1f504042419456dbf3a4a90f49561bbc734214af273f15e3 |