Skip to main content

llm-fragments-pypi

Load PyPI package metadata as LLM fragments.

Installation

Install this plugin in the same environment as LLM.

llm install llm-fragments-pypi

Usage

Use -f pypi:package_name to include the package's README and metadata as fragments.

# Retrieve a package's latest version
llm -f pypi:polars "How does the performance of polars compare to pandas?"

You can optionally specify a version with the @version suffix:

# Retrieve a specific version
llm -f pypi:pydantic@1.6 "What are the Python versions supported by pydantic?"

You can combine multiple fragments:

llm -f pypi:litestar -f pypi:fastapi \
  "What are some similarities and differences between litestar and fastapi?"

And combine with other llm features:

$ llm --schema-multi "package,version" \
  -f pypi:polars \
  -f pypi:pandas \
  "What's the latest version of each package?" \
| jq .items

[
  {
    "package": "polars",
    "version": "1.27.1"
  },
  {
    "package": "pandas",
    "version": "2.2.3"
  }
]

Development

Local Setup

To set up this plugin locally, use uv:

uv run llm install -e .

It'll take care of creating a virtual environment, installing the dependencies, and you can run a uv run llm instance that will use the local version of the plugin.

Dev dependencies

Install the dev dependencies in your local environment:

uv sync --group dev

Linting & formatting

You can format and lint the code with ruff:

uv run ruff format .
uv run ruff check .

And run the pre-commit hooks:

uv run prek install

Tests

Run tests:

uv run pytest

Metadata

Release files for llm-fragments-pypi 0.1.2

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

Source distribution (sdist)

Source distribution for llm-fragments-pypi 0.1.2
File Size Uploaded Provenance
llm_fragments_pypi-0.1.2.tar.gz 51.7 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for llm-fragments-pypi 0.1.2
File Interpreter ABI Platform
llm_fragments_pypi-0.1.2-py3-none-any.whl Python 3 none any Details

Total release size: 63.0 kB

Release files / llm_fragments_pypi-0.1.2.tar.gz

Download URL llm_fragments_pypi-0.1.2.tar.gz
Size 51.7 kB
Tags Source
SHA-256 checksum
How to use checksums
e83b29794b7fd2c42daf73d5b0d5ac44c143a6f2e566a6e9a97cea14d5cd1952
BLAKE2b-256 checksum
How to use checksums
55bc47f568e51794acf8c84ea1d17ca0513f56e1ba364c13eb53dd2f9345fd99
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.9.7

Release files / llm_fragments_pypi-0.1.2-py3-none-any.whl

Download URL llm_fragments_pypi-0.1.2-py3-none-any.whl
Size 11.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
f1ede4c503f0fb34c4c659b267a56d4592eb8f9bf0f6fd4a82f5645a9ebb404e
BLAKE2b-256 checksum
How to use checksums
0f783c6deb38528608ec8408ba895694c672057bd3d2cd31bebac432b6fde2fc
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.9.7

Security for llm-fragments-pypi 0.1.2

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.

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