1- asyncpg -- A fast PostgreSQL Database Client Library for Python/asyncio
2- =======================================================================
1+ async_gaussdb-gaussdb -- A fast GaussDB/openGauss Database Client Library for Python/asyncio
2+ =====================================================================================
33
4- .. image :: https://github.com/MagicStack/asyncpg /workflows/Tests/badge.svg
5- :target: https://github.com/MagicStack/asyncpg /actions?query=workflow%3ATests+branch%3Amaster
4+ .. image :: https://github.com/MagicStack/async_gaussdb /workflows/Tests/badge.svg
5+ :target: https://github.com/MagicStack/async_gaussdb /actions?query=workflow%3ATests+branch%3Amaster
66 :alt: GitHub Actions status
7- .. image :: https://img.shields.io/pypi/v/asyncpg .svg
8- :target: https://pypi.python.org/pypi/asyncpg
7+ .. image :: https://img.shields.io/pypi/v/async_gaussdb .svg
8+ :target: https://pypi.python.org/pypi/async_gaussdb
99
10- **asyncpg ** is a database interface library designed specifically for
11- PostgreSQL and Python/asyncio. asyncpg is an efficient, clean implementation
12- of PostgreSQL server binary protocol for use with Python's ``asyncio ``
13- framework. You can read more about asyncpg in an introductory
14- `blog post <http://magic.io/blog/asyncpg-1m-rows-from-postgres-to-python/ >`_.
10+ **async_gaussdb-gaussdb ** is a database interface library designed specifically for
11+ GaussDB and openGauss databases with Python/asyncio. This fork of async_gaussdb is
12+ optimized for GaussDB/openGauss compatibility, including native SHA256
13+ authentication support and enhanced features for enterprise database environments.
1514
16- asyncpg requires Python 3.8 or later and is supported for PostgreSQL
17- versions 9.5 to 17. Other PostgreSQL versions or other databases
18- implementing the PostgreSQL protocol *may * work, but are not being
19- actively tested.
15+ async_gaussdb-gaussdb requires Python 3.8 or later and is specifically designed for
16+ GaussDB and openGauss databases. It includes compatibility fixes and
17+ optimizations for openGauss-specific features and enterprise database requirements.
18+
19+ **Key Features for GaussDB/openGauss: **
20+ * Native SHA256 authentication support
21+ * Optimized for openGauss protocol compatibility
22+ * Enhanced error handling for enterprise database features
23+ * Support for GaussDB-specific data types and functions
24+ * Comprehensive test suite adapted for openGauss
2025
2126
2227Documentation
2328-------------
2429
2530The project documentation can be found
26- `here <https://magicstack.github.io/asyncpg /current/ >`_.
31+ `here <https://magicstack.github.io/async_gaussdb /current/ >`_.
2732
2833
2934Performance
3035-----------
3136
32- In our testing asyncpg is, on average, **5x ** faster than psycopg3.
37+ async_gaussdb-gaussdb maintains the high performance characteristics of the original
38+ async_gaussdb library while being optimized for GaussDB/openGauss environments.
3339
34- .. image :: https://raw.githubusercontent.com/MagicStack/asyncpg /master/performance.png?fddca40ab0
40+ .. image :: https://raw.githubusercontent.com/MagicStack/async_gaussdb /master/performance.png?fddca40ab0
3541 :target: https://gistpreview.github.io/?0ed296e93523831ea0918d42dd1258c2
3642
3743The above results are a geometric mean of benchmarks obtained with PostgreSQL
@@ -42,34 +48,34 @@ in June 2023 (click on the chart to see full details).
4248Features
4349--------
4450
45- asyncpg implements PostgreSQL server protocol natively and exposes its
46- features directly, as opposed to hiding them behind a generic facade
47- like DB-API.
48-
49- This enables asyncpg to have easy-to-use support for:
51+ async_gaussdb-gaussdb implements the GaussDB/openGauss server protocol natively and
52+ exposes its features directly, optimized for enterprise database environments:
5053
51- * **prepared statements **
52- * **scrollable cursors **
53- * **partial iteration ** on query results
54+ * **SHA256 authentication ** - Native support for GaussDB/openGauss authentication
55+ * **prepared statements ** - Optimized for openGauss query execution
56+ * **scrollable cursors ** - Full cursor support for large result sets
57+ * **partial iteration ** on query results - Memory-efficient data processing
5458* automatic encoding and decoding of composite types, arrays,
5559 and any combination of those
5660* straightforward support for custom data types
61+ * **openGauss compatibility ** - Comprehensive test suite and error handling
62+ * **Enterprise features ** - Optimized for production GaussDB environments
5763
5864
5965Installation
6066------------
6167
62- asyncpg is available on PyPI. When not using GSSAPI/SSPI authentication it
63- has no dependencies. Use pip to install::
68+ async_gaussdb-gaussdb is available on PyPI. When not using GSSAPI/SSPI authentication it
69+ has no dependencies. Use pip to install::
6470
65- $ pip install asyncpg
71+ $ pip install async-gaussdb
6672
6773If you need GSSAPI/SSPI authentication, use::
6874
69- $ pip install 'asyncpg [gssauth]'
75+ $ pip install 'async-gaussdb [gssauth]'
7076
7177For more details, please `see the documentation
72- <https://magicstack.github.io/asyncpg /current/installation.html> `_.
78+ <https://magicstack.github.io/async_gaussdb /current/installation.html> `_.
7379
7480
7581Basic Usage
@@ -78,11 +84,19 @@ Basic Usage
7884.. code-block :: python
7985
8086 import asyncio
81- import asyncpg
87+ import async_gaussdb
8288
8389 async def run ():
84- conn = await asyncpg.connect(user = ' user' , password = ' password' ,
85- database = ' database' , host = ' 127.0.0.1' )
90+ # Connect to GaussDB/openGauss
91+ conn = await async_gaussdb.connect(
92+ user = ' omm' ,
93+ password = ' your_password' ,
94+ database = ' postgres' ,
95+ host = ' 127.0.0.1' ,
96+ port = 5432
97+ )
98+
99+ # Execute queries with full GaussDB support
86100 values = await conn.fetch(
87101 ' SELECT * FROM mytable WHERE id = $1' ,
88102 10 ,
@@ -92,7 +106,52 @@ Basic Usage
92106 asyncio.run(run())
93107
94108
109+ GaussDB/openGauss Specific Features
110+ ----------------------------------
111+
112+ This library includes enhanced support for GaussDB and openGauss databases:
113+
114+ .. code-block :: python
115+
116+ import asyncio
117+ import async_gaussdb
118+
119+ async def run ():
120+ # Connect with SHA256 authentication (GaussDB/openGauss specific)
121+ conn = await async_gaussdb.connect(
122+ user = ' omm' ,
123+ password = ' your_password' ,
124+ database = ' postgres' ,
125+ host = ' 127.0.0.1' ,
126+ port = 5432
127+ )
128+
129+ # Use GaussDB-specific features
130+ # The library automatically handles openGauss protocol differences
131+ values = await conn.fetch(
132+ ' SELECT * FROM mytable WHERE id = $1' ,
133+ 10 ,
134+ )
135+ await conn.close()
136+
137+ asyncio.run(run())
138+
139+
140+ Development with Docker
141+ ----------------------
142+
143+ A Dockerfile is provided for development with openGauss:
144+
145+ .. code-block :: bash
146+
147+ # Build the development image
148+ docker build -t async_gaussdb-gaussdb-dev .
149+
150+ # Run the container
151+ docker run -it async_gaussdb-gaussdb-dev
152+
153+
95154 License
96155-------
97156
98- asyncpg is developed and distributed under the Apache 2.0 license.
157+ async_gaussdb-gaussdb is developed and distributed under the Apache 2.0 license.
0 commit comments