skillfed

py3dbp

3D Bin Packing

py3dbp v1.1.2 817.5K downloads/30d#4,983 on PyPI458
Permissive license DORMANT released

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 py3dbp

uv

uv add py3dbp

poetry

poetry add py3dbp

Installing 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

License :: OSI Approved :: MIT LicenseOperating System :: OS IndependentProgramming Language :: Python :: 3

Tags

3d bin packing algorithmfit items into containers3d knapsack problembin packing optimizationcontainer loading solver3d rectangle packingspace utilization algorithm
optimizationlogisticsgeometry

More Scientific/Engineering packages