Python client for SQL
Project description
sqlclient
sqlclient
implements abstract classes for clients to SQL-like services. A concrete subclass would use a DB-API compliant client package for the service, and mostly need to work out how to establish a connection to the server. Subsequently, all the convenient functions provided by sqlclient
would work. The subclass may add methods that are specific to the particular type of database.
Both sync and async methods are provided. The async methods are implemented using the sync methods and a thread pool, hence do not require the client package to have async capabilities.
A concrete implementation is provided for sqlite
, which also facilitates tests.
One use case of this package is to facilitate a consistent usage pattern when a single project uses multiple databases.