docs: improve contents listing

This commit is contained in:
Sarah Hoffmann
2024-09-10 20:36:27 +02:00
parent f52212abbd
commit fe0ade81f5
5 changed files with 50 additions and 14 deletions

View File

@@ -24,12 +24,11 @@ the placex table:
```
import asyncio
from pathlib import Path
import sqlalchemy as sa
from nominatim_api import NominatimAPIAsync
async def print_table_size():
api = NominatimAPIAsync(Path('.'))
api = NominatimAPIAsync()
async with api.begin() as conn:
cnt = await conn.scalar(sa.select(sa.func.count()).select_from(conn.t.placex))