$npx skillfedfor your agent

madoka

Memory-efficient CountMin Sketch key-value structure (based on Madoka C++ library)

With conditionsPyPI Python ModulesReleased Nov 202579.1K downloads / moNew BSD LicensePlatform wheel

Decision gist · record as of 2026-08-14

platform wheels — madoka-0.7.2.1-cp310-cp310-macosx_10_9_universal2.whl · madoka-0.7.2.1-cp310-cp310-macosx_10_9_x86_64.whl · madoka-0.7.2.1-cp310-cp310-macosx_11_0_arm64.whl
v0.7.2.1 · released 2025-11-30

Yes, if you need memory-efficient approximate counting for streaming data and can tolerate ~0.0911% error. The package is stable (Alpha status, 12+ years old), has no known vulnerabilities, and supports modern Python versions. Install friction is moderate due to compiled wheels. Not suitable if you require exact counts or need to enumerate all keys.AI-flagged interpretation of the facts on this page — verify before relying

Before you install

  • Medium install friction due to compiled C++ extension with wheels available for Python 3.8–3.14 across Linux, macOS, and Windows platforms.
  • Last release 257 days ago; repository is active but aging.

License · maintenance · safety

New BSD License (permissive) — New BSD License (permissive) allows commercial and private use with minimal restrictions.

last release 2025-11-30 (257 days) · last repo commit 2025-11-30 · 27 stars

0 known vulnerabilities (OSV.dev, 2026-08-14) · 79,120 downloads/mo, #14,379 on PyPI

Verify before relying

import madoka
sketch = madoka.Sketch()
sketch['key'] += 1
value = sketch['key']
  • Whether the 0.0911% counting error rate applies uniformly across all Croquis variants or only to Sketch class.
  • Performance characteristics and memory savings relative to dict/Counter for typical workloads.
  • Whether Free Threading support (listed in classifiers) is fully functional or experimental.
Same gist for agents: .md · .json

What it is and what it does

Madoka is a Python wrapper around a C++ Count-Min sketch library that trades exact counting for memory efficiency. It provides multiple classes (Sketch, CroquisFloat, CroquisDouble, CroquisUint8/16/32/64) to store different numeric types, each using a probabilistic data structure that approximates frequencies with bounded error. Unlike a standard Python dict or Counter, a sketch uses fixed memory regardless of the number of unique keys, making it suitable for streaming scenarios where you cannot store all keys in memory.

The package supports typical counter operations—increment, add, set, get—plus sketch-specific operations like merge, shrink, inner product, and median. It can serialize to disk, load from file, and extract top-K most common keys if initialized with a k parameter. The tradeoff is that you cannot enumerate all keys (only top-K), and values are approximate rather than exact.

Use it for

  • Approximate word frequency counting in large text streams where memory is constrained.
  • Real-time traffic or event counting where exact counts are less important than memory efficiency.
  • Merging frequency counts from multiple data sources with minimal memory overhead.
  • Extracting top-K most frequent items from a stream without storing all unique items.
  • Comparing similarity between two frequency distributions using inner product.

Worth the install?

AI-flagged interpretation of the facts on this page. Verify before relying on it.

With conditions

Yes, if you need memory-efficient approximate counting for streaming data and can tolerate ~0.0911% error.

The package is stable (Alpha status, 12+ years old), has no known vulnerabilities, and supports modern Python versions. Install friction is moderate due to compiled wheels. Not suitable if you require exact counts or need to enumerate all keys.

Install

madoka on PyPI

Before you install

Medium install friction due to compiled C++ extension with wheels available for Python 3.8–3.14 across Linux, macOS, and Windows platforms. Last release 257 days ago; repository is active but aging.

License in practice

New BSD License (permissive) allows commercial and private use with minimal restrictions.

Quickstart

import madoka
sketch = madoka.Sketch()
sketch['key'] += 1
value = sketch['key']

Verify before relying

  • Whether the 0.0911% counting error rate applies uniformly across all Croquis variants or only to Sketch class.
  • Performance characteristics and memory savings relative to dict/Counter for typical workloads.
  • Whether Free Threading support (listed in classifiers) is fully functional or experimental.

Package facts

LicenseNew BSD License permissive
Python supportNot specified
Install frictionMedium. Platform-specific wheel
Runtime dependenciesNone
MaintenanceAging 257 days since the last release
Last repo commit
First released
Downloads79,120 / month, #14,379 on PyPI 30-day window, as of 2026-08-14
Known vulnerabilitiesNone known OSV.dev, checked 2026-08-14
Classifiers
Development Status :: 3 - AlphaIntended Audience :: DevelopersIntended Audience :: Science/ResearchProgramming Language :: C++Programming Language :: PythonProgramming Language :: Python :: 3Programming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.14Programming Language :: Python :: 3.8Programming Language :: Python :: 3.9Programming Language :: Python :: Free ThreadingTopic :: Scientific/Engineering :: Information AnalysisTopic :: Software Development :: Libraries :: Python ModulesTopic :: Text Processing :: Linguistic

Evidence: madoka-0.7.2.1-cp310-cp310-macosx_10_9_universal2.whl; madoka-0.7.2.1-cp310-cp310-macosx_10_9_x86_64.whl; madoka-0.7.2.1-cp310-cp310-macosx_11_0_arm64.whl; madoka-0.7.2.1-cp310-cp310-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl; madoka-0.7.2.1-cp310-cp310-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl; madoka-0.7.2.1-cp310-cp310-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl; madoka-0.7.2.1-cp310-cp310-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl; madoka-0.7.2.1-cp310-cp310-musllinux_1_2_aarch64.whl; madoka-0.7.2.1-cp310-cp310-musllinux_1_2_ppc64le.whl; madoka-0.7.2.1-cp310-cp310-musllinux_1_2_s390x.whl; madoka-0.7.2.1-cp310-cp310-musllinux_1_2_x86_64.whl; madoka-0.7.2.1-cp310-cp310-win32.whl; madoka-0.7.2.1-cp310-cp310-win_amd64.whl; madoka-0.7.2.1-cp310-cp310-win_arm64.whl; madoka-0.7.2.1-cp311-cp311-macosx_10_9_universal2.whl; madoka-0.7.2.1-cp311-cp311-macosx_10_9_x86_64.whl; madoka-0.7.2.1-cp311-cp311-macosx_11_0_arm64.whl; madoka-0.7.2.1-cp311-cp311-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl; madoka-0.7.2.1-cp311-cp311-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl; madoka-0.7.2.1-cp311-cp311-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl

Tags

Capabilities
count-min sketchmemory-efficient countingstreaming data summarizationapproximate frequency countinglow-memory countersketch data structureword count approximation
Topics
probabilistic-data-structuresstreaming-algorithmsmemory-efficient
PyPI keywords
Count-Min Sketchcounterword count

Let your AI agent find packages like this

Example. Real query, live index.

You found this page by searching. An agent finds it by wishing: SkillFed indexes 14,416 PyPI packages by what they can do, searchable in plain language.

wish › “count-min sketch”

  • madokaMadoka implements a Count-Min sketch data structure for…
  • pyprobablesProvides pure-Python implementations of probabilistic data structures…
  • fig2sketchConverts Figma .fig design files into Sketch .sketch documents that…

Give your agent the search over MCP, or paste the wish link into any chat.

More Python Modules packages

idna Worth it
PyPI · Python Modules · released Jun 2026

Converts domain names between Unicode and ASCII-compatible encoding (Punycode) according to IDNA 2008 and Unicode Technical Standard 46, with security validation and broader script coverage than the standard library.

Install it if you work with internationalized domain names, need to validate domains, or use HTTP clients that depend on it transitively.

BSD-3-Clausepure Python · 3.9+
1.8Bdownloads / mo
setuptools Worth it
PyPI · Python Modules · released Aug 2026

Setuptools is a Python build backend and package management tool that handles building, distributing, and installing Python packages, including support for C/C++ extension modules.

MITpure Python · 3.10+
1.6Bdownloads / mo
PyYAML Worth it
PyPI · Python Modules · released Sep 2025

PyYAML parses and emits YAML 1.1 data format, enabling serialization and deserialization of configuration files and Python objects to and from human-readable YAML text.

MITcompiled wheel · 3.8+
1.2Bdownloads / mo
pydantic Worth it
PyPI · Python Modules · released May 2026

Pydantic validates Python data structures against type hints, coercing and checking input at runtime to ensure it matches a declared schema.

MITpure Python · 3.9+
1.1Bdownloads / mo
annotated-types Worth it
PyPI · Python Modules · released Jul 2026

Provides reusable metadata objects for use with PEP-593 `typing.Annotated` to express common constraints like bounds, collection sizes, and predicates on types.

Install it if you use or build libraries that need to express type constraints in a standardized, inspectable way—or if you want to annotate your own types with…

MITpure Python · 3.10+
871.3Mdownloads / mo
typing-inspection Worth it
PyPI · Python Modules · released Aug 2026

Provides runtime tools to inspect and introspect Python type annotations, enabling programmatic examination of type hints at execution time.

MITpure Python · 3.10+
783.0Mdownloads / mo

See also datasketches · datasketch · syllapy · pyprobables · crick · ddsketch · whylogs-sketching · json-stream · multidict · HLL