Skip to main content

Python binding of Darts Clone

Project description

darts-clone-python

Darts-clone binding for Python 3.x.
This repository provides Cython-based pip-installable package.

Installation

pip install dartsclone

Usage

darts-clone-python is almost compatible with darts-clone.

import dartsclone

darts = dartsclone.DoubleArray()

# build index
data = [b'apple', b'banana', b'orange']
values = [1, 3, 2]
darts.build(data, values=values)

# exact match search
result = darts.exact_match_search('apple'.encode('utf-8'))
print(result) # [1, 5]

# common prefix search
result = darts.common_prefix_search('apples'.encode('utf-8'), pair_type=False)
print(result) # [1]

# save index
darts.save('sample.dic')

# load index
darts.clear()
darts.open('sample.dic')

# dump array data
array = darts.array()

# load array data
darts.clear()
darts.set_array(array)

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for dartsclone, version 0.9.0
Filename, size File type Python version Upload date Hashes
Filename, size dartsclone-0.9.0-cp36-cp36m-macosx_10_13_x86_64.whl (115.5 kB) File type Wheel Python version cp36 Upload date Hashes View
Filename, size dartsclone-0.9.0-cp36-cp36m-manylinux1_i686.whl (446.2 kB) File type Wheel Python version cp36 Upload date Hashes View
Filename, size dartsclone-0.9.0-cp36-cp36m-manylinux1_x86_64.whl (474.2 kB) File type Wheel Python version cp36 Upload date Hashes View
Filename, size dartsclone-0.9.0-cp36-cp36m-win32.whl (80.8 kB) File type Wheel Python version cp36 Upload date Hashes View
Filename, size dartsclone-0.9.0-cp36-cp36m-win_amd64.whl (97.4 kB) File type Wheel Python version cp36 Upload date Hashes View
Filename, size dartsclone-0.9.0-cp37-cp37m-macosx_10_13_x86_64.whl (113.9 kB) File type Wheel Python version cp37 Upload date Hashes View
Filename, size dartsclone-0.9.0-cp37-cp37m-manylinux1_i686.whl (445.3 kB) File type Wheel Python version cp37 Upload date Hashes View
Filename, size dartsclone-0.9.0-cp37-cp37m-manylinux1_x86_64.whl (473.6 kB) File type Wheel Python version cp37 Upload date Hashes View
Filename, size dartsclone-0.9.0-cp37-cp37m-win32.whl (80.7 kB) File type Wheel Python version cp37 Upload date Hashes View
Filename, size dartsclone-0.9.0-cp37-cp37m-win_amd64.whl (97.4 kB) File type Wheel Python version cp37 Upload date Hashes View
Filename, size dartsclone-0.9.0-cp38-cp38-macosx_10_13_x86_64.whl (115.1 kB) File type Wheel Python version cp38 Upload date Hashes View
Filename, size dartsclone-0.9.0-cp38-cp38-manylinux1_i686.whl (441.9 kB) File type Wheel Python version cp38 Upload date Hashes View
Filename, size dartsclone-0.9.0-cp38-cp38-manylinux1_x86_64.whl (469.3 kB) File type Wheel Python version cp38 Upload date Hashes View
Filename, size dartsclone-0.9.0-cp38-cp38-win32.whl (82.6 kB) File type Wheel Python version cp38 Upload date Hashes View
Filename, size dartsclone-0.9.0-cp38-cp38-win_amd64.whl (99.5 kB) File type Wheel Python version cp38 Upload date Hashes View
Filename, size dartsclone-0.9.0.tar.gz (17.9 kB) File type Source Python version None Upload date Hashes View

Supported by

Pingdom Pingdom Monitoring Google Google Object Storage and Download Analytics Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page