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) orany; 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) orgeometric(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]"pluspython -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.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Built distributions (wheels)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| packer3d-0.5.0-py3-none-win_amd64.whl | Python 3 | none | Windows x86-64 | Details |
| packer3d-0.5.0-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.0-py3-none-win_amd64.whl
| Download URL | packer3d-0.5.0-py3-none-win_amd64.whl |
|---|---|
| Size | 564.8 kB |
| Tags | Python 3 Windows x86-64 |
|
SHA-256 checksum How to use checksums |
06e57e577850636904e9af23e693921bbb0ea2eecb4254f749e3ca99440b50fd
|
|
BLAKE2b-256 checksum How to use checksums |
25b268e16b0e77ea08348c4860e32bdb0f5fcf91376492a38a628eefd14c81e1
|
| 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 logRelease files / packer3d-0.5.0-py3-none-manylinux2014_x86_64.musllinux_1_1_x86_64.whl
| Download URL | packer3d-0.5.0-py3-none-manylinux2014_x86_64.musllinux_1_1_x86_64.whl |
|---|---|
| Size | 571.9 kB |
| Tags | Linux glibc 2.17+ x86-64 Linux musl 1.1+ x86-64 Python 3 |
|
SHA-256 checksum How to use checksums |
d3a8ca03ed2aa8eb0c21c7ea4f0b2d6e440e34bd49e89f90bb58e130796197ce
|
|
BLAKE2b-256 checksum How to use checksums |
e9cb7a97ea7035e0dad9be90d4beb3e2dc1cc3ab6cfc5523d43c38dea58f0163
|
| 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