Metadata-Version: 2.4
Name: rectangle-packer
Version: 2.0.6
Summary: Pack a set of rectangles into a bounding box with minimum area
Home-page: https://github.com/Penlect/rectangle-packer
Author: Daniel Andersson
Author-email: daniel.4ndersson@gmail.com
License: MIT
Keywords: pack rectangle packing rectangles enclosing 2D
Classifier: Development Status :: 5 - Production/Stable
Classifier: Environment :: Console
Classifier: Intended Audience :: Developers
Classifier: Intended Audience :: Education
Classifier: Intended Audience :: Science/Research
Classifier: License :: OSI Approved :: MIT License
Classifier: Natural Language :: English
Classifier: Operating System :: POSIX :: Linux
Classifier: Operating System :: MacOS
Classifier: Operating System :: Microsoft :: Windows :: Windows 10
Classifier: Programming Language :: C
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Programming Language :: Python :: 3.14
Classifier: Programming Language :: Python :: Implementation :: CPython
Requires-Python: >=3.9
Description-Content-Type: text/x-rst
License-File: LICENSE.md
Dynamic: author
Dynamic: author-email
Dynamic: classifier
Dynamic: description
Dynamic: description-content-type
Dynamic: home-page
Dynamic: keywords
Dynamic: license
Dynamic: license-file
Dynamic: requires-python
Dynamic: summary

================
rectangle-packer
================

Fast rectangle packing for Python.

Given a set of rectangles with fixed orientations, ``rectangle-packer`` finds
an enclosing bounding box with small area and no overlaps.

Installation
============

.. code:: sh

    python3 -m pip install rectangle-packer

Quick start
===========

.. code:: python

    import rpack

    sizes = [(58, 206), (231, 176), (35, 113), (46, 109)]
    positions = rpack.pack(sizes)
    print(positions)

The output contains ``(x, y)`` coordinates for each rectangle's lower-left
corner.

Documentation and source
========================

* Documentation: https://rectangle-packer.readthedocs.io/en/latest/
* Source code: https://github.com/Penlect/rectangle-packer

