A SQL client software package, mainly for use in Jupyter Notebook environment
Project description
Sql DB Client
Provides additional functionalities to work with DBMS utilizing mainly 2 powerful packages sqlalchemy and pandas.
The main goal to replace basic SQL client software application (e.g. DBeaver). Especially helpful for people who are used to work with pandas and its powerful abilities in terms of analytical research. Designed mainly to use alongside with Jupyter Notebook (i.e. GUI environment but endless abilities of Python and its libraries).
Basically, it is a wrapper around pd.DataFrame().to_sql function and sqlalchemy functionalities such as transaction management with the following features:
-
detailed logging with query execution time collecting (also can be saved to file to keep track of your every action as long as need)
-
easy transaction management
with sql_executor: sql_executor.execute_query('CREATE VIEW temp_view AS SELECT 1 AS num') temp_view = sql_executor.read_query('SELECT * FROM temp_view') ...
-
query results management using SQLLite database (i.e. a file near your Python script)
-
UUID for each query run (to easily get any executed query result; to work with one database from different scripts with no need to synchronization)
-
query start and finish time, duration
-
result (a pandas DataFrame for read query)
You do not need to save your select results into csv and excel in order to look at them in the future. They will be avaiable as long as you need in your own file-based database.
-
-
(optional) pandas DataFrame enhancements in Jupyter (such as displaying DataFrame with all rows and columns and full colwidth by simply calling its one method)
-
query pre-processing (e.g. automatically adding set LIMIT value to the end of every select query in order to prevent memory overuse)
-
async query execution, you can easily run your query in background
await sql_async_planner.plan_execution('SELECT 1 AS a') result = await sql_async_planner.get_result()
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
Built Distribution
Hashes for sqldbclient-0.0.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 29fd8539ddeaa0f64b69e67a3d4999fbeb6692bf872eea965add85f65af251e3 |
|
MD5 | c4017f4876402827f49f7fea92eea06c |
|
BLAKE2b-256 | e6c04e7ab450d5c9372b49ccc279319d46f39ccf789c5f0e51125f8d96e62815 |