zlmdb 25.10.1__cp314-cp314-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.

Files changed (86) hide show
  1. flatbuffers/__init__.py +19 -0
  2. flatbuffers/_version.py +17 -0
  3. flatbuffers/builder.py +776 -0
  4. flatbuffers/compat.py +86 -0
  5. flatbuffers/encode.py +42 -0
  6. flatbuffers/flexbuffers.py +1527 -0
  7. flatbuffers/number_types.py +181 -0
  8. flatbuffers/packer.py +42 -0
  9. flatbuffers/reflection/AdvancedFeatures.py +10 -0
  10. flatbuffers/reflection/BaseType.py +24 -0
  11. flatbuffers/reflection/Enum.py +169 -0
  12. flatbuffers/reflection/EnumVal.py +96 -0
  13. flatbuffers/reflection/Field.py +208 -0
  14. flatbuffers/reflection/KeyValue.py +56 -0
  15. flatbuffers/reflection/Object.py +175 -0
  16. flatbuffers/reflection/RPCCall.py +131 -0
  17. flatbuffers/reflection/Schema.py +206 -0
  18. flatbuffers/reflection/SchemaFile.py +77 -0
  19. flatbuffers/reflection/Service.py +145 -0
  20. flatbuffers/reflection/Type.py +98 -0
  21. flatbuffers/reflection/__init__.py +0 -0
  22. flatbuffers/table.py +129 -0
  23. flatbuffers/util.py +43 -0
  24. zlmdb/__init__.py +312 -0
  25. zlmdb/_database.py +990 -0
  26. zlmdb/_errors.py +31 -0
  27. zlmdb/_meta.py +27 -0
  28. zlmdb/_pmap.py +1667 -0
  29. zlmdb/_schema.py +137 -0
  30. zlmdb/_transaction.py +181 -0
  31. zlmdb/_types.py +1596 -0
  32. zlmdb/_version.py +27 -0
  33. zlmdb/cli.py +41 -0
  34. zlmdb/flatbuffers/__init__.py +5 -0
  35. zlmdb/flatbuffers/reflection/AdvancedFeatures.py +10 -0
  36. zlmdb/flatbuffers/reflection/BaseType.py +25 -0
  37. zlmdb/flatbuffers/reflection/Enum.py +252 -0
  38. zlmdb/flatbuffers/reflection/EnumVal.py +144 -0
  39. zlmdb/flatbuffers/reflection/Field.py +325 -0
  40. zlmdb/flatbuffers/reflection/KeyValue.py +84 -0
  41. zlmdb/flatbuffers/reflection/Object.py +260 -0
  42. zlmdb/flatbuffers/reflection/RPCCall.py +195 -0
  43. zlmdb/flatbuffers/reflection/Schema.py +301 -0
  44. zlmdb/flatbuffers/reflection/SchemaFile.py +112 -0
  45. zlmdb/flatbuffers/reflection/Service.py +213 -0
  46. zlmdb/flatbuffers/reflection/Type.py +148 -0
  47. zlmdb/flatbuffers/reflection/__init__.py +0 -0
  48. zlmdb/flatbuffers/reflection.fbs +152 -0
  49. zlmdb/lmdb/__init__.py +37 -0
  50. zlmdb/lmdb/__main__.py +25 -0
  51. zlmdb/lmdb/_config.py +10 -0
  52. zlmdb/lmdb/cffi.py +2606 -0
  53. zlmdb/lmdb/tool.py +670 -0
  54. zlmdb/tests/lmdb/__init__.py +0 -0
  55. zlmdb/tests/lmdb/address_book.py +287 -0
  56. zlmdb/tests/lmdb/crash_test.py +339 -0
  57. zlmdb/tests/lmdb/cursor_test.py +333 -0
  58. zlmdb/tests/lmdb/env_test.py +919 -0
  59. zlmdb/tests/lmdb/getmulti_test.py +92 -0
  60. zlmdb/tests/lmdb/iteration_test.py +258 -0
  61. zlmdb/tests/lmdb/package_test.py +70 -0
  62. zlmdb/tests/lmdb/test_lmdb.py +188 -0
  63. zlmdb/tests/lmdb/testlib.py +185 -0
  64. zlmdb/tests/lmdb/tool_test.py +60 -0
  65. zlmdb/tests/lmdb/txn_test.py +575 -0
  66. zlmdb/tests/orm/MNodeLog.py +853 -0
  67. zlmdb/tests/orm/__init__.py +0 -0
  68. zlmdb/tests/orm/_schema_fbs.py +215 -0
  69. zlmdb/tests/orm/_schema_mnode_log.py +1201 -0
  70. zlmdb/tests/orm/_schema_py2.py +250 -0
  71. zlmdb/tests/orm/_schema_py3.py +307 -0
  72. zlmdb/tests/orm/_test_flatbuffers.py +144 -0
  73. zlmdb/tests/orm/_test_serialization.py +144 -0
  74. zlmdb/tests/orm/test_basic.py +217 -0
  75. zlmdb/tests/orm/test_etcd.py +275 -0
  76. zlmdb/tests/orm/test_pmap_indexes.py +466 -0
  77. zlmdb/tests/orm/test_pmap_types.py +90 -0
  78. zlmdb/tests/orm/test_pmaps.py +295 -0
  79. zlmdb/tests/orm/test_select.py +619 -0
  80. zlmdb-25.10.1.dist-info/METADATA +264 -0
  81. zlmdb-25.10.1.dist-info/RECORD +86 -0
  82. zlmdb-25.10.1.dist-info/WHEEL +5 -0
  83. zlmdb-25.10.1.dist-info/entry_points.txt +2 -0
  84. zlmdb-25.10.1.dist-info/licenses/LICENSE +137 -0
  85. zlmdb-25.10.1.dist-info/licenses/NOTICE +41 -0
  86. zlmdb-25.10.1.dist-info/top_level.txt +2 -0
@@ -0,0 +1,213 @@
1
+ # automatically generated by the FlatBuffers compiler, do not modify
2
+
3
+ # namespace: reflection
4
+
5
+ import flatbuffers
6
+ from flatbuffers.compat import import_numpy
7
+
8
+ np = import_numpy()
9
+
10
+
11
+ class Service(object):
12
+ __slots__ = ["_tab"]
13
+
14
+ @classmethod
15
+ def GetRootAs(cls, buf, offset=0):
16
+ n = flatbuffers.encode.Get(flatbuffers.packer.uoffset, buf, offset)
17
+ x = Service()
18
+ x.Init(buf, n + offset)
19
+ return x
20
+
21
+ @classmethod
22
+ def GetRootAsService(cls, buf, offset=0):
23
+ """This method is deprecated. Please switch to GetRootAs."""
24
+ return cls.GetRootAs(buf, offset)
25
+
26
+ @classmethod
27
+ def ServiceBufferHasIdentifier(cls, buf, offset, size_prefixed=False):
28
+ return flatbuffers.util.BufferHasIdentifier(
29
+ buf, offset, b"\x42\x46\x42\x53", size_prefixed=size_prefixed
30
+ )
31
+
32
+ # Service
33
+ def Init(self, buf, pos):
34
+ self._tab = flatbuffers.table.Table(buf, pos)
35
+
36
+ # Service
37
+ def Name(self):
38
+ o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(4))
39
+ if o != 0:
40
+ return self._tab.String(o + self._tab.Pos)
41
+ return None
42
+
43
+ # Service
44
+ def Calls(self, j):
45
+ o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(6))
46
+ if o != 0:
47
+ x = self._tab.Vector(o)
48
+ x += flatbuffers.number_types.UOffsetTFlags.py_type(j) * 4
49
+ x = self._tab.Indirect(x)
50
+ from zlmdb.flatbuffers.reflection.RPCCall import RPCCall
51
+
52
+ obj = RPCCall()
53
+ obj.Init(self._tab.Bytes, x)
54
+ return obj
55
+ return None
56
+
57
+ # Service
58
+ def CallsLength(self):
59
+ o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(6))
60
+ if o != 0:
61
+ return self._tab.VectorLen(o)
62
+ return 0
63
+
64
+ # Service
65
+ def CallsIsNone(self):
66
+ o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(6))
67
+ return o == 0
68
+
69
+ # Service
70
+ def Attributes(self, j):
71
+ o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(8))
72
+ if o != 0:
73
+ x = self._tab.Vector(o)
74
+ x += flatbuffers.number_types.UOffsetTFlags.py_type(j) * 4
75
+ x = self._tab.Indirect(x)
76
+ from zlmdb.flatbuffers.reflection.KeyValue import KeyValue
77
+
78
+ obj = KeyValue()
79
+ obj.Init(self._tab.Bytes, x)
80
+ return obj
81
+ return None
82
+
83
+ # Service
84
+ def AttributesLength(self):
85
+ o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(8))
86
+ if o != 0:
87
+ return self._tab.VectorLen(o)
88
+ return 0
89
+
90
+ # Service
91
+ def AttributesIsNone(self):
92
+ o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(8))
93
+ return o == 0
94
+
95
+ # Service
96
+ def Documentation(self, j):
97
+ o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(10))
98
+ if o != 0:
99
+ a = self._tab.Vector(o)
100
+ return self._tab.String(
101
+ a + flatbuffers.number_types.UOffsetTFlags.py_type(j * 4)
102
+ )
103
+ return ""
104
+
105
+ # Service
106
+ def DocumentationLength(self):
107
+ o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(10))
108
+ if o != 0:
109
+ return self._tab.VectorLen(o)
110
+ return 0
111
+
112
+ # Service
113
+ def DocumentationIsNone(self):
114
+ o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(10))
115
+ return o == 0
116
+
117
+ # File that this Service is declared in.
118
+ # Service
119
+ def DeclarationFile(self):
120
+ o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(12))
121
+ if o != 0:
122
+ return self._tab.String(o + self._tab.Pos)
123
+ return None
124
+
125
+
126
+ def ServiceStart(builder):
127
+ builder.StartObject(5)
128
+
129
+
130
+ def Start(builder):
131
+ return ServiceStart(builder)
132
+
133
+
134
+ def ServiceAddName(builder, name):
135
+ builder.PrependUOffsetTRelativeSlot(
136
+ 0, flatbuffers.number_types.UOffsetTFlags.py_type(name), 0
137
+ )
138
+
139
+
140
+ def AddName(builder, name):
141
+ return ServiceAddName(builder, name)
142
+
143
+
144
+ def ServiceAddCalls(builder, calls):
145
+ builder.PrependUOffsetTRelativeSlot(
146
+ 1, flatbuffers.number_types.UOffsetTFlags.py_type(calls), 0
147
+ )
148
+
149
+
150
+ def AddCalls(builder, calls):
151
+ return ServiceAddCalls(builder, calls)
152
+
153
+
154
+ def ServiceStartCallsVector(builder, numElems):
155
+ return builder.StartVector(4, numElems, 4)
156
+
157
+
158
+ def StartCallsVector(builder, numElems):
159
+ return ServiceStartCallsVector(builder, numElems)
160
+
161
+
162
+ def ServiceAddAttributes(builder, attributes):
163
+ builder.PrependUOffsetTRelativeSlot(
164
+ 2, flatbuffers.number_types.UOffsetTFlags.py_type(attributes), 0
165
+ )
166
+
167
+
168
+ def AddAttributes(builder, attributes):
169
+ return ServiceAddAttributes(builder, attributes)
170
+
171
+
172
+ def ServiceStartAttributesVector(builder, numElems):
173
+ return builder.StartVector(4, numElems, 4)
174
+
175
+
176
+ def StartAttributesVector(builder, numElems):
177
+ return ServiceStartAttributesVector(builder, numElems)
178
+
179
+
180
+ def ServiceAddDocumentation(builder, documentation):
181
+ builder.PrependUOffsetTRelativeSlot(
182
+ 3, flatbuffers.number_types.UOffsetTFlags.py_type(documentation), 0
183
+ )
184
+
185
+
186
+ def AddDocumentation(builder, documentation):
187
+ return ServiceAddDocumentation(builder, documentation)
188
+
189
+
190
+ def ServiceStartDocumentationVector(builder, numElems):
191
+ return builder.StartVector(4, numElems, 4)
192
+
193
+
194
+ def StartDocumentationVector(builder, numElems):
195
+ return ServiceStartDocumentationVector(builder, numElems)
196
+
197
+
198
+ def ServiceAddDeclarationFile(builder, declarationFile):
199
+ builder.PrependUOffsetTRelativeSlot(
200
+ 4, flatbuffers.number_types.UOffsetTFlags.py_type(declarationFile), 0
201
+ )
202
+
203
+
204
+ def AddDeclarationFile(builder, declarationFile):
205
+ return ServiceAddDeclarationFile(builder, declarationFile)
206
+
207
+
208
+ def ServiceEnd(builder):
209
+ return builder.EndObject()
210
+
211
+
212
+ def End(builder):
213
+ return ServiceEnd(builder)
@@ -0,0 +1,148 @@
1
+ # automatically generated by the FlatBuffers compiler, do not modify
2
+
3
+ # namespace: reflection
4
+
5
+ import flatbuffers
6
+ from flatbuffers.compat import import_numpy
7
+
8
+ np = import_numpy()
9
+
10
+
11
+ class Type(object):
12
+ __slots__ = ["_tab"]
13
+
14
+ @classmethod
15
+ def GetRootAs(cls, buf, offset=0):
16
+ n = flatbuffers.encode.Get(flatbuffers.packer.uoffset, buf, offset)
17
+ x = Type()
18
+ x.Init(buf, n + offset)
19
+ return x
20
+
21
+ @classmethod
22
+ def GetRootAsType(cls, buf, offset=0):
23
+ """This method is deprecated. Please switch to GetRootAs."""
24
+ return cls.GetRootAs(buf, offset)
25
+
26
+ @classmethod
27
+ def TypeBufferHasIdentifier(cls, buf, offset, size_prefixed=False):
28
+ return flatbuffers.util.BufferHasIdentifier(
29
+ buf, offset, b"\x42\x46\x42\x53", size_prefixed=size_prefixed
30
+ )
31
+
32
+ # Type
33
+ def Init(self, buf, pos):
34
+ self._tab = flatbuffers.table.Table(buf, pos)
35
+
36
+ # Type
37
+ def BaseType(self):
38
+ o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(4))
39
+ if o != 0:
40
+ return self._tab.Get(flatbuffers.number_types.Int8Flags, o + self._tab.Pos)
41
+ return 0
42
+
43
+ # Type
44
+ def Element(self):
45
+ o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(6))
46
+ if o != 0:
47
+ return self._tab.Get(flatbuffers.number_types.Int8Flags, o + self._tab.Pos)
48
+ return 0
49
+
50
+ # Type
51
+ def Index(self):
52
+ o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(8))
53
+ if o != 0:
54
+ return self._tab.Get(flatbuffers.number_types.Int32Flags, o + self._tab.Pos)
55
+ return -1
56
+
57
+ # Type
58
+ def FixedLength(self):
59
+ o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(10))
60
+ if o != 0:
61
+ return self._tab.Get(
62
+ flatbuffers.number_types.Uint16Flags, o + self._tab.Pos
63
+ )
64
+ return 0
65
+
66
+ # The size (octets) of the `base_type` field.
67
+ # Type
68
+ def BaseSize(self):
69
+ o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(12))
70
+ if o != 0:
71
+ return self._tab.Get(
72
+ flatbuffers.number_types.Uint32Flags, o + self._tab.Pos
73
+ )
74
+ return 4
75
+
76
+ # The size (octets) of the `element` field, if present.
77
+ # Type
78
+ def ElementSize(self):
79
+ o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(14))
80
+ if o != 0:
81
+ return self._tab.Get(
82
+ flatbuffers.number_types.Uint32Flags, o + self._tab.Pos
83
+ )
84
+ return 0
85
+
86
+
87
+ def TypeStart(builder):
88
+ builder.StartObject(6)
89
+
90
+
91
+ def Start(builder):
92
+ return TypeStart(builder)
93
+
94
+
95
+ def TypeAddBaseType(builder, baseType):
96
+ builder.PrependInt8Slot(0, baseType, 0)
97
+
98
+
99
+ def AddBaseType(builder, baseType):
100
+ return TypeAddBaseType(builder, baseType)
101
+
102
+
103
+ def TypeAddElement(builder, element):
104
+ builder.PrependInt8Slot(1, element, 0)
105
+
106
+
107
+ def AddElement(builder, element):
108
+ return TypeAddElement(builder, element)
109
+
110
+
111
+ def TypeAddIndex(builder, index):
112
+ builder.PrependInt32Slot(2, index, -1)
113
+
114
+
115
+ def AddIndex(builder, index):
116
+ return TypeAddIndex(builder, index)
117
+
118
+
119
+ def TypeAddFixedLength(builder, fixedLength):
120
+ builder.PrependUint16Slot(3, fixedLength, 0)
121
+
122
+
123
+ def AddFixedLength(builder, fixedLength):
124
+ return TypeAddFixedLength(builder, fixedLength)
125
+
126
+
127
+ def TypeAddBaseSize(builder, baseSize):
128
+ builder.PrependUint32Slot(4, baseSize, 4)
129
+
130
+
131
+ def AddBaseSize(builder, baseSize):
132
+ return TypeAddBaseSize(builder, baseSize)
133
+
134
+
135
+ def TypeAddElementSize(builder, elementSize):
136
+ builder.PrependUint32Slot(5, elementSize, 0)
137
+
138
+
139
+ def AddElementSize(builder, elementSize):
140
+ return TypeAddElementSize(builder, elementSize)
141
+
142
+
143
+ def TypeEnd(builder):
144
+ return builder.EndObject()
145
+
146
+
147
+ def End(builder):
148
+ return TypeEnd(builder)
File without changes
@@ -0,0 +1,152 @@
1
+ // This schema defines objects that represent a parsed schema, like
2
+ // the binary version of a .fbs file.
3
+ // This could be used to operate on unknown FlatBuffers at runtime.
4
+ // It can even ... represent itself (!)
5
+
6
+ namespace reflection;
7
+
8
+ // These must correspond to the enum in idl.h.
9
+ enum BaseType : byte {
10
+ None,
11
+ UType,
12
+ Bool,
13
+ Byte,
14
+ UByte,
15
+ Short,
16
+ UShort,
17
+ Int,
18
+ UInt,
19
+ Long,
20
+ ULong,
21
+ Float,
22
+ Double,
23
+ String,
24
+ Vector,
25
+ Obj, // Used for tables & structs.
26
+ Union,
27
+ Array,
28
+
29
+ // Add any new type above this value.
30
+ MaxBaseType
31
+ }
32
+
33
+ table Type {
34
+ base_type:BaseType;
35
+ element:BaseType = None; // Only if base_type == Vector
36
+ // or base_type == Array.
37
+ index:int = -1; // If base_type == Object, index into "objects" below.
38
+ // If base_type == Union, UnionType, or integral derived
39
+ // from an enum, index into "enums" below.
40
+ // If base_type == Vector && element == Union or UnionType.
41
+ fixed_length:uint16 = 0; // Only if base_type == Array.
42
+ /// The size (octets) of the `base_type` field.
43
+ base_size:uint = 4; // 4 Is a common size due to offsets being that size.
44
+ /// The size (octets) of the `element` field, if present.
45
+ element_size:uint = 0;
46
+ }
47
+
48
+ table KeyValue {
49
+ key:string (required, key);
50
+ value:string;
51
+ }
52
+
53
+ table EnumVal {
54
+ name:string (required);
55
+ value:long (key);
56
+ object:Object (deprecated);
57
+ union_type:Type;
58
+ documentation:[string];
59
+ }
60
+
61
+ table Enum {
62
+ name:string (required, key);
63
+ values:[EnumVal] (required); // In order of their values.
64
+ is_union:bool = false;
65
+ underlying_type:Type (required);
66
+ attributes:[KeyValue];
67
+ documentation:[string];
68
+ /// File that this Enum is declared in.
69
+ declaration_file: string;
70
+ }
71
+
72
+ table Field {
73
+ name:string (required, key);
74
+ type:Type (required);
75
+ id:ushort;
76
+ offset:ushort; // Offset into the vtable for tables, or into the struct.
77
+ default_integer:long = 0;
78
+ default_real:double = 0.0;
79
+ deprecated:bool = false;
80
+ required:bool = false;
81
+ key:bool = false;
82
+ attributes:[KeyValue];
83
+ documentation:[string];
84
+ optional:bool = false;
85
+ /// Number of padding octets to always add after this field. Structs only.
86
+ padding:uint16 = 0;
87
+ }
88
+
89
+ table Object { // Used for both tables and structs.
90
+ name:string (required, key);
91
+ fields:[Field] (required); // Sorted.
92
+ is_struct:bool = false;
93
+ minalign:int;
94
+ bytesize:int; // For structs.
95
+ attributes:[KeyValue];
96
+ documentation:[string];
97
+ /// File that this Object is declared in.
98
+ declaration_file: string;
99
+ }
100
+
101
+ table RPCCall {
102
+ name:string (required, key);
103
+ request:Object (required); // must be a table (not a struct)
104
+ response:Object (required); // must be a table (not a struct)
105
+ attributes:[KeyValue];
106
+ documentation:[string];
107
+ }
108
+
109
+ table Service {
110
+ name:string (required, key);
111
+ calls:[RPCCall];
112
+ attributes:[KeyValue];
113
+ documentation:[string];
114
+ /// File that this Service is declared in.
115
+ declaration_file: string;
116
+ }
117
+
118
+ /// New schema language features that are not supported by old code generators.
119
+ enum AdvancedFeatures : ulong (bit_flags) {
120
+ AdvancedArrayFeatures,
121
+ AdvancedUnionFeatures,
122
+ OptionalScalars,
123
+ DefaultVectorsAndStrings,
124
+ }
125
+
126
+ /// File specific information.
127
+ /// Symbols declared within a file may be recovered by iterating over all
128
+ /// symbols and examining the `declaration_file` field.
129
+ table SchemaFile {
130
+ /// Filename, relative to project root.
131
+ filename:string (required, key);
132
+ /// Names of included files, relative to project root.
133
+ included_filenames:[string];
134
+ }
135
+
136
+ table Schema {
137
+ objects:[Object] (required); // Sorted.
138
+ enums:[Enum] (required); // Sorted.
139
+ file_ident:string;
140
+ file_ext:string;
141
+ root_table:Object;
142
+ services:[Service]; // Sorted.
143
+ advanced_features:AdvancedFeatures;
144
+ /// All the files used in this compilation. Files are relative to where
145
+ /// flatc was invoked.
146
+ fbs_files:[SchemaFile]; // Sorted.
147
+ }
148
+
149
+ root_type Schema;
150
+
151
+ file_identifier "BFBS";
152
+ file_extension "bfbs";
zlmdb/lmdb/__init__.py ADDED
@@ -0,0 +1,37 @@
1
+ # Copyright 2013-2025 The py-lmdb authors, all rights reserved.
2
+ #
3
+ # Redistribution and use in source and binary forms, with or without
4
+ # modification, are permitted only as authorized by the OpenLDAP
5
+ # Public License.
6
+ #
7
+ # A copy of this license is available in the file LICENSE in the
8
+ # top-level directory of the distribution or, alternatively, at
9
+ # <http://www.OpenLDAP.org/license.html>.
10
+ #
11
+ # OpenLDAP is a registered trademark of the OpenLDAP Foundation.
12
+ #
13
+ # Individual files and/or contributed packages may be copyright by
14
+ # other parties and/or subject to additional restrictions.
15
+ #
16
+ # This work also contains materials derived from public sources.
17
+ #
18
+ # Additional information about OpenLDAP can be obtained at
19
+ # <http://www.openldap.org/>.
20
+
21
+ """
22
+ Python wrapper for OpenLDAP's "Lightning" MDB database.
23
+
24
+ Please see https://lmdb.readthedocs.io/
25
+ """
26
+
27
+
28
+ def _reading_docs():
29
+ """Return True if Sphinx is currently parsing this file."""
30
+ return "sphinx" in __import__("sys").modules
31
+
32
+
33
+ # CFFI-only mode (bundled with zlmdb)
34
+ from zlmdb.lmdb.cffi import *
35
+ from zlmdb.lmdb.cffi import open
36
+ from zlmdb.lmdb.cffi import __all__
37
+ from zlmdb.lmdb.cffi import __doc__
zlmdb/lmdb/__main__.py ADDED
@@ -0,0 +1,25 @@
1
+ # Copyright 2013-2024 The py-lmdb authors, all rights reserved.
2
+ #
3
+ # Redistribution and use in source and binary forms, with or without
4
+ # modification, are permitted only as authorized by the OpenLDAP
5
+ # Public License.
6
+ #
7
+ # A copy of this license is available in the file LICENSE in the
8
+ # top-level directory of the distribution or, alternatively, at
9
+ # <http://www.OpenLDAP.org/license.html>.
10
+ #
11
+ # OpenLDAP is a registered trademark of the OpenLDAP Foundation.
12
+ #
13
+ # Individual files and/or contributed packages may be copyright by
14
+ # other parties and/or subject to additional restrictions.
15
+ #
16
+ # This work also contains materials derived from public sources.
17
+ #
18
+ # Additional information about OpenLDAP can be obtained at
19
+ # <http://www.openldap.org/>.
20
+
21
+ # Hack to support Python >=v2.6 'python -m zlmdb.lmdb'
22
+ from __future__ import absolute_import
23
+ from . import tool # type: ignore[import-not-found]
24
+
25
+ tool.main()
zlmdb/lmdb/_config.py ADDED
@@ -0,0 +1,10 @@
1
+ # Auto-generated by build_lmdb.py
2
+ # DO NOT EDIT - regenerated on each build
3
+
4
+ CONFIG = {
5
+ 'extra_compile_args': ['-UNDEBUG', '-DHAVE_PATCHED_LMDB=1', '-w'],
6
+ 'extra_sources': ['build\\lmdb-src\\mdb.c', 'build\\lmdb-src\\midl.c'],
7
+ 'extra_library_dirs': [],
8
+ 'extra_include_dirs': ['build\\lmdb-src', 'lmdb-patches', 'lmdb-patches'],
9
+ 'libraries': ['Advapi32'],
10
+ }