######################
SAP HANA Python Client
######################
Introduction
------------
The Python Database API Specification v2.0 (PEP 249) defines a set of methods that provides a consistent database interface independent of the actual database being used. The Python extension module for SAP HANA implements PEP 249. Once you install the module, you can access and change the information in SAP HANA databases from Python.
In PEP 249, autocommit is turned off by default. In the SAP HANA Python driver, autocommit is turned on by default.
For information, see: `PEP 249 -- Python Database API Specification v2.0 <https://www.python.org/dev/peps/pep-0249/>`_
Getting Started
---------------
Install via ``pip install hdbcli`` or install manually via the `HANA Client Install <https://help.sap.com/viewer/f1b440ded6144a54ada97ff95dac7adf/latest/en-US/39eca89d94ca464ca52385ad50fc7dea.html>`_
Quick Start
-----------
* For HANA Cloud databases, the port number is 443 and encryption is always enabled by default
* For HANA tenant databases, use the port number 3**NN**13 (where **NN** is the SAP instance number - e.g. 30013).
* For HANA system databases in a multitenant system, the port number is 3**NN**13.
* For HANA single-tenant databases, the port number is 3**NN**15.
::
from hdbcli import dbapi
conn = dbapi.connect(
address="<hostname>",
port=3<NN>MM,
user="<username>",
password="<password>"
)
cursor = conn.cursor()
Execute a single statement that does not return a result set:
::
cursor.execute("CREATE TABLE T1 (ID INTEGER PRIMARY KEY, C2 VARCHAR(255))")
cursor.close()
Use question mark parameter binding to insert values into the T1 table created above. The parameter values are supplied as a Python sequence and can be literal values or variable names. This example uses literal values:
::
sql = 'INSERT INTO T1 (ID, C2) VALUES (?, ?)'
cursor = conn.cursor()
cursor.execute(sql, (1, 'hello'))
# returns True
cursor.execute(sql, (2, 'hello again'))
# returns True
cursor.close()
Use named parameter binding to insert values into the T1 table. The values are supplied as a Python dictionary, and this example uses variable names.
::
sql = 'INSERT INTO T1 (ID, C2) VALUES (:id, :c2)'
cursor = conn.cursor()
id = 3
c2 = "goodbye"
cursor.execute(sql, {"id": id, "c2": c2})
# returns True
cursor.close()
Loop over the rows of the result set.
::
sql = 'SELECT * FROM T1'
cursor = conn.cursor()
cursor.execute(sql)
for row in cursor:
print(row)
Help
----
See the `SAP HANA Client Interface Programming Reference <https://help.sap.com/viewer/f1b440ded6144a54ada97ff95dac7adf/latest/en-US/f3b8fabf34324302b123297cdbe710f0.html>`_ for details about developing with the SAP HANA Python Client.
Community
---------
SAP Community provides a forum where you can ask and answer questions, and comment and vote on the questions of others and their answers.
See `SAP HANA Community Questions <https://answers.sap.com/tags/73554900100700000996>`_ for details.
Limitations of 32-bit Windows driver
------------------------------------
The maximum length of a LOB column for the 32-bit Python driver on Windows is 2147483647.
The maximum rowcount that can be returned for the 32-bit Python driver on Windows is 2147483647.
License
-------
The HANA Python Client is provided via the `SAP Developer License Agreement <https://tools.hana.ondemand.com/developer-license.txt>`_.
By using this software, you agree that the following text is incorporated into the terms of the Developer Agreement:
If you are an existing SAP customer for On Premise software, your use of this current software is also covered by the
terms of your software license agreement with SAP, including the Use Rights, the current version of which can be found at:
`https://www.sap.com/about/agreements/product-use-and-support-terms.html?tag=agreements:product-use-support-terms/on-premise-software/software-use-rights <https://www.sap.com/about/agreements/product-use-and-support-terms.html?tag=agreements:product-use-support-terms/on-premise-software/software-use-rights>`_
Raw data
{
"_id": null,
"home_page": "https://www.sap.com/",
"name": "hdbcli",
"maintainer": null,
"docs_url": null,
"requires_python": null,
"maintainer_email": null,
"keywords": "SAP HANA client in-memory database SQL cloud business application intelligent enterprise AI artificial intelligence analytics experience",
"author": "SAP SE",
"author_email": null,
"download_url": null,
"platform": null,
"description": "######################\nSAP HANA Python Client\n######################\n\nIntroduction\n------------\n\nThe Python Database API Specification v2.0 (PEP 249) defines a set of methods that provides a consistent database interface independent of the actual database being used. The Python extension module for SAP HANA implements PEP 249. Once you install the module, you can access and change the information in SAP HANA databases from Python.\n\nIn PEP 249, autocommit is turned off by default. In the SAP HANA Python driver, autocommit is turned on by default.\n\nFor information, see: `PEP 249 -- Python Database API Specification v2.0 <https://www.python.org/dev/peps/pep-0249/>`_\n\nGetting Started\n---------------\n\nInstall via ``pip install hdbcli`` or install manually via the `HANA Client Install <https://help.sap.com/viewer/f1b440ded6144a54ada97ff95dac7adf/latest/en-US/39eca89d94ca464ca52385ad50fc7dea.html>`_\n\nQuick Start\n-----------\n\n * For HANA Cloud databases, the port number is 443 and encryption is always enabled by default\n * For HANA tenant databases, use the port number 3**NN**13 (where **NN** is the SAP instance number - e.g. 30013).\n * For HANA system databases in a multitenant system, the port number is 3**NN**13.\n * For HANA single-tenant databases, the port number is 3**NN**15.\n\n::\n\n from hdbcli import dbapi\n conn = dbapi.connect(\n address=\"<hostname>\",\n port=3<NN>MM,\n user=\"<username>\",\n password=\"<password>\"\n )\n cursor = conn.cursor()\n\nExecute a single statement that does not return a result set:\n\n::\n\n cursor.execute(\"CREATE TABLE T1 (ID INTEGER PRIMARY KEY, C2 VARCHAR(255))\")\n cursor.close()\n\n\nUse question mark parameter binding to insert values into the T1 table created above. The parameter values are supplied as a Python sequence and can be literal values or variable names. This example uses literal values:\n\n::\n\n sql = 'INSERT INTO T1 (ID, C2) VALUES (?, ?)'\n cursor = conn.cursor()\n cursor.execute(sql, (1, 'hello'))\n # returns True\n cursor.execute(sql, (2, 'hello again'))\n # returns True\n cursor.close()\n\nUse named parameter binding to insert values into the T1 table. The values are supplied as a Python dictionary, and this example uses variable names.\n\n::\n\n sql = 'INSERT INTO T1 (ID, C2) VALUES (:id, :c2)'\n cursor = conn.cursor()\n id = 3\n c2 = \"goodbye\"\n cursor.execute(sql, {\"id\": id, \"c2\": c2})\n # returns True\n cursor.close()\n\nLoop over the rows of the result set.\n\n::\n\n sql = 'SELECT * FROM T1'\n cursor = conn.cursor()\n cursor.execute(sql)\n for row in cursor:\n print(row)\n\nHelp\n----\n\nSee the `SAP HANA Client Interface Programming Reference <https://help.sap.com/viewer/f1b440ded6144a54ada97ff95dac7adf/latest/en-US/f3b8fabf34324302b123297cdbe710f0.html>`_ for details about developing with the SAP HANA Python Client.\n\nCommunity\n---------\n\nSAP Community provides a forum where you can ask and answer questions, and comment and vote on the questions of others and their answers.\n\nSee `SAP HANA Community Questions <https://answers.sap.com/tags/73554900100700000996>`_ for details.\n\nLimitations of 32-bit Windows driver\n------------------------------------\n\nThe maximum length of a LOB column for the 32-bit Python driver on Windows is 2147483647.\nThe maximum rowcount that can be returned for the 32-bit Python driver on Windows is 2147483647.\n\nLicense\n-------\n\nThe HANA Python Client is provided via the `SAP Developer License Agreement <https://tools.hana.ondemand.com/developer-license.txt>`_.\n\nBy using this software, you agree that the following text is incorporated into the terms of the Developer Agreement:\n\n If you are an existing SAP customer for On Premise software, your use of this current software is also covered by the\n terms of your software license agreement with SAP, including the Use Rights, the current version of which can be found at:\n `https://www.sap.com/about/agreements/product-use-and-support-terms.html?tag=agreements:product-use-support-terms/on-premise-software/software-use-rights <https://www.sap.com/about/agreements/product-use-and-support-terms.html?tag=agreements:product-use-support-terms/on-premise-software/software-use-rights>`_\n\n\n",
"bugtrack_url": null,
"license": "SAP DEVELOPER LICENSE AGREEMENT",
"summary": "SAP HANA Python Client",
"version": "2.22.29",
"project_urls": {
"Documentation": "https://help.sap.com/viewer/f1b440ded6144a54ada97ff95dac7adf/latest/en-US/f3b8fabf34324302b123297cdbe710f0.html",
"Homepage": "https://www.sap.com/"
},
"split_keywords": [
"sap",
"hana",
"client",
"in-memory",
"database",
"sql",
"cloud",
"business",
"application",
"intelligent",
"enterprise",
"ai",
"artificial",
"intelligence",
"analytics",
"experience"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "ace58abd0badae671388994d92ff8af44c1b4dfbe544df79feb92274c26acc50",
"md5": "2d19f1a3099d0f0e5e7eb54cc39b7098",
"sha256": "74f5455c4b3e91d1df19bd99ed73180836731c860707099f9c44bef262bc2da4"
},
"downloads": -1,
"filename": "hdbcli-2.22.29-cp27-cp27m-macosx_10_7_x86_64.whl",
"has_sig": false,
"md5_digest": "2d19f1a3099d0f0e5e7eb54cc39b7098",
"packagetype": "bdist_wheel",
"python_version": "cp27",
"requires_python": null,
"size": 5542948,
"upload_time": "2024-10-08T18:14:42",
"upload_time_iso_8601": "2024-10-08T18:14:42.130335Z",
"url": "https://files.pythonhosted.org/packages/ac/e5/8abd0badae671388994d92ff8af44c1b4dfbe544df79feb92274c26acc50/hdbcli-2.22.29-cp27-cp27m-macosx_10_7_x86_64.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "002e44a66014031625f7206924cc020946ab0151e25317aa12246b1b3c9d749c",
"md5": "b67b1470389d2f103ecad0f95a1a183b",
"sha256": "01f64d8c6e367fcf4f7c647169611f980e1416f98533ae6d6bdec2b230c1d216"
},
"downloads": -1,
"filename": "hdbcli-2.22.29-cp27-cp27m-manylinux1_x86_64.whl",
"has_sig": false,
"md5_digest": "b67b1470389d2f103ecad0f95a1a183b",
"packagetype": "bdist_wheel",
"python_version": "cp27",
"requires_python": null,
"size": 11246316,
"upload_time": "2024-10-08T18:14:44",
"upload_time_iso_8601": "2024-10-08T18:14:44.989924Z",
"url": "https://files.pythonhosted.org/packages/00/2e/44a66014031625f7206924cc020946ab0151e25317aa12246b1b3c9d749c/hdbcli-2.22.29-cp27-cp27m-manylinux1_x86_64.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "d2b94afb0a36e89d5a1aa5676884fc128e73b7db3af3ce34fd9257d39f23ef8b",
"md5": "e207e9c62032da166cb3a3e7f39f41f0",
"sha256": "3a39c06c191892440d2f83234663ff27c68478ec9825a0da433c4539c5a2fea6"
},
"downloads": -1,
"filename": "hdbcli-2.22.29-cp27-cp27m-manylinux2014_ppc64le.whl",
"has_sig": false,
"md5_digest": "e207e9c62032da166cb3a3e7f39f41f0",
"packagetype": "bdist_wheel",
"python_version": "cp27",
"requires_python": null,
"size": 11309374,
"upload_time": "2024-10-08T18:14:48",
"upload_time_iso_8601": "2024-10-08T18:14:48.478838Z",
"url": "https://files.pythonhosted.org/packages/d2/b9/4afb0a36e89d5a1aa5676884fc128e73b7db3af3ce34fd9257d39f23ef8b/hdbcli-2.22.29-cp27-cp27m-manylinux2014_ppc64le.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "b318951d591f0706edd4fc01e15e190faf713943ad12f3f7a9f788b248cce183",
"md5": "3cd548014ab6ec07164221fefcc8976d",
"sha256": "373c97dc15833a954cbd8dd5790c6da8a375ca8703bb7e6183e54b3dbcaf74a3"
},
"downloads": -1,
"filename": "hdbcli-2.22.29-cp27-cp27mu-macosx_10_7_x86_64.whl",
"has_sig": false,
"md5_digest": "3cd548014ab6ec07164221fefcc8976d",
"packagetype": "bdist_wheel",
"python_version": "cp27",
"requires_python": null,
"size": 5542951,
"upload_time": "2024-10-08T18:14:52",
"upload_time_iso_8601": "2024-10-08T18:14:52.575891Z",
"url": "https://files.pythonhosted.org/packages/b3/18/951d591f0706edd4fc01e15e190faf713943ad12f3f7a9f788b248cce183/hdbcli-2.22.29-cp27-cp27mu-macosx_10_7_x86_64.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "f2d3ac22060bf46c797800201840eae23f01b27d60e29dcc56945787c19f6ca7",
"md5": "3d5ba9ff7b67f3d61b1191618ad5f1f7",
"sha256": "2c508303675bfe58a39e39ad447f07e31f93e006aa357b8ddd8e87e5e1ffb43d"
},
"downloads": -1,
"filename": "hdbcli-2.22.29-cp27-cp27mu-manylinux1_x86_64.whl",
"has_sig": false,
"md5_digest": "3d5ba9ff7b67f3d61b1191618ad5f1f7",
"packagetype": "bdist_wheel",
"python_version": "cp27",
"requires_python": null,
"size": 11246316,
"upload_time": "2024-10-08T18:14:55",
"upload_time_iso_8601": "2024-10-08T18:14:55.676675Z",
"url": "https://files.pythonhosted.org/packages/f2/d3/ac22060bf46c797800201840eae23f01b27d60e29dcc56945787c19f6ca7/hdbcli-2.22.29-cp27-cp27mu-manylinux1_x86_64.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "346c8a24255b9e04f20b02ee7d1d00df4f8753ff9ea97cd34b6503641311a2dc",
"md5": "2127893eca2608525b85ba3a61ce862a",
"sha256": "712c6541e7d1886d7883b019352c0ad1cba02342022dcf4a877383ee1981a11e"
},
"downloads": -1,
"filename": "hdbcli-2.22.29-cp27-cp27mu-manylinux2014_ppc64le.whl",
"has_sig": false,
"md5_digest": "2127893eca2608525b85ba3a61ce862a",
"packagetype": "bdist_wheel",
"python_version": "cp27",
"requires_python": null,
"size": 11309375,
"upload_time": "2024-10-08T18:14:59",
"upload_time_iso_8601": "2024-10-08T18:14:59.199681Z",
"url": "https://files.pythonhosted.org/packages/34/6c/8a24255b9e04f20b02ee7d1d00df4f8753ff9ea97cd34b6503641311a2dc/hdbcli-2.22.29-cp27-cp27mu-manylinux2014_ppc64le.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "b29cf781a4e5c0b8b7b4b0866644885b8824550da34c8ff9ac06e60d906587ba",
"md5": "bdd953e50bcfce696d28267a792b71e4",
"sha256": "9280fd256a5f128510f184e0339e396570674fbf86d329f423b838fdbba485d6"
},
"downloads": -1,
"filename": "hdbcli-2.22.29-cp27-cp27m-win_amd64.whl",
"has_sig": false,
"md5_digest": "bdd953e50bcfce696d28267a792b71e4",
"packagetype": "bdist_wheel",
"python_version": "cp27",
"requires_python": null,
"size": 3590732,
"upload_time": "2024-10-08T18:14:50",
"upload_time_iso_8601": "2024-10-08T18:14:50.707165Z",
"url": "https://files.pythonhosted.org/packages/b2/9c/f781a4e5c0b8b7b4b0866644885b8824550da34c8ff9ac06e60d906587ba/hdbcli-2.22.29-cp27-cp27m-win_amd64.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "85c7c4746cdeefbb39e5178cb8cb8ef20857464c8cc2d1210f2682c35aa32d60",
"md5": "de5a8ef048013ee580c36c647283bf74",
"sha256": "5e7433ab9e83dffc7028b34b2c5171e8dbbe7a24cfbc46c257dd5b729809781a"
},
"downloads": -1,
"filename": "hdbcli-2.22.29-cp34-abi3-macosx_10_11_x86_64.whl",
"has_sig": false,
"md5_digest": "de5a8ef048013ee580c36c647283bf74",
"packagetype": "bdist_wheel",
"python_version": "cp34",
"requires_python": null,
"size": 5542809,
"upload_time": "2024-10-08T18:15:02",
"upload_time_iso_8601": "2024-10-08T18:15:02.601319Z",
"url": "https://files.pythonhosted.org/packages/85/c7/c4746cdeefbb39e5178cb8cb8ef20857464c8cc2d1210f2682c35aa32d60/hdbcli-2.22.29-cp34-abi3-macosx_10_11_x86_64.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "ab50956783553848f4f5abed4c9cd04d78e2d5a1032a59cd74d5b680585df632",
"md5": "fa77af7cc9f524b8bcf0dd5dd9094762",
"sha256": "c70ae254bf1565137812943f8f68595e7142e0b4ea53d7d8b5b9c233fae935a0"
},
"downloads": -1,
"filename": "hdbcli-2.22.29-cp34-abi3-manylinux1_x86_64.whl",
"has_sig": false,
"md5_digest": "fa77af7cc9f524b8bcf0dd5dd9094762",
"packagetype": "bdist_wheel",
"python_version": "cp34",
"requires_python": null,
"size": 11247669,
"upload_time": "2024-10-08T18:15:06",
"upload_time_iso_8601": "2024-10-08T18:15:06.677560Z",
"url": "https://files.pythonhosted.org/packages/ab/50/956783553848f4f5abed4c9cd04d78e2d5a1032a59cd74d5b680585df632/hdbcli-2.22.29-cp34-abi3-manylinux1_x86_64.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "19bd6f1c9116a3440274837e69fafd407b3f69d9cf9007165df72871920f1f47",
"md5": "e88725ba0124d38dd313aebfdfd0ef7c",
"sha256": "292cd7bd597024883a553f587b11727fadc0d451d6d6757e40405a63c3431afb"
},
"downloads": -1,
"filename": "hdbcli-2.22.29-cp34-abi3-manylinux2014_ppc64le.whl",
"has_sig": false,
"md5_digest": "e88725ba0124d38dd313aebfdfd0ef7c",
"packagetype": "bdist_wheel",
"python_version": "cp34",
"requires_python": null,
"size": 11322107,
"upload_time": "2024-10-08T18:15:09",
"upload_time_iso_8601": "2024-10-08T18:15:09.421149Z",
"url": "https://files.pythonhosted.org/packages/19/bd/6f1c9116a3440274837e69fafd407b3f69d9cf9007165df72871920f1f47/hdbcli-2.22.29-cp34-abi3-manylinux2014_ppc64le.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "15996246e0a4918361db062b330a675a7ad0561d5b699cb93ab0611b7ca18b61",
"md5": "0d87d2643bae6c605f03da9c07c4e20a",
"sha256": "538d1d5cecd26ac6ba15b9c627b177580549800456dc93da9e603d099fca9e67"
},
"downloads": -1,
"filename": "hdbcli-2.22.29-cp36-abi3-manylinux2014_aarch64.whl",
"has_sig": false,
"md5_digest": "0d87d2643bae6c605f03da9c07c4e20a",
"packagetype": "bdist_wheel",
"python_version": "cp36",
"requires_python": null,
"size": 11163594,
"upload_time": "2024-10-08T18:15:12",
"upload_time_iso_8601": "2024-10-08T18:15:12.634726Z",
"url": "https://files.pythonhosted.org/packages/15/99/6246e0a4918361db062b330a675a7ad0561d5b699cb93ab0611b7ca18b61/hdbcli-2.22.29-cp36-abi3-manylinux2014_aarch64.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "f67bcd5408d994e49dab55b3812cad4dbe3186a4e5d66a09a81a067bb6b91b49",
"md5": "a7518a572d688508d753e2bc79fd2769",
"sha256": "495eca6cf308d92635997ad054dfd1cdec14772265109b409d6313d8271e2d6c"
},
"downloads": -1,
"filename": "hdbcli-2.22.29-cp36-abi3-win32.whl",
"has_sig": false,
"md5_digest": "a7518a572d688508d753e2bc79fd2769",
"packagetype": "bdist_wheel",
"python_version": "cp36",
"requires_python": null,
"size": 3588713,
"upload_time": "2024-10-08T18:15:15",
"upload_time_iso_8601": "2024-10-08T18:15:15.884899Z",
"url": "https://files.pythonhosted.org/packages/f6/7b/cd5408d994e49dab55b3812cad4dbe3186a4e5d66a09a81a067bb6b91b49/hdbcli-2.22.29-cp36-abi3-win32.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "ddec477ee7529f7b58c33e97538bb0a6cac36a8bca3073802c52184721409247",
"md5": "003186d451b40babc85c90578e18df86",
"sha256": "1ede2655d96001e386d704c6c64c9e70dedfee21d0296a3e182885d713d5ee54"
},
"downloads": -1,
"filename": "hdbcli-2.22.29-cp36-abi3-win_amd64.whl",
"has_sig": false,
"md5_digest": "003186d451b40babc85c90578e18df86",
"packagetype": "bdist_wheel",
"python_version": "cp36",
"requires_python": null,
"size": 3588719,
"upload_time": "2024-10-08T18:15:17",
"upload_time_iso_8601": "2024-10-08T18:15:17.654780Z",
"url": "https://files.pythonhosted.org/packages/dd/ec/477ee7529f7b58c33e97538bb0a6cac36a8bca3073802c52184721409247/hdbcli-2.22.29-cp36-abi3-win_amd64.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "3c7a1f575e3ad2f578139a0e588437165263569456a180b9f8882982823ba0e9",
"md5": "703a84bf18df5652dd9627f5b793f529",
"sha256": "a3e3ceed868adf249ed14b55d53750d4fc3c97bacc4cd6d9e046a24d5e957ecd"
},
"downloads": -1,
"filename": "hdbcli-2.22.29-cp38-abi3-macosx_11_0_arm64.whl",
"has_sig": false,
"md5_digest": "703a84bf18df5652dd9627f5b793f529",
"packagetype": "bdist_wheel",
"python_version": "cp38",
"requires_python": null,
"size": 5027543,
"upload_time": "2024-10-08T18:15:19",
"upload_time_iso_8601": "2024-10-08T18:15:19.456211Z",
"url": "https://files.pythonhosted.org/packages/3c/7a/1f575e3ad2f578139a0e588437165263569456a180b9f8882982823ba0e9/hdbcli-2.22.29-cp38-abi3-macosx_11_0_arm64.whl",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-10-08 18:14:42",
"github": false,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"lcname": "hdbcli"
}