Skip to main content

Community-created Python connector and ORM for SurrealDB.

Project description

pysurreal

Community-created Python connector and ORM for SurrealDB.

Installation

Raw Python:

python3 -m pip install pysurreal

Poetry:

poetry add pysurreal

Basic Usage

from asyncio import run

from pysurreal import Client


async def main() -> None:
    async with Client("http://localhost:8000", "namespace", "database", "root", "root") as client:
        result = await client.raw_query("""
            CREATE example:123 SET
                name = 'example',
                list = ['a', 'b', 'c']
            ;
        """)

        if result.error is not None:
            print(result.error.information)
            return

        print(result.response)


run(main())

License

This project is licensed under the MIT License. See the LICENSE file for more information.

Contributing

Thank you for your interest in contributing to pysurreal! Please see the Contributing Guidelines for more information about contributing.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pysurreal-1.0.0a0.tar.gz (3.5 kB view hashes)

Uploaded Source

Built Distribution

pysurreal-1.0.0a0-py3-none-any.whl (4.2 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page