LangExtract provider plugin for openrouter
Project description
# LangExtract openrouter Provider
A provider plugin for LangExtract that supports openrouter models.
Installation
From source:
pip install -e .
From PyPI:
pip install langextract-openrouter
Supported Model IDs
openrouter*: Models matching pattern ^openrouteropenrouter/google/gemini-2.5-flashopenrouter/openai/gpt-4.1- ...
Environment Variables
OPENROUTER_API_KEY: API key for authentication
Usage
import langextract as lx
result = lx.extract(
text="Your document here",
model_id="openrouter/openai/gpt-4.1", # for example
prompt_description="Extract entities",
examples=[...]
)
Development
- Install in development mode:
pip install -e . - Run tests:
python test_plugin.py - Build package:
python -m build - Publish to PyPI:
twine upload dist/*
License
Apache License 2.0
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 langextract_openrouter-0.1.1.tar.gz.
File metadata
- Download URL: langextract_openrouter-0.1.1.tar.gz
- Upload date:
- Size: 2.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ff25ef35d6d633e9a5bf19e33226c7417f91f9ef410d66ae687177ddefa3b844
|
|
| MD5 |
5873b6ea7c72661d2e807199384f41a1
|
|
| BLAKE2b-256 |
43903d0437de461e2725d096ff89f76a8ea105ce34c695c4db3ee89b086c638d
|
File details
Details for the file langextract_openrouter-0.1.1-py3-none-any.whl.
File metadata
- Download URL: langextract_openrouter-0.1.1-py3-none-any.whl
- Upload date:
- Size: 3.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
90065db360a03285fe5bb82fb36e4bbd030b2e61f18779d14ca5bae3e654daf8
|
|
| MD5 |
4b1b1085ca67abdd68a9e9a4ead87b0c
|
|
| BLAKE2b-256 |
031e95ced03c01d7fc7660bdbb19af3d0fc6540f8a2fe36f1942d061e693fb43
|