Access Point Module to CSSAW Database
Project description
CSSAW_Central
Installation
pip install CSSAW-Central
Usage
Session object acts as a wrapper for sqlalchemy connection. The connection is created and stored in the Session object at initialization, and any results can be taken from the self.conn object or, if using execute_sql(), can be taken from the returned results python list.
Example:
from cssaw_central import Session
sess = Session('test','test', 'localhost', db='Test')
sess.create_table('test_table', ['column1', 'column2', 'column3'], \
['int', 'int', 'int'], ['True', 'False', 'False'])
sess.insert('test_table', ['column1', 'column2', 'column3'], [0, 1, 2])
print(sess.execute_SQL('./queries/test.sql'))
The above script will create a connection to the Test database at localhost:3306 (assuming that it exists), insert the given values into their appropriate columns in test_table, and then execute test.sql from the queries file, which in this case selects the first value in column1 that has just been added.
To Do:
- Stripped implementation of SELECT
- Stripped implementation of UPDATE
- Stripped implementation of JOIN
License
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
cssaw_central-1.0.0.tar.gz
(3.2 kB
view hashes)
Built Distribution
Close
Hashes for cssaw_central-1.0.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 993dfead00d2e3691c6bdfcb90d7699af6f49da1650f2f6ddbe8161ef7ae0e18 |
|
MD5 | df7e9fa898bef64d113e2dbe4473dc60 |
|
BLAKE2b-256 | 8d4f7f7d7d8f4c2e976e764a95e9ed3268edec32c8a3305d1d788fd7e692a4fb |