Skip to content

Commit c790886

Browse files
committed
Add example with asyncpg in README
1 parent 72b96a2 commit c790886

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

README.md

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ And retrieve data as python geometries instances:
3838
<Point POINT(1.0 2.0)>
3939

4040

41-
## Example
41+
## Example with psycopg2
4242

4343
> import psycopg2
4444
> from postgis import LineString
@@ -59,3 +59,10 @@ And retrieve data as python geometries instances:
5959
{'coordinates': ((1.0, 2.0), (3.0, 4.0)), 'type': 'LineString'}
6060
> str(geom.geojson)
6161
'{"type": "LineString", "coordinates": [[1, 2], [3, 4]]}'
62+
63+
64+
## Example with asyncpg
65+
66+
from postgis.asyncpg import register
67+
pool = await create_pool(**DB_CONFIG, loop=loop, max_size=100,
68+
init=register)

0 commit comments

Comments
 (0)