Skip to main content

resq-dsa

Production-grade data structures and algorithms for Python 3.11+ with zero dependencies.

Data Structures

  • BloomFilter -- Space-efficient probabilistic set membership testing
  • CountMinSketch -- Probabilistic frequency estimation for data streams
  • Graph -- Directed weighted graph with BFS, Dijkstra, and A* pathfinding
  • BoundedHeap -- Bounded min-heap for top-k queries
  • Trie -- Prefix tree for efficient string storage and retrieval

Algorithms

  • rabin_karp -- Rabin-Karp rolling hash string pattern matching

Installation

pip install resq-dsa

Usage

from resq_dsa import BloomFilter, Graph, Trie, BoundedHeap, rabin_karp

# Bloom filter for deduplication
bf = BloomFilter(capacity=10_000)
bf.add("seen-id-1")
assert bf.has("seen-id-1")

# Graph pathfinding
g = Graph()
g.add_edge("A", "B", 1.0)
g.add_edge("B", "C", 2.0)
result = g.dijkstra("A", "C")  # {'path': ['A', 'B', 'C'], 'cost': 3.0}

# Trie prefix search
trie = Trie()
trie.insert("alert")
trie.insert("alarm")
trie.starts_with("al")  # ['alert', 'alarm']

# Pattern matching
rabin_karp("ababab", "ab")  # [0, 2, 4]

License

Apache-2.0

Metadata

Release files for resq-dsa 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for resq-dsa 0.1.0
File Size Uploaded Provenance
resq_dsa-0.1.0.tar.gz 31.7 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for resq-dsa 0.1.0
File Interpreter ABI Platform
resq_dsa-0.1.0-py3-none-any.whl Python 3 none any Details

Total release size: 43.5 kB

Release files / resq_dsa-0.1.0.tar.gz

Download URL resq_dsa-0.1.0.tar.gz
Size 31.7 kB
Tags Source
SHA-256 checksum
How to use checksums
47c40e02015c50194c0426f7f138134c70837f11bcfdfd409786c54635aa6eff
BLAKE2b-256 checksum
How to use checksums
daa01061821d74720d0a3c4ceecb3acfaccce47130a4db083ea54fbc5044dc68
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.13.7

Release files / resq_dsa-0.1.0-py3-none-any.whl

Download URL resq_dsa-0.1.0-py3-none-any.whl
Size 11.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
20338885c60538d7de78559c82c8f0a1d345ba4dbfc2ced90e54167d094c500b
BLAKE2b-256 checksum
How to use checksums
f760403d2a7cbf5d6a6cd8106f1f96e24071518708fd9bdbcc9fc4db62e96bb3
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.13.7

Security for resq-dsa 0.1.0

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.

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page