prtpy
Number partitioning in Python
Decision gist · record as of 2026-08-14
Yes, if you need a flexible, permissively licensed partitioning or bin-packing solver. The low install friction and zero known vulnerabilities are strengths. However, the aging maintenance status (last release over a year ago, Pre-Alpha classifier) and lack of recent activity suggest treating it as stable but not actively developed—suitable for production use if the algorithm suite meets your needs, but do not expect rapid bug fixes or new features.AI-flagged interpretation of the facts on this page — verify before relying
Before you install
- Requires Python 3.8 or later.
- Optional: GUROBI solver can accelerate ILP-based algorithms via python-mip.
- Low friction installation with three core runtime dependencies (numpy, scipy, mip).
License · maintenance · safety
MIT (permissive) — MIT license permits unrestricted use, modification, and distribution in both open and closed projects with minimal obligations beyond attribution.
last release 2024-05-15 (821 days) · last repo commit 2025-08-08 · 57 stars
0 known vulnerabilities (OSV.dev, 2026-08-14) · 391,716 downloads/mo, #7,013 on PyPI
Alternatives
Verify before relying
pip install prtpy
import prtpy
prtpy.partition(algorithm=prtpy.partitioning.greedy, numbins=2, items=[1,2,3,4,5])- Whether the package's Pre-Alpha status reflects incomplete feature coverage or simply conservative versioning.
- Current performance characteristics and scalability limits for large item sets or bin counts.
- Whether the 821 days since last release indicates maintenance abandonment or stable maturity.
What it is and what it does
prtpy provides a collection of algorithms for partitioning numbers into bins and packing items into fixed-capacity bins. It supports both exact methods (via integer linear programming through the mip library) and approximate greedy algorithms, allowing you to choose between solution quality and computation speed. The package wraps numpy and scipy for numerical operations and can optionally use GUROBI for faster ILP solving.
You supply items (with numeric values), a target number of bins or bin capacity, and an optimization objective (e.g., maximize the smallest bin sum, minimize the largest bin sum). The library returns the assignment of items to bins. It's designed for load-balancing, resource allocation, and scheduling problems where you need to distribute work or items fairly or efficiently across a fixed number of containers.
Use it for
- Distribute computational tasks across multiple processors to minimize makespan (longest task completion time).
- Pack items into shipping containers to minimize the number of containers or maximize container utilization.
- Allocate workload across servers to balance CPU or memory usage and avoid overload.
- Partition a dataset into balanced subsets for parallel processing or cross-validation in machine learning.
- Solve fair division problems where items must be split among parties with minimal imbalance.
Worth the install?
AI-flagged interpretation of the facts on this page. Verify before relying on it.
Yes, if you need a flexible, permissively licensed partitioning or bin-packing solver.
The low install friction and zero known vulnerabilities are strengths. However, the aging maintenance status (last release over a year ago, Pre-Alpha classifier) and lack of recent activity suggest treating it as stable but not actively developed—suitable for production use if the algorithm suite meets your needs, but do not expect rapid bug fixes or new features.
Install
prtpy on PyPI
Before you install
Low friction installation with three core runtime dependencies (numpy, scipy, mip). Package is aging—last release was 2024-05-15, over a year ago—but the repository remains active with recent commits and no archived status.
Requires Python 3.8 or later. Optional: GUROBI solver can accelerate ILP-based algorithms via python-mip.
License in practice
MIT license permits unrestricted use, modification, and distribution in both open and closed projects with minimal obligations beyond attribution.
Quickstart
pip install prtpy
import prtpy
prtpy.partition(algorithm=prtpy.partitioning.greedy, numbins=2, items=[1,2,3,4,5])
Verify before relying
- Whether the package's Pre-Alpha status reflects incomplete feature coverage or simply conservative versioning.
- Current performance characteristics and scalability limits for large item sets or bin counts.
- Whether the 821 days since last release indicates maintenance abandonment or stable maturity.
Package facts
| License | MIT permissive |
| Python support | Supports the current Python release >=3.8 |
| Install friction | Low. Pure-Python wheel |
| Runtime dependencies | 3 packagesnumpyscipymip |
| Maintenance | Aging 821 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 391,716 / month, #7,013 on PyPI 30-day window, as of 2026-08-14 |
| Known vulnerabilities | None known OSV.dev, checked 2026-08-14 |
| Classifiers | Development Status :: 2 - Pre-Alpha |
Evidence: prtpy-0.8.3-py3-none-any.whl
Tags
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 › “number partitioning algorithms”
- prtpyImplements multiway number partitioning and bin packing algorithms…
- spoptSpopt solves spatial optimization problems including regionalization,…
- binpackingDistributes weighted items into bins using greedy algorithms, either…
Give your agent the search over MCP, or paste the wish link into any chat.
More Mathematics packages
NetworkX provides data structures and algorithms for creating, analyzing, and manipulating graphs and networks, supporting everything from simple undirected graphs to complex directed and weighted networks.
kiwisolver is a Python binding to a fast C++ implementation of the Cassowary constraint solver, enabling you to solve systems of linear constraints and inequalities.
Install it if you need to solve constraint systems; skip it if you only need simple linear algebra.
SymPy is a Python library for symbolic mathematics, performing algebraic manipulation, calculus, equation solving, and mathematical expression simplification without numerical approximation.
ContourPy calculates contours of 2D quadrilateral grids using C++11 algorithms wrapped in Python, offering serial and multithreaded implementations without requiring Matplotlib as a dependency.
PyTorch provides GPU-accelerated tensor computation and automatic differentiation for building and training deep neural networks in Python.
onnxruntime loads and executes Open Neural Network Exchange (ONNX) models with a focus on inference performance across CPUs and accelerators.
Install it if you have ONNX models to run in production or development.
See also binpacking · py3dbp · rectpack · optbinning · mip · rectangle-packer · lap · gurobipy · pymoo