Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cbor integration #172

Merged
merged 3 commits into from
Mar 31, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@ dependencies = [
"aiosignal==1.3.2",
"async-timeout==5.0.1",
"attrs==25.1.0",
"cbor2==5.6.5",
"Cerberus==1.3.7",
"certifi==2024.12.14",
"charset-normalizer==3.4.1",
Expand Down
1 change: 0 additions & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ aiohttp==3.11.11
aiosignal==1.3.2
async-timeout==5.0.1
attrs==25.1.0
cbor2==5.6.5
Cerberus==1.3.7
certifi==2024.12.14
charset-normalizer==3.4.1
Expand Down
27 changes: 27 additions & 0 deletions src/surrealdb/cbor2/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
from typing import Any

from surrealdb.cbor2._decoder import CBORDecoder as CBORDecoder
from surrealdb.cbor2._decoder import load as load
from surrealdb.cbor2._decoder import loads as loads
from surrealdb.cbor2._encoder import CBOREncoder as CBOREncoder
from surrealdb.cbor2._encoder import dump as dump
from surrealdb.cbor2._encoder import dumps as dumps
from surrealdb.cbor2._encoder import shareable_encoder as shareable_encoder
from surrealdb.cbor2._types import CBORDecodeEOF as CBORDecodeEOF
from surrealdb.cbor2._types import CBORDecodeError as CBORDecodeError
from surrealdb.cbor2._types import CBORDecodeValueError as CBORDecodeValueError
from surrealdb.cbor2._types import CBOREncodeError as CBOREncodeError
from surrealdb.cbor2._types import CBOREncodeTypeError as CBOREncodeTypeError
from surrealdb.cbor2._types import CBOREncodeValueError as CBOREncodeValueError
from surrealdb.cbor2._types import CBORError as CBORError
from surrealdb.cbor2._types import CBORSimpleValue as CBORSimpleValue
from surrealdb.cbor2._types import CBORTag as CBORTag
from surrealdb.cbor2._types import FrozenDict as FrozenDict
from surrealdb.cbor2._types import undefined as undefined

# Re-export imports so they look like they live directly in this package
key: str
value: Any
for key, value in list(locals().items()):
if callable(value) and getattr(value, "__module__", "").startswith("cbor2."):
value.__module__ = __name__
Loading