--- id: dawg-python version: "0.7.2" license: UNKNOWN license_treatment: permissive maintenance: dormant --- # DAWG-Python — Pure-python reader for DAWGs (DAFSAs) created by dawgdic C++ library or DAWG Python extension. License: permissive · Maintenance: dormant · Downloads: 219.9K/mo ## What it is and what it does DAWG-Python is a pure-Python reader for DAWG (Directed Acyclic Word Graph) files, a space-efficient data structure for storing and querying large sets of strings with common prefixes. It cannot create DAWGs itself; instead, it reads files built by the dawgdic C++ library or the DAWG Python extension module. The main value proposition is providing DAWG access without requiring compiled extensions, making it portable and fast under PyPy. The package implements several DAWG variants (DAWG, BytesDAWG, RecordDAWG, IntDAWG, IntCompletionDAWG) and supports operations like membership testing, prefix enumeration, and key/value iteration. It is API-compatible with the DAWG package where possible. Performance under CPython is significantly slower than native implementations, but PyPy execution is competitive for many workloads. Use it for: - Load pre-built DAWG files for fast prefix-based lookups in spell-checking or autocomplete systems - Query large word lists or dictionaries without the overhead of compiled C extensions - Integrate DAWG-based data structures into pure-Python applications that must run on restricted or portable environments - Enumerate all words matching a prefix in linguistic or NLP pipelines - Use PyPy to accelerate DAWG queries in performance-sensitive code paths ## Worth the install? AI-flagged interpretation of the facts above — verify before relying. Reads DAWG (Directed Acyclic Word Graph) files created by the dawgdic C++ library or DAWG Python package, providing pure-Python access without compiled extensions. Yes, if you have pre-built DAWG files and need pure-Python access without C extensions. No, if you need active maintenance or Python 3.5+ support—the package is dormant and classifiers only declare support through Python 3.4. Suitable for legacy systems or PyPy-based deployments where the DAWG format is already in use. ## Install pip install dawg-python uv add dawg-python poetry add dawg-python ## Installing DAWG-Python Before you install: No runtime dependencies and low install friction. The package is dormant (last release 2015-04-18, last commit 2023-09-11), so expect no active maintenance or updates for modern Python versions. License in practice: Licensed under MIT, a permissive open-source license with no restrictions on commercial or private use. Quickstart: import dawg_python d = dawg_python.DAWG().load('words.dawg') if 'hello' in d: print(d['hello']) Requires a pre-built DAWG file created by the dawgdic C++ library or DAWG Python package; this package cannot create DAWGs from scratch. Verify before relying: - Whether the package works reliably with Python versions beyond 3.4 (classifiers list only up to 3.4) - Current compatibility with modern PyPy versions (benchmarks reference PyPy 1.9 from ~2012) - Whether DAWG files created by recent versions of the dawgdic library remain compatible ## Package facts - License: UNKNOWN (permissive) - Python support: unspecified - Install friction: low - Maintenance: dormant - Downloads: 219.9K/month (top 15,000 on PyPI) - Known vulnerabilities: none known ## Tags DAWG file reader, directed acyclic word graph, pure python DAWG, DAFSA lookup, trie-like data structure, prefix search, word graph access, data-structure, text-processing, pypy-friendly [View on SkillFed](https://skillfed.io/packages/dawg-python) · [View on PyPI](https://pypi.org/project/dawg-python/)