Data science friendly ORM combining Python
Project description
dbhydra
Data science friendly ORM (Object Relational Mapping) library combining Python, Pandas, and various SQL dialects For full documentation see official documentation - currently unavailable but we're working on it!
Installation
Use the package manager pip to install dbhydra.
pip install dbhydra
Usage
import dbhydra.dbhydra_core as dh
db1=dh.db()
table1 = dh.Table(db1,"test",["test1","test2","test3","test4"],["int","int","int","int"])
#table1.drop()
#table1.create()
#rows=[[1,2,3,4],[5,4,7,9]]
#table1.insert(rows)
list1=table1.select("SELECT * FROM test")
print(list1)
#list2=table1.select_all()
#print(list2)
#table1.drop()
table1.export_to_xlsx()
tables=db1.get_all_tables()
table_dict=db1.generate_table_dict()
print(tables)
columns=table_dict['test'].get_all_columns()
types=table_dict['test'].get_all_types()
print(columns,types)
table_test=dh.Table.init_all_columns(db1,"test")
print(table_test.columns)
table2 = dh.Table(db1,"test_new",["id","test2"],["int","nvarchar(20)"])
#table2.create()
#table2.drop()
Current scope
Aims: Easy integration with Pandas, SQL SERVER/MySQL database, and exports/imports to/from excel/CSV format
Done: Table functions (Create, Drop, Select, Update, Insert, and Delete) should be working fine
Todo: Group by, Order by, Where, Linking of FK, Customizable PK,...
Contributing
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.
License
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
File details
Details for the file dbhydra-2.2.16.tar.gz
.
File metadata
- Download URL: dbhydra-2.2.16.tar.gz
- Upload date:
- Size: 28.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.11.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | f7e52d2c0bc78904c717e76f314b9f134ec95089533917a2c77b26e31d6b289b |
|
MD5 | cb7c04a784c8d2465f6688ce234a9c7c |
|
BLAKE2b-256 | a04194931f335f8f7437ece5493a4d5f353edca004d941c08dd94e1b495d2916 |
File details
Details for the file dbhydra-2.2.16-py3-none-any.whl
.
File metadata
- Download URL: dbhydra-2.2.16-py3-none-any.whl
- Upload date:
- Size: 34.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.11.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 25f02c738a1ef9795b42c271094781aceaf203b156b35c76452693c431ec933c |
|
MD5 | 95e78cb9ab6e5ec4bcc46e0886ea4fb6 |
|
BLAKE2b-256 | 9c15fe45dc6a76c1a1208779c61fa888e21e49e4b0a231bedabd98bb083e6a38 |