Registry / ai-ml / rusket

rusket

JSON →
library0.1.90pypypiunverified

Rusket is an ultra-fast Python library designed for building recommender engines (collaborative filtering) and performing market basket analysis (association rules). It leverages Rust for its core computational logic, offering significant performance advantages, especially with large datasets. The current version is 0.1.90, and it is under active development with a focus on speed and efficiency.

pip install rusket
INSTALL
IMPORT
SIG · RUSKET
R
rusket
ai-mlpythonv0.1.90
Install
2.4s avg
Import
Disk
20MB
Pass rate
8/ 10
Env Coverage8 / 10
glibc
3.93.13
musl
3.93.13
Install & Compatibility
Where this runs
tested against v0.1.90 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
glibc
py 3.10
✓ —
✓ 2.5s
py 3.11
✓ —
✓ 2.95s
py 3.12
✓ —
✓ 2.1s
py 3.13
✓ —
✓ 2.1s
py 3.9
✕ build_error
✕ build_error
20MB installed
● package 20MB
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

rusket
import rusket
import rusket

This example demonstrates how to use `MarketBasketAnalyzer` to find association rules from a pandas DataFrame of transactional data. It initializes the analyzer, fits it to the data using specified transaction and item columns, and then retrieves the generated rules.

import pandas as pd from rusket import MarketBasketAnalyzer # Sample transactional data for Market Basket Analysis data = { 'transaction_id': [1, 1, 1, 2, 2, 3, 3, 4, 4, 4, 5, 5, 5, 6, 6, 6], 'item_id': ['Apple', 'Banana', 'Orange', 'Apple', 'Grape', 'Banana', 'Orange', 'Apple', 'Banana', 'Grape', 'Milk', 'Bread', 'Eggs', 'Milk', 'Cheese', 'Butter'] } df = pd.DataFrame(data) # Initialize and fit the Market Basket Analyzer # Lower min_support/min_confidence for small sample data to ensure rules are found mba = MarketBasketAnalyzer(min_support=0.01, min_confidence=0.01) mba.fit(df, transaction_col='transaction_id', item_col='item_id') # Get association rules rules = mba.get_rules() print("Generated Association Rules (first 5):") if not rules.empty: print(rules.head()) else: print("No rules found. Try adjusting min_support or min_confidence.")
Debug
Known issues
breakingAs Rusket is currently in early development (version 0.1.x), its API is subject to change without strict backward compatibility guarantees. Expect potential breaking changes between minor versions (e.g., 0.1.x to 0.2.x) until a stable 1.0 release.
fix
Always pin to specific minor versions (`rusket==0.1.90`) in production environments and review release notes carefully when upgrading.
affects: All versions < 1.0.0
gotchaRusket requires input data as a pandas DataFrame with explicitly named columns for transaction/user and item IDs. Incorrect column names or data types will lead to errors.
fix
Ensure your DataFrame columns match the `transaction_col`/`user_col` and `item_col` arguments provided to the `fit` method. For best performance, ensure data types are optimized (e.g., integers for IDs).
affects: All versions
gotchaWhile Rusket provides Pythonic interfaces, its core logic is implemented in Rust. If you encounter unexpected performance issues or unhandled exceptions that aren't typical Python errors, it might be related to the underlying Rust implementation. Error messages might sometimes be less verbose than pure Python errors.
fix
Consult the official GitHub repository for common issues or open a new issue with a minimal reproducible example if you suspect a Rust-level problem. Ensure your system meets the basic requirements for Rust binaries (e.g., up-to-date glibc on Linux).
affects: All versions
Upgrade
Version history
0.1.90latest on PyPI · released Mar 12, 2026
Audit
Dependencies

No dependency data recorded yet.

Agent activity
12 hits · last 30 days
node
8
OpenAI (training)
1
Resources