https://github.com/timelessnesses/surreal-db-python
A SurrealDB client in pure python
https://github.com/timelessnesses/surreal-db-python
Last synced: about 2 months ago
JSON representation
A SurrealDB client in pure python
- Host: GitHub
- URL: https://github.com/timelessnesses/surreal-db-python
- Owner: timelessnesses
- Created: 2022-09-20T01:22:58.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2024-02-25T13:05:29.000Z (over 2 years ago)
- Last Synced: 2025-02-04T04:44:28.616Z (over 1 year ago)
- Language: Python
- Size: 161 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# surreal-db-python
A pure python (and compilable) database client for SurrealDB.
## Installation
1. Install with
```bash
pip install surreal-db-python
```
## Usage
```py
import surreal
client = surreal.SurrealDB(
host: str,
username: str,
password: str,
db: str,
namespace: str
)
client.execute("CREATE deez:nut SET nice = 69 + 420;")
client.fetch("SELECT * FROM deez:nut;")
```
## Features
- Supported Asynchronous Operation (with class `AsyncSurrealDB`) (`AsyncSurrealDB` have same API as `SurrealDB but you await them.)
- (not) Supported websocket (yet)
## Build from source
1. Clone repository
2. `poetry install`
3. `./setup.py sdist bdist_wheel` for wheel or `./setup.py install` for install package directly (egg included)