Skip to content

Commit

Permalink
Update README
Browse files Browse the repository at this point in the history
  • Loading branch information
tobiemh committed May 10, 2024
1 parent bf1e1e9 commit db66201
Showing 1 changed file with 27 additions and 52 deletions.
79 changes: 27 additions & 52 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,87 +1,63 @@
<p align="center">
<img width="300" src="https://raw.githubusercontent.com/surrealdb/surrealdb/main/img/icon.png" alt="SurrealDB Icon">
</p>

<br>

<p align="center">
<a href="https://surrealdb.com#gh-dark-mode-only" target="_blank">
<img width="300" src="https://raw.githubusercontent.com/surrealdb/surrealdb/main/img/white/logo.svg" alt="SurrealDB Logo">
</a>
<a href="https://surrealdb.com#gh-light-mode-only" target="_blank">
<img width="300" src="https://raw.githubusercontent.com/surrealdb/surrealdb/main/img/black/logo.svg" alt="SurrealDB Logo">
</a>
<img width=120 src="https://raw.githubusercontent.com/surrealdb/icons/main/surreal.svg" />
&nbsp;
<img width=120 src="https://raw.githubusercontent.com/surrealdb/icons/main/python.svg" />
</p>

<h3 align="center">
<a href="https://surrealdb.com#gh-dark-mode-only" target="_blank">
<img src="https://raw.githubusercontent.com/surrealdb/surrealdb/main/img/white/text.svg" height="15" alt="SurrealDB">
</a>
<a href="https://surrealdb.com#gh-light-mode-only" target="_blank">
<img src="https://raw.githubusercontent.com/surrealdb/surrealdb/main/img/black/text.svg" height="15" alt="SurrealDB">
</a>
is the ultimate cloud <br> database for tomorrow's applications
</h3>

<h3 align="center">Develop easier. &nbsp; Build faster. &nbsp; Scale quicker.</h3>
<h3 align="center">The official SurrealDB SDK for Python.</h3>

<br>

<p align="center">
<a href="https://github.com/surrealdb/surrealdb.py"><img src="https://img.shields.io/badge/status-beta-ff00bb.svg?style=flat-square"></a>
&nbsp;
<a href="https://surrealdb.com/docs/integration/libraries/python"><img src="https://img.shields.io/badge/docs-view-44cc11.svg?style=flat-square"></a>
&nbsp;
<a href="https://github.com/surrealdb/surrealdb.py"><img src="https://img.shields.io/badge/license-Apache_License_2.0-00bfff.svg?style=flat-square"></a>
&nbsp;
<a href="https://twitter.com/surrealdb"><img src="https://img.shields.io/badge/twitter-follow_us-1d9bf0.svg?style=flat-square"></a>
&nbsp;
<a href="https://dev.to/surrealdb"><img src="https://img.shields.io/badge/dev-join_us-86f7b7.svg?style=flat-square"></a>
&nbsp;
<a href="https://www.linkedin.com/company/surrealdb/"><img src="https://img.shields.io/badge/linkedin-connect_with_us-0a66c2.svg?style=flat-square"></a>
<a href="https://github.com/surrealdb/surrealdb.py"><img src="https://img.shields.io/badge/status-beta-ff00bb.svg?style=flat-square"></a>
&nbsp;
<a href="https://surrealdb.com/docs/integration/libraries/javascript"><img src="https://img.shields.io/badge/docs-view-44cc11.svg?style=flat-square"></a>
&nbsp;
<a href="https://pypi.org/project/surrealdb/"><img src="https://img.shields.io/pypi/dm/surrealdb?style=flat-square"></a>
&nbsp;
<a href="https://pypi.org/project/surrealdb/"><img src="https://img.shields.io/pypi/pyversions/surrealdb?style=flat-square"></a>
</p>

<p align="center">
<a href="https://surrealdb.com/blog"><img height="25" src="https://raw.githubusercontent.com/surrealdb/surrealdb/main/img/social/blog.svg" alt="Blog"></a>
<a href="https://surrealdb.com/discord"><img src="https://img.shields.io/discord/902568124350599239?label=discord&style=flat-square&color=5a66f6"></a>
&nbsp;
<a href="https://github.com/surrealdb/surrealdb"><img height="25" src="https://raw.githubusercontent.com/surrealdb/surrealdb/main/img/social/github.svg" alt="Github "></a>
&nbsp;
<a href="https://www.linkedin.com/company/surrealdb/"><img height="25" src="https://raw.githubusercontent.com/surrealdb/surrealdb/main/img/social/linkedin.svg" alt="LinkedIn"></a>
&nbsp;
<a href="https://twitter.com/surrealdb"><img height="25" src="https://raw.githubusercontent.com/surrealdb/surrealdb/main/img/social/twitter.svg" alt="Twitter"></a>
&nbsp;
<a href="https://www.youtube.com/channel/UCjf2teVEuYVvvVC-gFZNq6w"><img height="25" src="https://raw.githubusercontent.com/surrealdb/surrealdb/main/img/social/youtube.svg" alt="Youtube"></a>
&nbsp;
<a href="https://dev.to/surrealdb"><img height="25" src="https://raw.githubusercontent.com/surrealdb/surrealdb/main/img/social/dev.svg" alt="Dev"></a>
<a href="https://twitter.com/surrealdb"><img src="https://img.shields.io/badge/twitter-follow_us-1d9bf0.svg?style=flat-square"></a>
&nbsp;
<a href="https://surrealdb.com/discord"><img height="25" src="https://raw.githubusercontent.com/surrealdb/surrealdb/main/img/social/discord.svg" alt="Discord"></a>
<a href="https://www.linkedin.com/company/surrealdb/"><img src="https://img.shields.io/badge/linkedin-connect_with_us-0a66c2.svg?style=flat-square"></a>
&nbsp;
<a href="https://stackoverflow.com/questions/tagged/surrealdb"><img height="25" src="https://raw.githubusercontent.com/surrealdb/surrealdb/main/img/social/stack-overflow.svg" alt="StackOverflow"></a>

<a href="https://www.youtube.com/channel/UCjf2teVEuYVvvVC-gFZNq6w"><img src="https://img.shields.io/badge/youtube-subscribe-fc1c1c.svg?style=flat-square"></a>
</p>

# surrealdb.py

The official SurrealDB SDK for Python.

[See the documentation here](https://surrealdb.com/docs/surrealdb/integration/sdks/python)
## Documentation

The documentation is available at
[https://surrealdb.com/docs/integration/libraries/python](https://surrealdb.com/docs/integration/libraries/python)

## Getting Started

Below is a quick guide on how to get started with SurrealDB in Python.

### Running SurrealDB
## Running SurrealDB
Before we can do anything, we need to download SurrealDB and start the server.
[See how to do that here](https://surrealdb.com/docs/surrealdb/installation/)

After we have everything up and running, we can install the Python SDK.

### Installing the Python SDK
## How to install

```bash
```sh
pip install surrealdb
```

### Using the (synchronous) Python methods
## Getting started

### Running within synchronous code

Import the SDK and create the database connection:

Expand Down Expand Up @@ -113,7 +89,7 @@ outcome = db.query("SELECT * FROM user;")
print(outcome)
```

### Using the async Python methods
### Running within asynchronous code

The async methods work in the same way, with two main differences:
- Inclusion of `async def / await`.
Expand All @@ -123,7 +99,6 @@ The async methods work in the same way, with two main differences:
import asyncio
from surrealdb import AsyncSurrealDB


async def main():
db = AsyncSurrealDB("ws://localhost:8000/database/namespace")
await db.connect()
Expand Down

0 comments on commit db66201

Please sign in to comment.