A db interface.
Project description
db_frostyfeet909
Provides methods to work with a queue pool from SQL alchemy.
Example
import db_frostyfeet909 as db
connection = db.Connection('postgresql+psycopg2://{USERNAME}:{PASSWORD}@{IP}/{DATABASE}')
connection.create_database()
connection.execute_query("CREATE TABLE test (key INT PRIMARY KEY, value TEXT);")
connection.execute_query("INSERT INTO test (key, value) VALUES (1, 'first');")
connection.execute_query("INSERT INTO test (key, value) VALUES (2, 'second');")
first_key = {"key": 1}
first_value = connection.execute_query_result_single("SELECT value FROM test WHERE key = :key LIMIT 1;", first_key)["value"]
print("The first value is: {0}".format(first_value))
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
db_frostyfeet909-0.0.8.tar.gz
(15.4 kB
view hashes)
Built Distribution
Close
Hashes for db_frostyfeet909-0.0.8-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | e1661718723b83be38e4eae3463b71cb8781bbda30c0183a58f48a31a85ac219 |
|
MD5 | 47eab21a3951098208b0b9aa4c213486 |
|
BLAKE2b-256 | 890378604e4f029f076732dda866e726f72fbb363ed39e169ef044516a27bf4a |