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.7.tar.gz
(15.2 kB
view hashes)
Built Distribution
Close
Hashes for db_frostyfeet909-0.0.7-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 37fb02c7c7ea982e97d664b90c3e47a9da70a1da8d997b6cb6b74295c17a47bf |
|
MD5 | b031174aca8a3a404d8125ca2e7e52c3 |
|
BLAKE2b-256 | 95c58ba1605167e1dc60a9a03c68af842d97071be9538d0d82c2d16235dafcbe |