Skip to main content

packer3d

Fast 3D cuboid packing for Python. Give it box types and products; it returns which boxes to use and where every product goes. The native C engine is bundled in the wheel for Windows x64 and Linux x64 (static, any distribution): no compiler, no dependencies. Python 3.10+.

pip install packer3d
from packer3d import Packer

packer = Packer()
packer.add_box(id='small', width=300, length=200, height=150, max_weight=5000)
packer.add_box(id='large', width=600, length=400, height=300, max_weight=20000, quantity=2)
packer.add_item(id='book', width=240, length=170, height=30, weight=400, quantity=6)
packer.add_item(id='mug', width=120, length=120, height=100, weight=350, rotation='any')
result = packer.pack()

for box in result['bins']:
    print(box['type_id'], [(p['id'], p['x'], p['y'], p['z']) for p in box['items']])
print('not packed:', result['unpacked'])

What it respects

  • Box interior dimensions, no overlaps, weight limit per box, finite stock per box type.
  • Rotations per product: none, flat (keep height, default) or any; optional diagonal yaw.
  • Support: stable (default: every product sits on the floor or has its centre over its contacts), contact (any overlap, nothing floats; for packing with fillers), full_base (whole footprint supported) or geometric (free 3D rotation, no support rule).
  • Objective: fewest unpacked products, then lowest box cost, fewest boxes, smallest box volume.

Useful options via set_options(...): time_limit_ms (default 1000), improve=True (keep searching until the time limit or a proven optimum), support_mode, gap. Results report lower_bound and proven_optimal. Errors raise PackerError.

On other platforms, build the CLI from the source repository and set PACKER_BINARY, or pass Packer(binary='/path/to/packer').

Extras

  • packer_adapter.validation_ordinary.validate(request, result): independent result checker.
  • pip install "packer3d[mcp]": local MCP server for agents (packer-mcp).
  • pip install "packer3d[images]" plus python -m playwright install chromium: PNG rendering.

MIT licensed; the bundled engine includes cJSON (MIT) and the rendering assets include Three.js (MIT).

Metadata

Release files for packer3d 0.5.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Built distributions (wheels)

Table of built distributions (wheels) for packer3d 0.5.1
File Interpreter ABI Platform
packer3d-0.5.1-py3-none-win_amd64.whl Python 3 none Windows x86-64 Details
packer3d-0.5.1-py3-none-manylinux2014_x86_64.musllinux_1_1_x86_64.whl Python 3 none Linux musl 1.1+ x86-64, Linux glibc 2.17+ x86-64 Details

Total release size: 1.1 MB

Release files / packer3d-0.5.1-py3-none-win_amd64.whl

Download URL packer3d-0.5.1-py3-none-win_amd64.whl
Size 564.8 kB
Tags Python 3 Windows x86-64
SHA-256 checksum
How to use checksums
7b459951a248ec4f1e3388bb29e0c7d74846d5d2958a4fe4cd79a374022f0763
BLAKE2b-256 checksum
How to use checksums
3ee683203dd35af70e2b0884fddb234046bcb6b7da13dca5a189d6cc636270a7
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 10, 2026.

Transparency log

Release files / packer3d-0.5.1-py3-none-manylinux2014_x86_64.musllinux_1_1_x86_64.whl

Download URL packer3d-0.5.1-py3-none-manylinux2014_x86_64.musllinux_1_1_x86_64.whl
Size 572.0 kB
Tags Linux glibc 2.17+ x86-64 Linux musl 1.1+ x86-64 Python 3
SHA-256 checksum
How to use checksums
47a7d8de09d003ebb12695c3d5891e4b84432633d7098a794b8344b8c36fef9d
BLAKE2b-256 checksum
How to use checksums
b5f6928bffb04479100ad7c1e118a921ae7418ce19a00f34bb76a3abbaba269a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 10, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

0.5.1 This release

2 release files

0.5.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page