No project description provided
Project description
milho-multi-sqlite3-manager
Description
The idea is to have an environment with multiple SQLITE3 files, aiming at ease of access and use. The inspiration for creating this module came from the ease of working with Spark in BigData environments where, generally, everything is integrated, without the need to make several explicit connections in the code.
If you want an integrated environment on your machine, create an environment variable called "MULTISQLITE3MANAGER_FOLDER_PATH" with the directory of your folder. You will need to make sure that all files in this folder are SQLITE3 databases.
When "to_dataframe" is used, the result is a Pandas DataFrame. The query is previously parsed to map all the databases used in the SQL. Then the module create a sqlalchemy connection and attach that databases to the connection. After that, the query is executed and the result is a Pandas DataFrame.
Code Samples
from multisqlite3manager import print_databases, print_tables, to_dataframe
print_databases()
print_tables("DB_NAME")
df = to_dataframe("SELECT * FROM db_1.tMisto")
df2 = to_dataframe("SELECT * FROM db_2_copy.tMisto")
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
Built Distribution
Hashes for milho_multi_sqlite3_manager-0.2.1.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0deeeb0e08fa5d78ecdb5986e6b455405b6749f4ec63c1da6a59dc609107b68b |
|
MD5 | 7ea304964197293b50f22774c647b7c3 |
|
BLAKE2b-256 | 970cf31271927d89f1f109e295ef2de18643cb30421624e961b104805ccae3da |
Hashes for milho_multi_sqlite3_manager-0.2.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 491347c4f7edd353752753a419d96dcd5e6ae19efd23a357ef65dc8127853bd9 |
|
MD5 | 54fee5c893d36fe9634e7060387f26e9 |
|
BLAKE2b-256 | f1a46ccb8379cd5f1107dc071c3a33cccf629ded85993de73d061ae23e6aa108 |