Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
Signed-off-by: Lorenzo Mangani <[email protected]>
  • Loading branch information
lmangani authored Jun 4, 2023
1 parent 795c5d9 commit a376de9
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions examples/python/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,14 @@ Example gRPC Flight SQL API client using Python3
python3 client.py
```

#### Example
```python
from flightsql import connect, FlightSQLClient

client = FlightSQLClient(host='localhost',port=8082,insecure=True,metadata={'bucket':'company_sensors'})
conn = connect(client)
cursor = conn.cursor()
cursor.execute('SELECT * FROM cpu LIMIT 1;')
# print("columns:", cursor.description)
print("rows:", [r for r in cursor])
```

0 comments on commit a376de9

Please sign in to comment.