Skip to content

Commit 375f543

Browse files
Cbor integration (#172)
1 parent 855fc95 commit 375f543

File tree

13 files changed

+2314
-25
lines changed

13 files changed

+2314
-25
lines changed

pyproject.toml

-1
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,6 @@ dependencies = [
3535
"aiosignal==1.3.2",
3636
"async-timeout==5.0.1",
3737
"attrs==25.1.0",
38-
"cbor2==5.6.5",
3938
"Cerberus==1.3.7",
4039
"certifi==2024.12.14",
4140
"charset-normalizer==3.4.1",

requirements.txt

-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ aiohttp==3.11.11
33
aiosignal==1.3.2
44
async-timeout==5.0.1
55
attrs==25.1.0
6-
cbor2==5.6.5
76
Cerberus==1.3.7
87
certifi==2024.12.14
98
charset-normalizer==3.4.1

src/surrealdb/cbor2/__init__.py

+27
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
from typing import Any
2+
3+
from surrealdb.cbor2._decoder import CBORDecoder as CBORDecoder
4+
from surrealdb.cbor2._decoder import load as load
5+
from surrealdb.cbor2._decoder import loads as loads
6+
from surrealdb.cbor2._encoder import CBOREncoder as CBOREncoder
7+
from surrealdb.cbor2._encoder import dump as dump
8+
from surrealdb.cbor2._encoder import dumps as dumps
9+
from surrealdb.cbor2._encoder import shareable_encoder as shareable_encoder
10+
from surrealdb.cbor2._types import CBORDecodeEOF as CBORDecodeEOF
11+
from surrealdb.cbor2._types import CBORDecodeError as CBORDecodeError
12+
from surrealdb.cbor2._types import CBORDecodeValueError as CBORDecodeValueError
13+
from surrealdb.cbor2._types import CBOREncodeError as CBOREncodeError
14+
from surrealdb.cbor2._types import CBOREncodeTypeError as CBOREncodeTypeError
15+
from surrealdb.cbor2._types import CBOREncodeValueError as CBOREncodeValueError
16+
from surrealdb.cbor2._types import CBORError as CBORError
17+
from surrealdb.cbor2._types import CBORSimpleValue as CBORSimpleValue
18+
from surrealdb.cbor2._types import CBORTag as CBORTag
19+
from surrealdb.cbor2._types import FrozenDict as FrozenDict
20+
from surrealdb.cbor2._types import undefined as undefined
21+
22+
# Re-export imports so they look like they live directly in this package
23+
key: str
24+
value: Any
25+
for key, value in list(locals().items()):
26+
if callable(value) and getattr(value, "__module__", "").startswith("cbor2."):
27+
value.__module__ = __name__

0 commit comments

Comments
 (0)