bh-database


Namebh-database JSON
Version 0.0.5 PyPI version JSON
download
home_pageNone
SummaryDatabase wrapper classes for SQLAlchemy.
upload_time2024-05-02 04:31:55
maintainerNone
docs_urlNone
authorNone
requires_python>=3.7
licenseNone
keywords sqlalchemy database wrapper
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # bh_database

Database wrapper classes for SQLAlchemy.

## Pip installation

```
pip install bh-database
```

## Overview

Database wrapper classes for SQLAlchemy.

These classes currently support only two database types: MySQL and PostgreSQL. Drivers 
required, respectively:

* [https://pypi.org/project/mysql-connector-python](https://pypi.org/project/mysql-connector-python/).
* [https://pypi.org/project/psycopg2/](https://pypi.org/project/psycopg2/).
    
These classes provide the following functionalities:

* Database connection management.

* A custom SQLAlchemy query class which implements paginating.

* A generic base model (table), which should be the **indirect** base model for 
    applications' models. This class encapsulates:
        
    * SQLAlchemy scoped session, thereby providing methods to implement transaction atomicity.

    * A custom base query with paginating ability mentioned above.

    * Fully implemented dunder methods str() and repr().

* A generic SQLAlchemy declarative base class which should include all required metaclasses.

* Some generic methods which run full text SQL statements.

* A generic method to run stored procedures which return data.

* A generic method which takes a list of records to be inserted, and records to be
    updated, and writes them to the target database table in a single call.

* Transaction atomicity. Multiple database operations involving several different
    tables can be wrapped under a single transaction, so that all can be committed
    or rolled back as appropriate. 

Please see [Full documentation](https://bh-database.readthedocs.io/) for more detail.

## Documentation

[Full documentation](https://bh-database.readthedocs.io/)

## License

[ MIT license ](http://www.opensource.org/licenses/mit-license.php)

            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "bh-database",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.7",
    "maintainer_email": null,
    "keywords": "SQLAlchemy, database, wrapper",
    "author": null,
    "author_email": "Van Be Hai Nguyen <behai_nguyen@hotmail.com>",
    "download_url": "https://files.pythonhosted.org/packages/54/2f/3098fdd5178b4cc75390674d48c692cecf288f14b0872df25d0274e478b5/bh_database-0.0.5.tar.gz",
    "platform": null,
    "description": "# bh_database\r\n\r\nDatabase wrapper classes for SQLAlchemy.\r\n\r\n## Pip installation\r\n\r\n```\r\npip install bh-database\r\n```\r\n\r\n## Overview\r\n\r\nDatabase wrapper classes for SQLAlchemy.\r\n\r\nThese classes currently support only two database types: MySQL and PostgreSQL. Drivers \r\nrequired, respectively:\r\n\r\n* [https://pypi.org/project/mysql-connector-python](https://pypi.org/project/mysql-connector-python/).\r\n* [https://pypi.org/project/psycopg2/](https://pypi.org/project/psycopg2/).\r\n    \r\nThese classes provide the following functionalities:\r\n\r\n* Database connection management.\r\n\r\n* A custom SQLAlchemy query class which implements paginating.\r\n\r\n* A generic base model (table), which should be the **indirect** base model for \r\n    applications' models. This class encapsulates:\r\n        \r\n    * SQLAlchemy scoped session, thereby providing methods to implement transaction atomicity.\r\n\r\n    * A custom base query with paginating ability mentioned above.\r\n\r\n    * Fully implemented dunder methods str() and repr().\r\n\r\n* A generic SQLAlchemy declarative base class which should include all required metaclasses.\r\n\r\n* Some generic methods which run full text SQL statements.\r\n\r\n* A generic method to run stored procedures which return data.\r\n\r\n* A generic method which takes a list of records to be inserted, and records to be\r\n    updated, and writes them to the target database table in a single call.\r\n\r\n* Transaction atomicity. Multiple database operations involving several different\r\n    tables can be wrapped under a single transaction, so that all can be committed\r\n    or rolled back as appropriate. \r\n\r\nPlease see [Full documentation](https://bh-database.readthedocs.io/) for more detail.\r\n\r\n## Documentation\r\n\r\n[Full documentation](https://bh-database.readthedocs.io/)\r\n\r\n## License\r\n\r\n[ MIT license ](http://www.opensource.org/licenses/mit-license.php)\r\n",
    "bugtrack_url": null,
    "license": null,
    "summary": "Database wrapper classes for SQLAlchemy.",
    "version": "0.0.5",
    "project_urls": {
        "documentation": "https://bh-database.readthedocs.io/",
        "repository": "https://github.com/behai-nguyen/bh_database"
    },
    "split_keywords": [
        "sqlalchemy",
        " database",
        " wrapper"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "2d4b8d1b62241877230f8f0d7b9a3460ea3dc19a581d4c15170bcf619b60adb8",
                "md5": "303e797db30c691a3dbaef7a2d2c1f16",
                "sha256": "698500910893dc7aacfaafa6ec4a250fd2a40dd409922054d7de85354641d0be"
            },
            "downloads": -1,
            "filename": "bh_database-0.0.5-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "303e797db30c691a3dbaef7a2d2c1f16",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.7",
            "size": 15881,
            "upload_time": "2024-05-02T04:31:53",
            "upload_time_iso_8601": "2024-05-02T04:31:53.170484Z",
            "url": "https://files.pythonhosted.org/packages/2d/4b/8d1b62241877230f8f0d7b9a3460ea3dc19a581d4c15170bcf619b60adb8/bh_database-0.0.5-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "542f3098fdd5178b4cc75390674d48c692cecf288f14b0872df25d0274e478b5",
                "md5": "88bdfaba5e0497a3c9ee4e829ddd16c9",
                "sha256": "7d97967c58aceed57dd8c676edd9365e6494a789e854bc6fbf11940aff6f10f5"
            },
            "downloads": -1,
            "filename": "bh_database-0.0.5.tar.gz",
            "has_sig": false,
            "md5_digest": "88bdfaba5e0497a3c9ee4e829ddd16c9",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.7",
            "size": 22340,
            "upload_time": "2024-05-02T04:31:55",
            "upload_time_iso_8601": "2024-05-02T04:31:55.222104Z",
            "url": "https://files.pythonhosted.org/packages/54/2f/3098fdd5178b4cc75390674d48c692cecf288f14b0872df25d0274e478b5/bh_database-0.0.5.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-05-02 04:31:55",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "behai-nguyen",
    "github_project": "bh_database",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "lcname": "bh-database"
}
        
Elapsed time: 0.25622s