{"categories":[{"label":"Python Modules","url":"https://skillfed.io/packages/category/software-development-libraries-python-modules/4"},{"label":"Information Analysis","url":"https://skillfed.io/packages/category/scientific-engineering-information-analysis"},{"label":"Linguistic","url":"https://skillfed.io/packages/category/text-processing-linguistic"}],"enrichment":{"capability":"Provides memory-efficient trie data structures for fast string lookups and prefix searches, using up to 50x-100x less memory than standard Python dicts while maintaining comparable lookup speed.","skillfed_tags":["memory-efficient","static-data-structures","string-indexing"],"use_cases":["Store a large dictionary or word list for spell-checking or autocomplete with minimal memory overhead.","Index IP addresses or network prefixes for fast lookup and prefix-based filtering.","Build a static lexicon for natural language processing tasks requiring efficient string-to-ID or string-to-value mapping.","Implement a fast prefix-search engine over a fixed set of strings (e.g., domain names, product SKUs).","Serialize and memory-map a trie to disk for fast startup and low-memory footprint in long-running services."],"what_it_does":"marisa-trie wraps the MARISA C++ trie library to provide immutable, memory-efficient trie data structures for Python. It trades mutability for dramatic memory savings and fast lookups on static string collections. The package includes Trie (for string-to-integer ID mapping), BytesTrie (for arbitrary byte sequences), RecordTrie (for string-to-value mappings), and StringTrie (for string-to-string mappings). All structures support prefix search and iteration over keys and items.\n\nThe primary use case is storing and querying large static string datasets\u2014such as dictionaries, word lists, or IP address ranges\u2014where memory footprint is a concern. Once built, a trie is serialized to disk and can be memory-mapped for fast access without reloading into RAM. The trade-off is that the trie cannot be modified after creation; new data requires rebuilding.","worth_installing":"Yes, if you have a static string dataset and memory efficiency is a priority. The package is actively maintained, supports modern Python versions (3.9\u20133.14), has no known vulnerabilities, and offers prebuilt wheels for most platforms. The copyleft license (LGPL/BSD 2-clause bundled library) requires compliance but is not a blocker for most use cases. Install friction is moderate due to C++ compilation, but wheels mitigate this for common platforms."},"id":"marisa-trie","links":{"html":"https://skillfed.io/packages/marisa-trie","md":"https://skillfed.io/packages/marisa-trie.md","pypi":"https://pypi.org/project/marisa-trie/"},"maintenance":{"status":"active"},"meta":{"latest_release":"2026-04-08","license_spdx":"MIT AND (BSD-2-Clause OR LGPL-2.1-or-later)","license_treatment":"copyleft","name":"marisa-trie","python_support":"supports_current","summary":"Static memory-efficient and fast Trie-like structures for Python."},"popularity":{"monthly_downloads":4718771,"position":2245,"tier":"top_5000"},"security":{"n_vulnerabilities":0},"version":"1.4.1"}
