Skip to content

Commit b5063f4

Browse files
committed
Driver: Add micropython-cratedb to the page about Python
1 parent 9227a39 commit b5063f4

File tree

1 file changed

+26
-0
lines changed

1 file changed

+26
-0
lines changed

docs/connect/python.md

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,32 @@ async def main():
8686
asyncio.run(main())
8787
```
8888

89+
(micropython-cratedb)=
90+
91+
### micropython-cratedb
92+
93+
A MicroPython library connecting to the CrateDB HTTP API.
94+
See the full documentation at <https://github.com/crate/micropython-cratedb>.
95+
The package can be installed using `mpremote mip install github:crate/micropython-cratedb`.
96+
97+
```python
98+
import cratedb
99+
100+
crate = cratedb.CrateDB(
101+
host="localhost",
102+
port=4200,
103+
user="crate",
104+
password="crate",
105+
use_ssl=False
106+
)
107+
108+
response = crate.execute(
109+
"SELECT * FROM sys.summits ORDER BY height DESC LIMIT 3"
110+
)
111+
112+
print(response)
113+
```
114+
89115
(psycopg2)=
90116

91117
### psycopg2

0 commit comments

Comments
 (0)