pyfusefilter 1.1.2__tar.gz → 1.1.3__tar.gz
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.
- {pyfusefilter-1.1.2 → pyfusefilter-1.1.3}/PKG-INFO +23 -20
- {pyfusefilter-1.1.2 → pyfusefilter-1.1.3}/README.md +22 -19
- {pyfusefilter-1.1.2 → pyfusefilter-1.1.3}/pyfusefilter/__init__.py +1 -1
- {pyfusefilter-1.1.2 → pyfusefilter-1.1.3}/pyfusefilter.egg-info/PKG-INFO +23 -20
- {pyfusefilter-1.1.2 → pyfusefilter-1.1.3}/pyproject.toml +2 -2
- {pyfusefilter-1.1.2 → pyfusefilter-1.1.3}/setup.py +1 -1
- {pyfusefilter-1.1.2 → pyfusefilter-1.1.3}/LICENSE +0 -0
- {pyfusefilter-1.1.2 → pyfusefilter-1.1.3}/MANIFEST.in +0 -0
- {pyfusefilter-1.1.2 → pyfusefilter-1.1.3}/lib/xor_singleheader/include/binaryfusefilter.h +0 -0
- {pyfusefilter-1.1.2 → pyfusefilter-1.1.3}/lib/xor_singleheader/include/xorfilter.h +0 -0
- {pyfusefilter-1.1.2 → pyfusefilter-1.1.3}/pyfusefilter/ffibuild.py +0 -0
- {pyfusefilter-1.1.2 → pyfusefilter-1.1.3}/pyfusefilter/pyfusefilter.py +0 -0
- {pyfusefilter-1.1.2 → pyfusefilter-1.1.3}/pyfusefilter.egg-info/SOURCES.txt +0 -0
- {pyfusefilter-1.1.2 → pyfusefilter-1.1.3}/pyfusefilter.egg-info/dependency_links.txt +0 -0
- {pyfusefilter-1.1.2 → pyfusefilter-1.1.3}/pyfusefilter.egg-info/requires.txt +0 -0
- {pyfusefilter-1.1.2 → pyfusefilter-1.1.3}/pyfusefilter.egg-info/top_level.txt +0 -0
- {pyfusefilter-1.1.2 → pyfusefilter-1.1.3}/setup.cfg +0 -0
- {pyfusefilter-1.1.2 → pyfusefilter-1.1.3}/tests/__init__.py +0 -0
- {pyfusefilter-1.1.2 → pyfusefilter-1.1.3}/tests/test_fuse16.py +0 -0
- {pyfusefilter-1.1.2 → pyfusefilter-1.1.3}/tests/test_fuse8.py +0 -0
- {pyfusefilter-1.1.2 → pyfusefilter-1.1.3}/tests/test_xor16.py +0 -0
- {pyfusefilter-1.1.2 → pyfusefilter-1.1.3}/tests/test_xor8.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: pyfusefilter
|
|
3
|
-
Version: 1.1.
|
|
3
|
+
Version: 1.1.3
|
|
4
4
|
Summary: Python bindings for C implementation of xor and fuse filters
|
|
5
5
|
Home-page: https://github.com/FastFilter/pyfusefilter
|
|
6
6
|
Author: Amey Narkhede & Daniel Lemire
|
|
@@ -241,33 +241,36 @@ faster.
|
|
|
241
241
|
|
|
242
242
|
|
|
243
243
|
```py
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
True
|
|
252
|
-
>>> filter[51] #You can use __getitem__ instead of contains
|
|
253
|
-
True
|
|
254
|
-
>>> filter["か"]
|
|
255
|
-
False
|
|
256
|
-
>>> filter.size_in_bytes()
|
|
257
|
-
60
|
|
244
|
+
import pyfusefilter
|
|
245
|
+
#Supports unicode strings and heterogeneous types
|
|
246
|
+
filter = pyfusefilter.Xor8(["あ","अ", 51, 0.0, 12.3])
|
|
247
|
+
filter.contains("अ") # returns true
|
|
248
|
+
# next returns true
|
|
249
|
+
filter[51] #You can use __getitem__ instead of contains
|
|
250
|
+
filter["か"] # returns false
|
|
258
251
|
```
|
|
259
252
|
|
|
260
253
|
|
|
261
254
|
The `size_in_bytes()` function gives the memory usage of the filter itself. It does not count
|
|
262
|
-
the Python overhead which adds a few bytes to the actual memory usage
|
|
255
|
+
the Python overhead which adds a few bytes to the actual memory usage:
|
|
256
|
+
|
|
257
|
+
```py
|
|
258
|
+
filter.size_in_bytes()
|
|
259
|
+
```
|
|
263
260
|
|
|
264
261
|
You can serialize a filter with the `serialize()` method which returns a buffer, and you can recover the filter with the `deserialize(buffer)` method, which returns a filter:
|
|
265
262
|
|
|
266
263
|
```py
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
264
|
+
import pyfusefilter
|
|
265
|
+
import tempfile
|
|
266
|
+
|
|
267
|
+
filter = pyfusefilter.Xor8(["あ","अ", 51, 0.0, 12.3])
|
|
268
|
+
with tempfile.NamedTemporaryFile(delete=False) as tmp:
|
|
269
|
+
tmp.write(filter.serialize())
|
|
270
|
+
tmp_path = tmp.name
|
|
271
|
+
with open(tmp_path, 'rb') as f:
|
|
272
|
+
recoverfilter = pyfusefilter.Xor8.deserialize(f.read())
|
|
273
|
+
recoverfilter[51] # returns True
|
|
271
274
|
```
|
|
272
275
|
|
|
273
276
|
The serialization format is as concise as possible and will typically use a few bytes
|
|
@@ -21,33 +21,36 @@ faster.
|
|
|
21
21
|
|
|
22
22
|
|
|
23
23
|
```py
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
True
|
|
32
|
-
>>> filter[51] #You can use __getitem__ instead of contains
|
|
33
|
-
True
|
|
34
|
-
>>> filter["か"]
|
|
35
|
-
False
|
|
36
|
-
>>> filter.size_in_bytes()
|
|
37
|
-
60
|
|
24
|
+
import pyfusefilter
|
|
25
|
+
#Supports unicode strings and heterogeneous types
|
|
26
|
+
filter = pyfusefilter.Xor8(["あ","अ", 51, 0.0, 12.3])
|
|
27
|
+
filter.contains("अ") # returns true
|
|
28
|
+
# next returns true
|
|
29
|
+
filter[51] #You can use __getitem__ instead of contains
|
|
30
|
+
filter["か"] # returns false
|
|
38
31
|
```
|
|
39
32
|
|
|
40
33
|
|
|
41
34
|
The `size_in_bytes()` function gives the memory usage of the filter itself. It does not count
|
|
42
|
-
the Python overhead which adds a few bytes to the actual memory usage
|
|
35
|
+
the Python overhead which adds a few bytes to the actual memory usage:
|
|
36
|
+
|
|
37
|
+
```py
|
|
38
|
+
filter.size_in_bytes()
|
|
39
|
+
```
|
|
43
40
|
|
|
44
41
|
You can serialize a filter with the `serialize()` method which returns a buffer, and you can recover the filter with the `deserialize(buffer)` method, which returns a filter:
|
|
45
42
|
|
|
46
43
|
```py
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
44
|
+
import pyfusefilter
|
|
45
|
+
import tempfile
|
|
46
|
+
|
|
47
|
+
filter = pyfusefilter.Xor8(["あ","अ", 51, 0.0, 12.3])
|
|
48
|
+
with tempfile.NamedTemporaryFile(delete=False) as tmp:
|
|
49
|
+
tmp.write(filter.serialize())
|
|
50
|
+
tmp_path = tmp.name
|
|
51
|
+
with open(tmp_path, 'rb') as f:
|
|
52
|
+
recoverfilter = pyfusefilter.Xor8.deserialize(f.read())
|
|
53
|
+
recoverfilter[51] # returns True
|
|
51
54
|
```
|
|
52
55
|
|
|
53
56
|
The serialization format is as concise as possible and will typically use a few bytes
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: pyfusefilter
|
|
3
|
-
Version: 1.1.
|
|
3
|
+
Version: 1.1.3
|
|
4
4
|
Summary: Python bindings for C implementation of xor and fuse filters
|
|
5
5
|
Home-page: https://github.com/FastFilter/pyfusefilter
|
|
6
6
|
Author: Amey Narkhede & Daniel Lemire
|
|
@@ -241,33 +241,36 @@ faster.
|
|
|
241
241
|
|
|
242
242
|
|
|
243
243
|
```py
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
True
|
|
252
|
-
>>> filter[51] #You can use __getitem__ instead of contains
|
|
253
|
-
True
|
|
254
|
-
>>> filter["か"]
|
|
255
|
-
False
|
|
256
|
-
>>> filter.size_in_bytes()
|
|
257
|
-
60
|
|
244
|
+
import pyfusefilter
|
|
245
|
+
#Supports unicode strings and heterogeneous types
|
|
246
|
+
filter = pyfusefilter.Xor8(["あ","अ", 51, 0.0, 12.3])
|
|
247
|
+
filter.contains("अ") # returns true
|
|
248
|
+
# next returns true
|
|
249
|
+
filter[51] #You can use __getitem__ instead of contains
|
|
250
|
+
filter["か"] # returns false
|
|
258
251
|
```
|
|
259
252
|
|
|
260
253
|
|
|
261
254
|
The `size_in_bytes()` function gives the memory usage of the filter itself. It does not count
|
|
262
|
-
the Python overhead which adds a few bytes to the actual memory usage
|
|
255
|
+
the Python overhead which adds a few bytes to the actual memory usage:
|
|
256
|
+
|
|
257
|
+
```py
|
|
258
|
+
filter.size_in_bytes()
|
|
259
|
+
```
|
|
263
260
|
|
|
264
261
|
You can serialize a filter with the `serialize()` method which returns a buffer, and you can recover the filter with the `deserialize(buffer)` method, which returns a filter:
|
|
265
262
|
|
|
266
263
|
```py
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
264
|
+
import pyfusefilter
|
|
265
|
+
import tempfile
|
|
266
|
+
|
|
267
|
+
filter = pyfusefilter.Xor8(["あ","अ", 51, 0.0, 12.3])
|
|
268
|
+
with tempfile.NamedTemporaryFile(delete=False) as tmp:
|
|
269
|
+
tmp.write(filter.serialize())
|
|
270
|
+
tmp_path = tmp.name
|
|
271
|
+
with open(tmp_path, 'rb') as f:
|
|
272
|
+
recoverfilter = pyfusefilter.Xor8.deserialize(f.read())
|
|
273
|
+
recoverfilter[51] # returns True
|
|
271
274
|
```
|
|
272
275
|
|
|
273
276
|
The serialization format is as concise as possible and will typically use a few bytes
|
|
@@ -3,7 +3,7 @@ py-modules = []
|
|
|
3
3
|
# cffi-modules handled in setup.py
|
|
4
4
|
[project]
|
|
5
5
|
name = "pyfusefilter"
|
|
6
|
-
version = "1.1.
|
|
6
|
+
version = "1.1.3"
|
|
7
7
|
description = "Python bindings for C implementation of xor and fuse filters"
|
|
8
8
|
authors = [
|
|
9
9
|
{name = "Amey Narkhede", email = "ameynarkhede02@gmail.com"},
|
|
@@ -43,7 +43,7 @@ before-all = "apk add libffi-dev"
|
|
|
43
43
|
# pdoc configuration
|
|
44
44
|
name = "pyfusefilter"
|
|
45
45
|
description = "Python bindings for C implementation of xor and fuse filters"
|
|
46
|
-
version = "1.1.
|
|
46
|
+
version = "1.1.3"
|
|
47
47
|
author = "Amey Narkhede & Daniel Lemire"
|
|
48
48
|
author_email = "daniel@lemire.me"
|
|
49
49
|
url = "https://github.com/FastFilter/pyfusefilter"
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|