Skip to main content

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

MIT

Project details


Release history Release notifications | RSS feed

This version

2.3.8

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

dbhydra-2.3.8.tar.gz (30.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

dbhydra-2.3.8-py3-none-any.whl (36.3 kB view details)

Uploaded Python 3

File details

Details for the file dbhydra-2.3.8.tar.gz.

File metadata

  • Download URL: dbhydra-2.3.8.tar.gz
  • Upload date:
  • Size: 30.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.7

File hashes

Hashes for dbhydra-2.3.8.tar.gz
Algorithm Hash digest
SHA256 cea5eb39fc61e1fd8386ca543262270b9be50f1aabc72bb430482a300c893046
MD5 2d5315e3197350b82390e6314843fd2f
BLAKE2b-256 9c1a52b22894ca25484e6d121751beea42f45265066d03e47a3d9d7a605aca44

See more details on using hashes here.

File details

Details for the file dbhydra-2.3.8-py3-none-any.whl.

File metadata

  • Download URL: dbhydra-2.3.8-py3-none-any.whl
  • Upload date:
  • Size: 36.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.7

File hashes

Hashes for dbhydra-2.3.8-py3-none-any.whl
Algorithm Hash digest
SHA256 c22b2da803da4149b2e85bfba2a223779d1ce91c671831bfdf13d573611aa59b
MD5 091813182c78db74f06cac2438bd1d32
BLAKE2b-256 ead71bd3ffd65d763a705a2fcc786a6de071b99fcb5de406e1ef1d19c6dd053e

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page