Official Python SDK for the BinSolver API
Project description
BinSolver Python SDK
Official Python SDK for the BinSolver API.
Installation
pip install binsolver
Usage
from binsolver import BinSolver, PackRequest, Item, Bin
client = BinSolver(api_key="your-api-key")
# Check API health
if client.health():
print("API is healthy")
# Pack items
try:
response = client.pack(
PackRequest(
objective="minBins",
items=[
Item(id="item-1", w=5, h=5, d=5, quantity=12)
],
bins=[
Bin(id="box-small", w=10, h=10, d: 10, quantity=10),
Bin(id="box-large", w=20, h: 20, d: 20, quantity=5)
]
)
)
print(f"Placed {response.stats.placed} items in {response.stats.bins_used} bins.")
for bin_result in response.bins:
print(f"Bin {bin_result.bin_id}: {len(bin_result.placements)} items")
except Exception as e:
print(f"Packing failed: {e}")
Features
- Fully Typed: Pydantic models for request and response validation.
- Modern: Uses
httpxfor efficient HTTP requests. - Easy to Use: Pythonic interface for the BinSolver API.
License
MIT
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file binsolver-1.0.2.tar.gz.
File metadata
- Download URL: binsolver-1.0.2.tar.gz
- Upload date:
- Size: 8.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c607c189fceb01c663d85539c3dae87d40872f68b34bf4d2fb3cc140383b8426
|
|
| MD5 |
c42b6b32f8074064df8a0990b1a2a734
|
|
| BLAKE2b-256 |
cfad3781506ccef7915af41161962dd11bb8348c7881ad84f6d9e2e83f8532de
|
Provenance
The following attestation bundles were made for binsolver-1.0.2.tar.gz:
Publisher:
release.yml on welltyped-systems/binsolver-py
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
binsolver-1.0.2.tar.gz -
Subject digest:
c607c189fceb01c663d85539c3dae87d40872f68b34bf4d2fb3cc140383b8426 - Sigstore transparency entry: 925534583
- Sigstore integration time:
-
Permalink:
welltyped-systems/binsolver-py@635ffb55fcc58480b89f57d7f03701a1bb30a646 -
Branch / Tag:
refs/tags/v1.0.2 - Owner: https://github.com/welltyped-systems
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@635ffb55fcc58480b89f57d7f03701a1bb30a646 -
Trigger Event:
push
-
Statement type:
File details
Details for the file binsolver-1.0.2-py3-none-any.whl.
File metadata
- Download URL: binsolver-1.0.2-py3-none-any.whl
- Upload date:
- Size: 7.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
db577eb7afe6646ac52999bfb89ee9f65ce4bddf796b4adf5b7f69334c476805
|
|
| MD5 |
24a1408d7a5c4d454e185d03dbfae742
|
|
| BLAKE2b-256 |
b21e13651023db2525fa997fe80f45198c77a01479a012272d775fd287f3652a
|
Provenance
The following attestation bundles were made for binsolver-1.0.2-py3-none-any.whl:
Publisher:
release.yml on welltyped-systems/binsolver-py
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
binsolver-1.0.2-py3-none-any.whl -
Subject digest:
db577eb7afe6646ac52999bfb89ee9f65ce4bddf796b4adf5b7f69334c476805 - Sigstore transparency entry: 925534587
- Sigstore integration time:
-
Permalink:
welltyped-systems/binsolver-py@635ffb55fcc58480b89f57d7f03701a1bb30a646 -
Branch / Tag:
refs/tags/v1.0.2 - Owner: https://github.com/welltyped-systems
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@635ffb55fcc58480b89f57d7f03701a1bb30a646 -
Trigger Event:
push
-
Statement type: