zlmdb 25.10.1__cp312-cp312-win_amd64.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of zlmdb might be problematic. Click here for more details.
- flatbuffers/__init__.py +19 -0
- flatbuffers/_version.py +17 -0
- flatbuffers/builder.py +776 -0
- flatbuffers/compat.py +86 -0
- flatbuffers/encode.py +42 -0
- flatbuffers/flexbuffers.py +1527 -0
- flatbuffers/number_types.py +181 -0
- flatbuffers/packer.py +42 -0
- flatbuffers/reflection/AdvancedFeatures.py +10 -0
- flatbuffers/reflection/BaseType.py +24 -0
- flatbuffers/reflection/Enum.py +169 -0
- flatbuffers/reflection/EnumVal.py +96 -0
- flatbuffers/reflection/Field.py +208 -0
- flatbuffers/reflection/KeyValue.py +56 -0
- flatbuffers/reflection/Object.py +175 -0
- flatbuffers/reflection/RPCCall.py +131 -0
- flatbuffers/reflection/Schema.py +206 -0
- flatbuffers/reflection/SchemaFile.py +77 -0
- flatbuffers/reflection/Service.py +145 -0
- flatbuffers/reflection/Type.py +98 -0
- flatbuffers/reflection/__init__.py +0 -0
- flatbuffers/table.py +129 -0
- flatbuffers/util.py +43 -0
- zlmdb/__init__.py +312 -0
- zlmdb/_database.py +990 -0
- zlmdb/_errors.py +31 -0
- zlmdb/_meta.py +27 -0
- zlmdb/_pmap.py +1667 -0
- zlmdb/_schema.py +137 -0
- zlmdb/_transaction.py +181 -0
- zlmdb/_types.py +1596 -0
- zlmdb/_version.py +27 -0
- zlmdb/cli.py +41 -0
- zlmdb/flatbuffers/__init__.py +5 -0
- zlmdb/flatbuffers/reflection/AdvancedFeatures.py +10 -0
- zlmdb/flatbuffers/reflection/BaseType.py +25 -0
- zlmdb/flatbuffers/reflection/Enum.py +252 -0
- zlmdb/flatbuffers/reflection/EnumVal.py +144 -0
- zlmdb/flatbuffers/reflection/Field.py +325 -0
- zlmdb/flatbuffers/reflection/KeyValue.py +84 -0
- zlmdb/flatbuffers/reflection/Object.py +260 -0
- zlmdb/flatbuffers/reflection/RPCCall.py +195 -0
- zlmdb/flatbuffers/reflection/Schema.py +301 -0
- zlmdb/flatbuffers/reflection/SchemaFile.py +112 -0
- zlmdb/flatbuffers/reflection/Service.py +213 -0
- zlmdb/flatbuffers/reflection/Type.py +148 -0
- zlmdb/flatbuffers/reflection/__init__.py +0 -0
- zlmdb/flatbuffers/reflection.fbs +152 -0
- zlmdb/lmdb/__init__.py +37 -0
- zlmdb/lmdb/__main__.py +25 -0
- zlmdb/lmdb/_config.py +10 -0
- zlmdb/lmdb/cffi.py +2606 -0
- zlmdb/lmdb/tool.py +670 -0
- zlmdb/tests/lmdb/__init__.py +0 -0
- zlmdb/tests/lmdb/address_book.py +287 -0
- zlmdb/tests/lmdb/crash_test.py +339 -0
- zlmdb/tests/lmdb/cursor_test.py +333 -0
- zlmdb/tests/lmdb/env_test.py +919 -0
- zlmdb/tests/lmdb/getmulti_test.py +92 -0
- zlmdb/tests/lmdb/iteration_test.py +258 -0
- zlmdb/tests/lmdb/package_test.py +70 -0
- zlmdb/tests/lmdb/test_lmdb.py +188 -0
- zlmdb/tests/lmdb/testlib.py +185 -0
- zlmdb/tests/lmdb/tool_test.py +60 -0
- zlmdb/tests/lmdb/txn_test.py +575 -0
- zlmdb/tests/orm/MNodeLog.py +853 -0
- zlmdb/tests/orm/__init__.py +0 -0
- zlmdb/tests/orm/_schema_fbs.py +215 -0
- zlmdb/tests/orm/_schema_mnode_log.py +1201 -0
- zlmdb/tests/orm/_schema_py2.py +250 -0
- zlmdb/tests/orm/_schema_py3.py +307 -0
- zlmdb/tests/orm/_test_flatbuffers.py +144 -0
- zlmdb/tests/orm/_test_serialization.py +144 -0
- zlmdb/tests/orm/test_basic.py +217 -0
- zlmdb/tests/orm/test_etcd.py +275 -0
- zlmdb/tests/orm/test_pmap_indexes.py +466 -0
- zlmdb/tests/orm/test_pmap_types.py +90 -0
- zlmdb/tests/orm/test_pmaps.py +295 -0
- zlmdb/tests/orm/test_select.py +619 -0
- zlmdb-25.10.1.dist-info/METADATA +264 -0
- zlmdb-25.10.1.dist-info/RECORD +86 -0
- zlmdb-25.10.1.dist-info/WHEEL +5 -0
- zlmdb-25.10.1.dist-info/entry_points.txt +2 -0
- zlmdb-25.10.1.dist-info/licenses/LICENSE +137 -0
- zlmdb-25.10.1.dist-info/licenses/NOTICE +41 -0
- zlmdb-25.10.1.dist-info/top_level.txt +2 -0
flatbuffers/compat.py
ADDED
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
# Copyright 2016 Google Inc. All rights reserved.
|
|
2
|
+
#
|
|
3
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
4
|
+
# you may not use this file except in compliance with the License.
|
|
5
|
+
# You may obtain a copy of the License at
|
|
6
|
+
#
|
|
7
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
|
8
|
+
#
|
|
9
|
+
# Unless required by applicable law or agreed to in writing, software
|
|
10
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
11
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
12
|
+
# See the License for the specific language governing permissions and
|
|
13
|
+
# limitations under the License.
|
|
14
|
+
|
|
15
|
+
""" A tiny version of `six` to help with backwards compability. Also includes
|
|
16
|
+
compatibility helpers for numpy. """
|
|
17
|
+
|
|
18
|
+
import sys
|
|
19
|
+
|
|
20
|
+
PY2 = sys.version_info[0] == 2
|
|
21
|
+
PY26 = sys.version_info[0:2] == (2, 6)
|
|
22
|
+
PY27 = sys.version_info[0:2] == (2, 7)
|
|
23
|
+
PY275 = sys.version_info[0:3] >= (2, 7, 5)
|
|
24
|
+
PY3 = sys.version_info[0] == 3
|
|
25
|
+
PY34 = sys.version_info[0:2] >= (3, 4)
|
|
26
|
+
|
|
27
|
+
if PY3:
|
|
28
|
+
import importlib.machinery
|
|
29
|
+
string_types = (str,)
|
|
30
|
+
binary_types = (bytes,bytearray)
|
|
31
|
+
range_func = range
|
|
32
|
+
memoryview_type = memoryview
|
|
33
|
+
struct_bool_decl = "?"
|
|
34
|
+
else:
|
|
35
|
+
import imp
|
|
36
|
+
string_types = (unicode,)
|
|
37
|
+
if PY26 or PY27:
|
|
38
|
+
binary_types = (str,bytearray)
|
|
39
|
+
else:
|
|
40
|
+
binary_types = (str,)
|
|
41
|
+
range_func = xrange
|
|
42
|
+
if PY26 or (PY27 and not PY275):
|
|
43
|
+
memoryview_type = buffer
|
|
44
|
+
struct_bool_decl = "<b"
|
|
45
|
+
else:
|
|
46
|
+
memoryview_type = memoryview
|
|
47
|
+
struct_bool_decl = "?"
|
|
48
|
+
|
|
49
|
+
# Helper functions to facilitate making numpy optional instead of required
|
|
50
|
+
|
|
51
|
+
def import_numpy():
|
|
52
|
+
"""
|
|
53
|
+
Returns the numpy module if it exists on the system,
|
|
54
|
+
otherwise returns None.
|
|
55
|
+
"""
|
|
56
|
+
if PY3:
|
|
57
|
+
numpy_exists = (
|
|
58
|
+
importlib.machinery.PathFinder.find_spec('numpy') is not None)
|
|
59
|
+
else:
|
|
60
|
+
try:
|
|
61
|
+
imp.find_module('numpy')
|
|
62
|
+
numpy_exists = True
|
|
63
|
+
except ImportError:
|
|
64
|
+
numpy_exists = False
|
|
65
|
+
|
|
66
|
+
if numpy_exists:
|
|
67
|
+
# We do this outside of try/except block in case numpy exists
|
|
68
|
+
# but is not installed correctly. We do not want to catch an
|
|
69
|
+
# incorrect installation which would manifest as an
|
|
70
|
+
# ImportError.
|
|
71
|
+
import numpy as np
|
|
72
|
+
else:
|
|
73
|
+
np = None
|
|
74
|
+
|
|
75
|
+
return np
|
|
76
|
+
|
|
77
|
+
|
|
78
|
+
class NumpyRequiredForThisFeature(RuntimeError):
|
|
79
|
+
"""
|
|
80
|
+
Error raised when user tries to use a feature that
|
|
81
|
+
requires numpy without having numpy installed.
|
|
82
|
+
"""
|
|
83
|
+
pass
|
|
84
|
+
|
|
85
|
+
|
|
86
|
+
# NOTE: Future Jython support may require code here (look at `six`).
|
flatbuffers/encode.py
ADDED
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
# Copyright 2014 Google Inc. All rights reserved.
|
|
2
|
+
#
|
|
3
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
4
|
+
# you may not use this file except in compliance with the License.
|
|
5
|
+
# You may obtain a copy of the License at
|
|
6
|
+
#
|
|
7
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
|
8
|
+
#
|
|
9
|
+
# Unless required by applicable law or agreed to in writing, software
|
|
10
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
11
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
12
|
+
# See the License for the specific language governing permissions and
|
|
13
|
+
# limitations under the License.
|
|
14
|
+
|
|
15
|
+
from . import number_types as N
|
|
16
|
+
from . import packer
|
|
17
|
+
from .compat import memoryview_type
|
|
18
|
+
from .compat import import_numpy, NumpyRequiredForThisFeature
|
|
19
|
+
|
|
20
|
+
np = import_numpy()
|
|
21
|
+
|
|
22
|
+
FILE_IDENTIFIER_LENGTH=4
|
|
23
|
+
|
|
24
|
+
def Get(packer_type, buf, head):
|
|
25
|
+
""" Get decodes a value at buf[head] using `packer_type`. """
|
|
26
|
+
return packer_type.unpack_from(memoryview_type(buf), head)[0]
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
def GetVectorAsNumpy(numpy_type, buf, count, offset):
|
|
30
|
+
""" GetVecAsNumpy decodes values starting at buf[head] as
|
|
31
|
+
`numpy_type`, where `numpy_type` is a numpy dtype. """
|
|
32
|
+
if np is not None:
|
|
33
|
+
# TODO: could set .flags.writeable = False to make users jump through
|
|
34
|
+
# hoops before modifying...
|
|
35
|
+
return np.frombuffer(buf, dtype=numpy_type, count=count, offset=offset)
|
|
36
|
+
else:
|
|
37
|
+
raise NumpyRequiredForThisFeature('Numpy was not found.')
|
|
38
|
+
|
|
39
|
+
|
|
40
|
+
def Write(packer_type, buf, head, n):
|
|
41
|
+
""" Write encodes `n` at buf[head] using `packer_type`. """
|
|
42
|
+
packer_type.pack_into(buf, head, n)
|