Skip to main content

anypick-python

PyPI version Python versions

Python implementation of anypick. See the project docs for the full design.

Install (dev)

cd anypick-python
pip install -e ".[dev]"

Use

import os
from anypick import anypick, ModelFilters, BenchmarkThreshold

sel = anypick(
    filters=ModelFilters(
        max_prompt_price=2e-6,
        min_context_length=128_000,
        requires_tools=True,
        min_benchmarks=[BenchmarkThreshold(task_type="coding", min=60)],
    ),
    strategy="cheapest_with_floor",
    openrouter_api_key=os.environ["OPENROUTER_API_KEY"],
)
print(sel.model.id, sel.prompt_price, sel.score.score)

Use — Vercel AI Gateway (models only)

The Vercel AI Gateway exposes a model catalog but no benchmark feed, so pair it with a price-only strategy (cheapest):

import os
from anypick import anypick, ModelFilters

sel = anypick(
    filters=ModelFilters(
        max_prompt_price=2e-6,
        min_context_length=128_000,
        requires_tools=True,
    ),
    strategy="cheapest",
    obtainer="vercel",
    vercel_api_key=os.environ.get("VERCEL_AI_GATEWAY_API_KEY"),  # optional
)
print(sel.model.id, sel.prompt_price)

Test

pytest -q

Tests run offline against committed fixtures in tests/fixtures/.

Metadata

Release files for anypick 0.1.0

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

Source distribution (sdist)

Source distribution for anypick 0.1.0
File Size Uploaded Provenance Actions
anypick-0.1.0.tar.gz 27.9 kB Without provenance Details for anypick-0.1.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for anypick 0.1.0
File Interpreter ABI Platform Actions
anypick-0.1.0-py3-none-any.whl Python 3 none any Details for anypick-0.1.0-py3-none-any.whl

Total release size: 52.4 kB

Release files / anypick-0.1.0.tar.gz

Download URL anypick-0.1.0.tar.gz
Size 27.9 kB
Tags Source
SHA-256 checksum
How to use checksums
7a85248bd512260a474104416987974eb13eae9a158ca3a330358572211c0df3
BLAKE2b-256 checksum
How to use checksums
776316f5ff0f2b5c7ba051b894b7ed0d8d2d7e1db178550cedc6e7b963a8be7a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.13.13

Release files / anypick-0.1.0-py3-none-any.whl

Download URL anypick-0.1.0-py3-none-any.whl
Size 24.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
a2e1a99b41dfa7c21f8ce860e88b863bc5aa428ad707e020ee33f0b157d6e93b
BLAKE2b-256 checksum
How to use checksums
90ae158bea621289d4adca79ee0266b049578b986b2d720dc6c855edb2d3f113
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.13.13

Security for anypick 0.1.0

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.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files No provenance

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