{"repo":"zx80/anodb","free":true,"listed":false,"github":"https://github.com/zx80/anodb","clone":"git clone https://github.com/zx80/anodb.git","description":"Convenient Wrapper around aiosql and a Database Connection.","language":"Python","stars":34,"topics":["aiosql","database","python","sql"],"license":null,"category":"databases-storage","readme_excerpt":"AnoDB Convenient Wrapper around aiosql and a Database Connection. Description This class creates a persistent database connection and imports SQL queries from a file as simple Python functions. If the connection is broken, a new connection is attempted with increasing throttling delays. Compared to aiosql , the point is not to need to pass a connection as an argument on each call: The DB class embeds both connection and query methods. For concurrent programming (threads, greenlets…), a relevant setup should also consider thread-locals and pooling issues at some higher level. Example Install the module with pip install anodb or whatever method you like. Once available: With file test.sql to define parametric queries such as: Documentation The anodb module provides the DB class which embeds both a PEP 249 database connection (providing methods commit , rollback , cursor , close and its connect counterpart to re-connect) and SQL queries wrapped into dynamically generated functions by aiosql. Such functions may be loaded from a string ( add queries from str ) or a path ( add queries from path ). The DB constructor main parameters are: - db the name of the database driver: sqlite3 , psycopg , pymysql , see aiosql documentation for a list of supported drivers. - conn an optional connection string used to initiate a connection with the driver. For instance, psycopg accepts a libpq connection string such as: \"host=db1.my.org port=5432 dbname=acme user=calvin …\" . - queries a path nam","default_branch":null,"files":null,"tree":[],"storefront":"/r/zx80","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/zx80/anodb/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}