xyberos-http-api
Generic HTTP/API connector plugin — RFC-0019, M2. "Point at any REST API, get typed tools."
A declarative spec (JSON / YAML / Python dict) describes a base_url,
optional auth, optional rate limiting, and one operation per endpoint. Each
operation becomes a typed Tool whose parameters
are validated and coerced through FunctionTool / coerce_arguments.
This is the highest-leverage item after MCP: it is a dependency of the MCP client (M3) and web search (M5), and it unblocks the whole multiplier chain.
Install
pip install xyberos-http-api # from PyPI
# development (editable, from this repo):
pip install -e ./http-api
Usage
Load a plugin from a spec file:
from xyberos import create_app
from xyberos_http_api import HttpApiPlugin
app = create_app()
app.load_plugin(HttpApiPlugin("examples/weather.json"))
app.tools.execute("get_forecast", None, latitude=40.71, longitude=-74.01)
Or from a dict / YAML, or configure it entirely through the environment:
export HTTP_API_SPEC=/path/to/spec.json # or HTTP_API_SPEC_JSON='{...}'
The module-level plugin is auto-discovered via the xyberos.plugins
entry-point group; an unconfigured instance registers nothing (it logs a
warning instead of breaking load_entry_points()).
Spec format
{
"name": "github",
"base_url": "https://api.github.com",
"headers": { "Accept": "application/vnd.github+json" },
"auth": { "type": "bearer", "token_env": "GITHUB_TOKEN" },
"rate_limit": { "calls_per_second": 5, "burst": 10 },
"operations": [
{
"name": "get_user",
"method": "GET",
"path": "/users/{username}",
"description": "Get a GitHub user's public profile.",
"params": [
{ "name": "username", "in": "path", "required": true },
{ "name": "per_page", "in": "query", "type": "integer", "default": 30 }
],
"response_path": "some.nested[0].value" // optional JSON extraction
}
]
}
Parameters
Each param has name, in (query | path | header | body), type
(string | integer | number | boolean | array | object),
required, description, and an optional default. The generated tool's JSON
schema mirrors these, so an LLM gets a typed signature.
Auth
| type | fields | notes |
|---|---|---|
api_key |
key_name, in (header/query), value/env |
sent per request |
bearer |
token/token_env |
Authorization: Bearer <token> |
basic |
username/username_env, password/password_env |
base64 basic |
oauth2 |
token_url, client_id/client_id_env, client_secret/client_secret_env, scope |
client_credentials, token cached |
Secrets are read from environment variables first, then literals. No secret is ever required in the spec file.
Rate limiting
rate_limit uses the core xyberos.utils.resilience.RateLimiter (token
bucket) and is applied per request.
Examples
examples/http_api_weather.py— Open-Meteo (no key).examples/http_api_github.py— GitHub REST API.
Tests
pip install pytest
pytest tests/
The tests spin up a local http.server and exercise the full stdlib client —
no external network required.
Contract & ship location
- Contract:
Tool(FunctionToolpublic API only). - Ship: Plugin (
xyberos.pluginsentry point). - Dependencies:
xyberos>=1.0; everything else is standard library.
Metadata
Release files for xyberos-http-api 0.1.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| xyberos_http_api-0.1.1.tar.gz | 16.9 kB | With provenance | Details for xyberos_http_api-0.1.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| xyberos_http_api-0.1.1-py3-none-any.whl | Python 3 | none | any | Details for xyberos_http_api-0.1.1-py3-none-any.whl |
Total release size: 31.8 kB
Release files / xyberos_http_api-0.1.1.tar.gz
| Download URL | xyberos_http_api-0.1.1.tar.gz |
|---|---|
| Size | 16.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
80a52be1ff23b6dfc5599b4e5b590165eb40e01bd09a0e47acaecd0fd32bdb90
|
|
BLAKE2b-256 checksum How to use checksums |
7989d3d38d4d4d59fc8d5ec11f14f46163f864ca137bd7c08988226bdef78ce6
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Sep 16, 2026.
Transparency logRelease files / xyberos_http_api-0.1.1-py3-none-any.whl
| Download URL | xyberos_http_api-0.1.1-py3-none-any.whl |
|---|---|
| Size | 14.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
165225b658c9054d00436309437e115573f10ab6b05ebabcb76174cb6407a49b
|
|
BLAKE2b-256 checksum How to use checksums |
f65ac1435e6192b6283065bb72ae638146e0460a0d17bd1df690834b0747e0b1
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Sep 16, 2026.
Transparency logSecurity for xyberos-http-api 0.1.1
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.
Full provenance
All 2 files in this release have been uploaded with provenance metadata.
Attestation for xyberos_http_api-0.1.1.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Sep 16, 2026.
Transparency logA 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.