databend-sqlalchemy


Namedatabend-sqlalchemy JSON
Version 0.4.5 PyPI version JSON
download
home_pagehttps://github.com/datafuselabs/databend-sqlalchemy
SummarySqlalchemy adapter for Databend
upload_time2024-02-01 11:52:03
maintainer
docs_urlNone
authorDatabend Cloud
requires_python>=3.7
licenseApache-2.0
keywords
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            databend-sqlalchemy
===================

Databend dialect for SQLAlchemy.

Installation
------------

The package is installable through PIP::

    pip install databend-sqlalchemy

Usage
-----

The DSN format is similar to that of regular Postgres::

        from sqlalchemy import create_engine, text
        from sqlalchemy.engine.base import Connection, Engine
        engine = create_engine(
            f"databend://{username}:{password}@{host_port_name}/{database_name}?sslmode=disable"
        )
        connection = engine.connect()
        result = connection.execute(text("SELECT 1"))
        assert len(result.fetchall()) == 1

        import connector
        cursor = connector.connect('databend://root:@localhost:8000?sslmode=disable').cursor()
        cursor.execute('SELECT * FROM test')
        # print(cursor.fetchone())
        # print(cursor.fetchall())
        for i in cursor.next():
            print(i)




Compatibility
---------------

- If databend version >= v0.9.0 or later, you need to use databend-sqlalchemy version >= v0.1.0.
- The databend-sqlalchemy use [databend-py](https://github.com/datafuselabs/databend-py) as internal driver when version < v0.4.0, but when version >= v0.4.0 it use [databend driver python binding](https://github.com/datafuselabs/bendsql/blob/main/bindings/python/README.md) as internal driver. The only difference between the two is that the connection parameters provided in the DSN are different. When using the corresponding version, you should refer to the connection parameters provided by the corresponding Driver.

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/datafuselabs/databend-sqlalchemy",
    "name": "databend-sqlalchemy",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.7",
    "maintainer_email": "",
    "keywords": "",
    "author": "Databend Cloud",
    "author_email": "hanshanjie@datafuselabs.com",
    "download_url": "https://files.pythonhosted.org/packages/2e/b7/3ab285a6b74cbd150972103f2b99fd2a11880a635f3f76f65773384eec21/databend_sqlalchemy-0.4.5.tar.gz",
    "platform": null,
    "description": "databend-sqlalchemy\n===================\n\nDatabend dialect for SQLAlchemy.\n\nInstallation\n------------\n\nThe package is installable through PIP::\n\n    pip install databend-sqlalchemy\n\nUsage\n-----\n\nThe DSN format is similar to that of regular Postgres::\n\n        from sqlalchemy import create_engine, text\n        from sqlalchemy.engine.base import Connection, Engine\n        engine = create_engine(\n            f\"databend://{username}:{password}@{host_port_name}/{database_name}?sslmode=disable\"\n        )\n        connection = engine.connect()\n        result = connection.execute(text(\"SELECT 1\"))\n        assert len(result.fetchall()) == 1\n\n        import connector\n        cursor = connector.connect('databend://root:@localhost:8000?sslmode=disable').cursor()\n        cursor.execute('SELECT * FROM test')\n        # print(cursor.fetchone())\n        # print(cursor.fetchall())\n        for i in cursor.next():\n            print(i)\n\n\n\n\nCompatibility\n---------------\n\n- If databend version >= v0.9.0 or later, you need to use databend-sqlalchemy version >= v0.1.0.\n- The databend-sqlalchemy use [databend-py](https://github.com/datafuselabs/databend-py) as internal driver when version < v0.4.0, but when version >= v0.4.0 it use [databend driver python binding](https://github.com/datafuselabs/bendsql/blob/main/bindings/python/README.md) as internal driver. The only difference between the two is that the connection parameters provided in the DSN are different. When using the corresponding version, you should refer to the connection parameters provided by the corresponding Driver.\n",
    "bugtrack_url": null,
    "license": "Apache-2.0",
    "summary": "Sqlalchemy adapter for Databend",
    "version": "0.4.5",
    "project_urls": {
        "Bug Tracker": "https://github.com/datafuselabs/databend-sqlalchemy",
        "Homepage": "https://github.com/datafuselabs/databend-sqlalchemy"
    },
    "split_keywords": [],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "feab2f5fea497bef7333d6d6537cfdf953ea7a82b8ddcc0ab082c98d3a6303aa",
                "md5": "11803be6c6b7d7166adc932aec6ab51c",
                "sha256": "c6576b44c937bc1793df81b09fc410b4a490150b4425c1ced2c9fd813300afd1"
            },
            "downloads": -1,
            "filename": "databend_sqlalchemy-0.4.5-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "11803be6c6b7d7166adc932aec6ab51c",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.7",
            "size": 17202,
            "upload_time": "2024-02-01T11:51:59",
            "upload_time_iso_8601": "2024-02-01T11:51:59.886661Z",
            "url": "https://files.pythonhosted.org/packages/fe/ab/2f5fea497bef7333d6d6537cfdf953ea7a82b8ddcc0ab082c98d3a6303aa/databend_sqlalchemy-0.4.5-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "2eb73ab285a6b74cbd150972103f2b99fd2a11880a635f3f76f65773384eec21",
                "md5": "f56ea6ada44ecc35eb839efd6b6054ec",
                "sha256": "48636af01013ce7b56bdc34cd56b91c6c063298ff941988f326e6496291768ae"
            },
            "downloads": -1,
            "filename": "databend_sqlalchemy-0.4.5.tar.gz",
            "has_sig": false,
            "md5_digest": "f56ea6ada44ecc35eb839efd6b6054ec",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.7",
            "size": 16484,
            "upload_time": "2024-02-01T11:52:03",
            "upload_time_iso_8601": "2024-02-01T11:52:03.615070Z",
            "url": "https://files.pythonhosted.org/packages/2e/b7/3ab285a6b74cbd150972103f2b99fd2a11880a635f3f76f65773384eec21/databend_sqlalchemy-0.4.5.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-02-01 11:52:03",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "datafuselabs",
    "github_project": "databend-sqlalchemy",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "lcname": "databend-sqlalchemy"
}
        
Elapsed time: 0.35724s