Skip to main content

Python OR mapping tools

Project description

PyODBC DbAccess

There are 3 tools in the library:

  • OR mapping: assume object property name matches database columns
    • row to object: pypigeonhole_dbaccess.obj_mapper.row_to_obj()
    • rows to list of object: pypigeonhole_dbaccess.obj_mapper.query_list()
    • generate sql statements for insert
    • generate select statement based on an object. This is not natural.
    • may have to handle _name and __name cases because of property.
  • Local transaction manager: pypigeonhole_dbaccess.tx_manager
    It handles nested transactions, i.e., if any part of database operations fails, all operations rollback.
  • Bulk SQL uploader: To insert one row into a database, we use
    insert into <table> (?, ?, ..., ?) values (...)
    To insert many rows,
    insert into <table> (?, ?, ..., ?) values (...), (...), ..., (...)
    and then batch them. Python twists the insert statements with executemany().

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

pypigeonhole-dbaccess-0.0.1.tar.gz (6.6 kB view details)

Uploaded Source

Built Distribution

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

pypigeonhole_dbaccess-0.0.1-py3-none-any.whl (8.0 kB view details)

Uploaded Python 3

File details

Details for the file pypigeonhole-dbaccess-0.0.1.tar.gz.

File metadata

  • Download URL: pypigeonhole-dbaccess-0.0.1.tar.gz
  • Upload date:
  • Size: 6.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.6.0 requests/2.24.0 setuptools/50.3.0.post20201006 requests-toolbelt/0.9.1 tqdm/4.50.2 CPython/3.8.5

File hashes

Hashes for pypigeonhole-dbaccess-0.0.1.tar.gz
Algorithm Hash digest
SHA256 142ef9cc3637a9cf3c0bab9afe5b2ccf438d3d4d88cebb2aa8aa176156e07e2c
MD5 a2674882126a1242ac1a6414097a80ab
BLAKE2b-256 d9e88abd388e31584ce1eecf548b53a98efbccd3209eb2fc1f683927d9ec6175

See more details on using hashes here.

File details

Details for the file pypigeonhole_dbaccess-0.0.1-py3-none-any.whl.

File metadata

  • Download URL: pypigeonhole_dbaccess-0.0.1-py3-none-any.whl
  • Upload date:
  • Size: 8.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.6.0 requests/2.24.0 setuptools/50.3.0.post20201006 requests-toolbelt/0.9.1 tqdm/4.50.2 CPython/3.8.5

File hashes

Hashes for pypigeonhole_dbaccess-0.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 bfc766b8ad2b2cc88459360a067b43057eed7d3227a44491b100b53330ccbbef
MD5 404b9d0853f545dbe812aa9bddf28399
BLAKE2b-256 0a42b43c8b193f59256d4c929e289b4831f9960bada65a30c095d0281d7a1fc0

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