Skip to main content

SQLite based queryable python indexes for dicts and lists

Project description

LiteIndex

fast, thread and process safe, easily queryable Indexes for Python.

DefinedIndex

Initialize the DefinedIndex.

  • if db_path defaults to in-memory.
from liteindex import DefinedIndex

# Define the schema for the index
schema = {
    "name": "",
    "age": 0,
    "password": "",
    "verified": False
}

# Create a DefinedIndex instance
index = DefinedIndex(name="people", schema=schema, db_path="./test.liteindex")

Set, Delete

# set can be partial or full, can be an existing key or new key.
index.set("alice", {
    "name": "Alicee",
    "password": "xxxjjssjsjsjsksk",
    "age": 30
})

# Set value for a sub key
index.set(("alice", "name"), "Alice")

# Same as
index.set("alice", {"name": "Alice"})

# Get value of a key
index.get("alice")

# Get value of a sub key
index.get("alice", "name")

# Delete

Project details


Release history Release notifications | RSS feed

Download files

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

Source Distribution

liteindex-0.0.1.dev24.tar.gz (15.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

liteindex-0.0.1.dev24-py3-none-any.whl (17.2 kB view details)

Uploaded Python 3

File details

Details for the file liteindex-0.0.1.dev24.tar.gz.

File metadata

  • Download URL: liteindex-0.0.1.dev24.tar.gz
  • Upload date:
  • Size: 15.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.4

File hashes

Hashes for liteindex-0.0.1.dev24.tar.gz
Algorithm Hash digest
SHA256 bf0cb99dbf56a2f1699ab7d243ea9570ba4262bf9cedd3ecc5b2b6228054cd19
MD5 11aec3522a311997d2549e8f9af4c5c6
BLAKE2b-256 51807d7d117c22c3073755c72cde7c02f0441bb98a0f3b82626ef986acb5fbe6

See more details on using hashes here.

File details

Details for the file liteindex-0.0.1.dev24-py3-none-any.whl.

File metadata

File hashes

Hashes for liteindex-0.0.1.dev24-py3-none-any.whl
Algorithm Hash digest
SHA256 2ec533f943a01c0d54cf5b3cde1d3c870388e2ca3c86d31206e4cf5e6b4adeb3
MD5 86a589dc7b2ac37b9e13da0884cb12ec
BLAKE2b-256 e8f84c92fcc59449427de05525986e5e6ef3fb0cf2ab28e4ce806a7bc6751454

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page