cx-Oracle-async


Namecx-Oracle-async JSON
Version 0.3.3 PyPI version JSON
download
home_pagehttps://github.com/GoodManWEN/cx_Oracle_async
SummaryA very simple asynchronous wrapper that allows you to get access to the Oracle database in asyncio programs.
upload_time2022-04-15 19:31:44
maintainer
docs_urlNone
authorWEN
requires_python>=3.7
license
keywords oracle cx_oracle asyncio cx_oracle_async
VCS
bugtrack_url
requirements cx-Oracle ThreadPoolExecutorPlus
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # cx_Oracle_async
[![fury](https://img.shields.io/pypi/v/cx-Oracle-async.svg)](https://pypi.org/project/cx-Oracle-async/)
[![licence](https://img.shields.io/github/license/GoodManWEN/cx_Oracle_async)](https://github.com/GoodManWEN/cx_Oracle_async/blob/master/LICENSE)
[![pyversions](https://img.shields.io/pypi/pyversions/cx-Oracle-async.svg)](https://pypi.org/project/cx-Oracle-async/)
[![Publish](https://github.com/GoodManWEN/cx_Oracle_async/workflows/Publish/badge.svg)](https://github.com/GoodManWEN/cx_Oracle_async/actions?query=workflow:Publish)
[![Build](https://github.com/GoodManWEN/cx_Oracle_async/workflows/Build/badge.svg)](https://github.com/GoodManWEN/cx_Oracle_async/actions?query=workflow:Build)
[![Docs](https://readthedocs.org/projects/cx-oracle-async/badge/?version=latest)](https://readthedocs.org/projects/cx-oracle-async/)
[![Visitors](https://visitor-badge.glitch.me/badge?page_id=goodmanwen.cx_Oracle_async&style=flat-square&color=0088cc)](https://github.com/GoodManWEN/cx_Oracle_async/)

A very simple asynchronous wrapper that allows you to get access to the Oracle database in asyncio programs.

Easy to use , buy may not the best practice for efficiency concern.

## Requirements
- [cx_Oracle >= 8.1.0](https://github.com/oracle/python-cx_Oracle) (Take into consideration that author of cx_Oracle said he's trying to implement asyncio support , APIs maybe change in future version. Switch to 8.1.0 if there's something wrong makes it not gonna work.)
- [ThreadPoolExecutorPlus >= 0.2.0](https://github.com/GoodManWEN/ThreadPoolExecutorPlus)

## Install

    pip install cx_Oracle_async

## Feature
- Nearly all the same as aiomysql in asynchronous operational approach , with limited cx_Oracle feature support.
- No automaticly date format transition built-in.
- AQ feature added , check [docs here](https://cx_oracle_async.readthedocs.io/en/latest/user_guide/advancedfeatures.html#oracle-advanced-queuing-aq) for further information.
- You can modify some of the connection properties simply like you're using cx_Oracle. 
- You can do basic insert / select / delete etc.
- If you're connecting to database which is on a different machine from python process , you need to install oracle client module in order to use this library. Check [cx-Oracle's installation guide](https://cx-oracle.readthedocs.io/en/latest/user_guide/installation.html) for further information.

## Documentation

[https://cx_oracle_async.readthedocs.io](https://cx_oracle_async.readthedocs.io)

## Performance
query type | asynchronous multithreading | synchronous multithreading | synchronous single thread
-|-|-|-
fast single line query | 6259.80 q/s | 28906.93 q/s | 14805.61 q/s
single line insertion | 1341.88 q/s | 1898 q/s | 1685.17 q/s

*/\* Test platform: \*/*<br>
*AMD Ryzen 3700x*<br>
*Windows 10 LTSC*<br>
*Oracle 19c*<br>
*You can find performance test codes [here](https://github.com/GoodManWEN/cx_Oracle_async/blob/main/misc).*

## Examples
Before running examples , make sure you've already installed a [Oracle Client](https://cx-oracle-async.readthedocs.io/en/latest/user_guide/quickstart.html#install-oracle-client) on your machine.
```Python
# basic_usages.py
import asyncio
import cx_Oracle_async

async def main():
    oracle_pool = await cx_Oracle_async.create_pool(
        host='localhost', 
        port='1521',
        user='user', 
        password='password',
        service_name='orcl', 
        min = 2,
        max = 4,
    )

    async with oracle_pool.acquire() as connection:
        async with connection.cursor() as cursor:
            await cursor.execute("SELECT * FROM V$SESSION")
            print(await cursor.fetchall())

    await oracle_pool.close()

if __name__ == '__main__':
    asyncio.run(main())
```



            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/GoodManWEN/cx_Oracle_async",
    "name": "cx-Oracle-async",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.7",
    "maintainer_email": "",
    "keywords": "oracle,cx_Oracle,asyncio,cx_Oracle_async",
    "author": "WEN",
    "author_email": "",
    "download_url": "https://files.pythonhosted.org/packages/d1/87/fe75e196c5570749ae228b6b85b78b0d887d412e54c504642f46f4eef857/cx_Oracle_async-0.3.3.tar.gz",
    "platform": null,
    "description": "# cx_Oracle_async\n[![fury](https://img.shields.io/pypi/v/cx-Oracle-async.svg)](https://pypi.org/project/cx-Oracle-async/)\n[![licence](https://img.shields.io/github/license/GoodManWEN/cx_Oracle_async)](https://github.com/GoodManWEN/cx_Oracle_async/blob/master/LICENSE)\n[![pyversions](https://img.shields.io/pypi/pyversions/cx-Oracle-async.svg)](https://pypi.org/project/cx-Oracle-async/)\n[![Publish](https://github.com/GoodManWEN/cx_Oracle_async/workflows/Publish/badge.svg)](https://github.com/GoodManWEN/cx_Oracle_async/actions?query=workflow:Publish)\n[![Build](https://github.com/GoodManWEN/cx_Oracle_async/workflows/Build/badge.svg)](https://github.com/GoodManWEN/cx_Oracle_async/actions?query=workflow:Build)\n[![Docs](https://readthedocs.org/projects/cx-oracle-async/badge/?version=latest)](https://readthedocs.org/projects/cx-oracle-async/)\n[![Visitors](https://visitor-badge.glitch.me/badge?page_id=goodmanwen.cx_Oracle_async&style=flat-square&color=0088cc)](https://github.com/GoodManWEN/cx_Oracle_async/)\n\nA very simple asynchronous wrapper that allows you to get access to the Oracle database in asyncio programs.\n\nEasy to use , buy may not the best practice for efficiency concern.\n\n## Requirements\n- [cx_Oracle >= 8.1.0](https://github.com/oracle/python-cx_Oracle) (Take into consideration that author of cx_Oracle said he's trying to implement asyncio support , APIs maybe change in future version. Switch to 8.1.0 if there's something wrong makes it not gonna work.)\n- [ThreadPoolExecutorPlus >= 0.2.0](https://github.com/GoodManWEN/ThreadPoolExecutorPlus)\n\n## Install\n\n    pip install cx_Oracle_async\n\n## Feature\n- Nearly all the same as aiomysql in asynchronous operational approach , with limited cx_Oracle feature support.\n- No automaticly date format transition built-in.\n- AQ feature added , check [docs here](https://cx_oracle_async.readthedocs.io/en/latest/user_guide/advancedfeatures.html#oracle-advanced-queuing-aq) for further information.\n- You can modify some of the connection properties simply like you're using cx_Oracle. \n- You can do basic insert / select / delete etc.\n- If you're connecting to database which is on a different machine from python process , you need to install oracle client module in order to use this library. Check [cx-Oracle's installation guide](https://cx-oracle.readthedocs.io/en/latest/user_guide/installation.html) for further information.\n\n## Documentation\n\n[https://cx_oracle_async.readthedocs.io](https://cx_oracle_async.readthedocs.io)\n\n## Performance\nquery type | asynchronous multithreading | synchronous multithreading | synchronous single thread\n-|-|-|-\nfast single line query | 6259.80 q/s | 28906.93 q/s | 14805.61 q/s\nsingle line insertion | 1341.88 q/s | 1898 q/s | 1685.17 q/s\n\n*/\\* Test platform: \\*/*<br>\n*AMD Ryzen 3700x*<br>\n*Windows 10 LTSC*<br>\n*Oracle 19c*<br>\n*You can find performance test codes [here](https://github.com/GoodManWEN/cx_Oracle_async/blob/main/misc).*\n\n## Examples\nBefore running examples , make sure you've already installed a [Oracle Client](https://cx-oracle-async.readthedocs.io/en/latest/user_guide/quickstart.html#install-oracle-client) on your machine.\n```Python\n# basic_usages.py\nimport asyncio\nimport cx_Oracle_async\n\nasync def main():\n    oracle_pool = await cx_Oracle_async.create_pool(\n        host='localhost', \n        port='1521',\n        user='user', \n        password='password',\n        service_name='orcl', \n        min = 2,\n        max = 4,\n    )\n\n    async with oracle_pool.acquire() as connection:\n        async with connection.cursor() as cursor:\n            await cursor.execute(\"SELECT * FROM V$SESSION\")\n            print(await cursor.fetchall())\n\n    await oracle_pool.close()\n\nif __name__ == '__main__':\n    asyncio.run(main())\n```\n\n\n",
    "bugtrack_url": null,
    "license": "",
    "summary": "A very simple asynchronous wrapper that allows you to get access to the Oracle database in asyncio programs.",
    "version": "0.3.3",
    "project_urls": {
        "Homepage": "https://github.com/GoodManWEN/cx_Oracle_async"
    },
    "split_keywords": [
        "oracle",
        "cx_oracle",
        "asyncio",
        "cx_oracle_async"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "d0ef4c7767c9917e5d25ed6c780ee82a251ac83a569d725310e7db0bcde5a064",
                "md5": "b5b5fd0f72f985918e1ccd380529a47e",
                "sha256": "1eee2a2405cb6700da4efc094b0f3c5217afc406bc4e9404f794f2c0bd713999"
            },
            "downloads": -1,
            "filename": "cx_Oracle_async-0.3.3-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "b5b5fd0f72f985918e1ccd380529a47e",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.7",
            "size": 11072,
            "upload_time": "2022-04-15T19:31:42",
            "upload_time_iso_8601": "2022-04-15T19:31:42.771377Z",
            "url": "https://files.pythonhosted.org/packages/d0/ef/4c7767c9917e5d25ed6c780ee82a251ac83a569d725310e7db0bcde5a064/cx_Oracle_async-0.3.3-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "d187fe75e196c5570749ae228b6b85b78b0d887d412e54c504642f46f4eef857",
                "md5": "151a0df44da306eb8dd7cdc1f617e267",
                "sha256": "12515563210d52e2d58c3df39a708eef4e3bd21d856c54635821bca43d870b1f"
            },
            "downloads": -1,
            "filename": "cx_Oracle_async-0.3.3.tar.gz",
            "has_sig": false,
            "md5_digest": "151a0df44da306eb8dd7cdc1f617e267",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.7",
            "size": 8848,
            "upload_time": "2022-04-15T19:31:44",
            "upload_time_iso_8601": "2022-04-15T19:31:44.019706Z",
            "url": "https://files.pythonhosted.org/packages/d1/87/fe75e196c5570749ae228b6b85b78b0d887d412e54c504642f46f4eef857/cx_Oracle_async-0.3.3.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2022-04-15 19:31:44",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "GoodManWEN",
    "github_project": "cx_Oracle_async",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "requirements": [
        {
            "name": "cx-Oracle",
            "specs": [
                [
                    ">=",
                    "8.1.0"
                ]
            ]
        },
        {
            "name": "ThreadPoolExecutorPlus",
            "specs": [
                [
                    ">=",
                    "0.2.0"
                ]
            ]
        }
    ],
    "lcname": "cx-oracle-async"
}
        
WEN
Elapsed time: 0.25140s