python-rust-fst
tl;dr:
Work with larger-than-memory sets
Perform fuzzy search using Levenshtein automata
Installation
You will need:
Python >= 3.3, Python or PyPy >= 2.7 with development headers installed
Rust nightly (install via rustup)
Clone the repository. Installation with pip install git+... does not work currently
Run rustup override add nightly to add an override for rustup to use the nightly channel for the repository
Run python setup.py bdist_wheel to generate a wheel
Install the wheel with pip install dist/rust_fst-0.1-py3-none-any.whl
Status
The package exposes almost all functionality of the fst crate, except for:
Combining the results of slicing, search and search_re with set operations
Using raw transducers
Examples
from rust_fst import Map, Set
# Building a set in memory
keys = ["fa", "fo", "fob", "focus", "foo", "food", "foul"]
s = Set.from_iter(keys)
# Fuzzy searches on the set
matches = list(s.search(term="foo", max_dist=1))
assert matches == ["fo", "fob", "foo", "food"]
# Searching with a regular expression
matches = list(s.search_re(r'f\w{2}'))
assert matches == ["fob", "foo"]
# Store map on disk, requiring only constant memory for querying
items = [("bruce", 1), ("clarence", 2), ("stevie", 3)]
m = Map.from_iter(items, path="/tmp/map.fst")
# Find all items whose key is greater or equal (in lexicographical sense) to
# 'clarence'
matches = dict(m['clarence':])
assert matches == {'clarence': 2, 'stevie': 3}
Documentation
Head over to readthedocs.org for the API documentation.
Metadata
Release files for rust-fst 0.1.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| rust-fst-0.1.2.tar.gz | 8.3 kB | Without provenance | Details |
Built distributions (wheels)
| File | Reset | |||
|---|---|---|---|---|
| rust_fst-0.1.2-py2.py3-none-win_amd64.whl | Python 2, Python 3 | none | Windows x86-64 | Details |
| rust_fst-0.1.2-py2.py3-none-win32.whl | Python 3, Python 2 | none | Windows x86-32 | Details |
| rust_fst-0.1.2-py2.py3-none-manylinux1_x86_64.whl | Python 2, Python 3 | none | Linux glibc 2.5+ x86-64 | Details |
| rust_fst-0.1.2-py2.py3-none-macosx_10_9_x86_64.whl | Python 3, Python 2 | none | macOS 10.9+ x86-64 | Details |
Total release size: 4.4 MB
Release files / rust-fst-0.1.2.tar.gz
| Download URL | rust-fst-0.1.2.tar.gz |
|---|---|
| Size | 8.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
e647e9ae1c38ae2e6f6967ea7bb9075bb06c020e5d0f344f4182786040105886
|
|
BLAKE2b-256 checksum How to use checksums |
fb88db1427d446119800e00c6e01bd2ffc2cab6babe39e84a014e6afef4a9b22
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Release files / rust_fst-0.1.2-py2.py3-none-win_amd64.whl
| Download URL | rust_fst-0.1.2-py2.py3-none-win_amd64.whl |
|---|---|
| Size | 1.3 MB |
| Tags | Python 2 Python 3 Windows x86-64 |
|
SHA-256 checksum How to use checksums |
04c3bcd57ed20688d885e220c0e83df69b956c929b3e1c12ed8431effa3a1e52
|
|
BLAKE2b-256 checksum How to use checksums |
c09da116a1eb984c4798d8386f8366147b0a2e8562d7386f23db6327a0b007ee
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Release files / rust_fst-0.1.2-py2.py3-none-win32.whl
| Download URL | rust_fst-0.1.2-py2.py3-none-win32.whl |
|---|---|
| Size | 1.2 MB |
| Tags | Python 2 Python 3 Windows x86-32 |
|
SHA-256 checksum How to use checksums |
5ea0461726d0f044a32ae39620ab93762a0cefd0c7a825a36eff59f9d3c4f508
|
|
BLAKE2b-256 checksum How to use checksums |
cd243e47451113ab401be513e8ed64023d7c96c2203a4e1493155e9cf44b4fc4
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Release files / rust_fst-0.1.2-py2.py3-none-manylinux1_x86_64.whl
| Download URL | rust_fst-0.1.2-py2.py3-none-manylinux1_x86_64.whl |
|---|---|
| Size | 1.0 MB |
| Tags | Linux glibc 2.5+ x86-64 Python 2 Python 3 |
|
SHA-256 checksum How to use checksums |
0ee2261e89264709d8ef040965c12538bb3b7db89ee00e22f8816d19c86295ce
|
|
BLAKE2b-256 checksum How to use checksums |
f264d8aba6d4bc2193377359086062af8367afb3d8726774fe4750f00c07653a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Release files / rust_fst-0.1.2-py2.py3-none-macosx_10_9_x86_64.whl
| Download URL | rust_fst-0.1.2-py2.py3-none-macosx_10_9_x86_64.whl |
|---|---|
| Size | 858.1 kB |
| Tags | Python 2 Python 3 macOS 10.9+ x86-64 |
|
SHA-256 checksum How to use checksums |
bb4107866472df3ed878e714726e59764867c8262b353206c812ef38c1ebb0ad
|
|
BLAKE2b-256 checksum How to use checksums |
231242db4ee067877f1a9be3f4f2c1c70499036c45ab2dd0abb44b329ee66756
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Security for rust-fst 0.1.2
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.