py3dbp
3D Bin Packing
What it is and what it does
py3dbp implements a 3D bin packing algorithm that takes a list of rectangular items with dimensions and weight, and attempts to fit them into a set of rectangular bins also with dimensions and weight limits. It is based on an academic paper and a Go implementation, offering two main distribution modes: either distribute items across all available bins to minimize bin usage, or attempt to pack all items into each bin sequentially and report what fits and what doesn't.
The package provides a simple API: create a Packer, add Bins and Items with their dimensions and weights, call pack() with optional parameters to control sorting order (smallest-first or biggest-first) and decimal precision (default 3), then inspect which items fit into each bin and which remain unfitted. It handles the geometric constraint satisfaction internally.
Use it for:
- Optimize warehouse or shipping logistics by determining how to pack orders into available box sizes
- Calculate container loading for logistics companies to minimize wasted space and shipping costs
- Solve resource allocation problems where items must fit into fixed-size containers with weight limits
- Prototype bin packing heuristics for supply chain or manufacturing planning systems
- Validate whether a given set of items can physically fit into available storage or shipping containers
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Solves the 3D bin packing problem by fitting items into bins while respecting dimensional and weight constraints, with configurable sorting and distribution strategies.
Yes, if you need a straightforward 3D bin packing solver and can tolerate source-only installation. The algorithm is well-established, the code is permissive-licensed, and there are no known vulnerabilities. However, the package is dormant (last release 2020-07-04, no commits since 2023-12-14), so expect no active maintenance or bug fixes. Suitable for one-off scripts or embedded use where you control the environment; less suitable if you need ongoing support or expect to integrate it into a production system requiring updates.
Install
py3dbp on PyPI
pip
pip install py3dbpuv
uv add py3dbppoetry
poetry add py3dbpInstalling py3dbp
Before you install
High install friction: distributed as a source tarball with no runtime dependencies but no wheel or prebuilt binary. Last release was 2020-07-04; repository is dormant but not archived, with 458 stars indicating some community use.
License in practice
MIT license (permissive) means you can use, modify, and distribute this code freely in commercial and private projects with minimal restrictions.
Quickstart
pip install py3dbp
from py3dbp import Packer, Bin, Item
packer = Packer()
packer.add_bin(Bin('box', 11.5, 6.125, 0.25, 10))
packer.add_item(Item('item', 3.9370, 1.9685, 1.9685, 1))
packer.pack()
for b in packer.bins:
print(b.items) # fitted items
print(b.unfitted_items) # items that did not fit
Verify before relying
- Whether the algorithm guarantees optimal packing or uses a heuristic approach
- Performance characteristics on large problem instances (number of items/bins)
- Python version compatibility beyond the generic 'Python 3' classifier
Package facts
| License | not declared (permissive) |
| Python support | not specified |
| Install friction | high — source build required |
| Runtime dependencies | none |
| Maintenance | dormant — 2,232 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 817,546/month — #4,983 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: py3dbp-1.1.2.tar.gz
Tags
More Scientific/Engineering packages
NumPy provides an N-dimensional array object…
permissive · top 100 on PyPI
pandaspandas provides fast, flexible data structures…
permissive · top 100 on PyPI
scipyscipy provides numerical algorithms for…
permissive · top 100 on PyPI
scikit-learnscikit-learn provides a comprehensive Python…
permissive · top 1,000 on PyPI
dilldill extends Python's pickle module to…
permissive · top 1,000 on PyPI
multiprocessMultiprocess is an enhanced fork of Python's…
permissive · top 1,000 on PyPI
binpackingDistributes weighted items into bins using…
permissive · top 15,000 on PyPI
rectpackRectpack solves the 2D bin packing problem by…
permissive · top 15,000 on PyPI
prtpyImplements multiway number partitioning and bin…
permissive · top 15,000 on PyPI
rectangle-packerPacks a set of rectangles with fixed…
permissive · top 15,000 on PyPI
optbinningOptBinning discretizes numeric variables into…
permissive · top 15,000 on PyPI
PyRectPyRect provides a Rect class for representing…
permissive · top 5,000 on PyPI
directsearchSolves unconstrained and linearly constrained…
copyleft · top 15,000 on PyPI
munkresImplements the Munkres algorithm (Hungarian…
permissive · top 15,000 on PyPI
ipfnIterative proportional fitting algorithm that…
permissive · top 15,000 on PyPI
pwlfFits continuous piecewise linear functions to…
permissive · top 15,000 on PyPI