Scan your whole stack
From OX Research Newsroom
Are you using clientx?
Find out what’s in your code.
Scan your apps free in minutes (opens in a new tab)Latest version: v0.3.0
clientx was last scanned on 23 Nov 2026 at version 0.3.0. Risk score 0 of 100. No malicious behavior was detected.
| Version | Published | Status |
|---|---|---|
| 0.3.0 LATEST | 23 Nov 2026 | No rules fired |
| 0.2.1 | 22 Nov 2026 | No rules fired |
| 0.2.0 | 22 Nov 2026 | No rules fired |
| 0.1.0 | 20 Nov 2026 | Not shown |
Findings for v0.3.0. The score is a capped sum of the weights of the rules that fired — not CVSS, not exploitability, and not a probability. It is not comparable across packages with different scan coverage.
The score describes 0.3.0; other versions have their own rules, not their own score.
The publisher’s own README, as collected from the registry.
ClientX is a declarative API client framework designed to make writing and maintaining API clients easier while keeping the client contract explicit and well documented.
For client authors, ClientX reduces boilerplate by turning typed endpoint definitions into concrete httpx2 requests and centralizing request/response behavior. For client consumers, it pushes API contracts and guard rails into the client itself, helping prevent avoidable runtime mistakes and making integrations more predictable.
The result is less scaffolding and more focus on outcomes: authors, human or AI, spend less time on plumbing, and the developers and AI agents calling your API spend less time guessing how to use it correctly. The same endpoints become tools an AI model can call, described by your docstrings and type hints, with errors it can act on.
pip install clientx
Using an AI coding assistant? Point it at llms.txt, a compact guide to ClientX's patterns and pitfalls.
from typing import Annotated
from clientx import ClientX, Header, Json, Query, Resource, method
from pydantic import BaseModel
class User(BaseModel):
id: int
name: str
class NewUser(BaseModel):
name: str
class Users(Resource, prefix="/users"):
@method.get("/{user_id}")
def retrieve(self, user_id: int) -> User:
"""Fetch one user by ID."""
...
@method.get()
def search(self, name: Annotated[str | None, Query()] = None) -> list[User]:
"""List users, or only those with this name."""
...
@method.post()
def create(
self,
user: Annotated[NewUser, Json()],
request_id: Annotated[str | None, Header()] = None,
) -> User:
"""Create a user."""
...
class ExampleAPI(ClientX, user_agent="example-app/1.0"):
users = Users()
with ExampleAPI("https://api.example.com") as api:
user = api.users.retrieve(42) # GET /users/42 -> User
matches = api.users.search(name="Ada") # GET /users?name=Ada -> list[User]
new = api.users.create(NewUser(name="Ada"), request_id="r-1") # POST /users, JSON body, request-id header -> User
api.users.retrieve(user_id: int) -> User.httpx2.HTTPStatusError.with block closes the client's connections when it ends. It's optional: a long-lived client is created once and closed with close() at shutdown, as Closing a client explains.AsyncClientX and AsyncResource, write the endpoints as async def methods, and await them, as Async clients explains.empty-body check for your client modules, as Defining endpoints explains.ClientX is inspired by FastAPI, which reads type hints to define server endpoints. ClientX applies the same idea to the client side:
-> User returns the JSON body validated as a User, -> Iterator[str] streams it line by line, and -> Response returns the response itself.def methods on a ClientX, or as async def methods on an AsyncClientX, with the same decorators.httpx2.Client, or an httpx2.AsyncClient, so every option is available, including auth, timeouts, proxies and custom transports.clientx.tools turns each endpoint into a tool a model can call: its description from the docstring, a JSON Schema of its arguments, and errors that tell the model what went wrong, never your credentials."/users/{user_id}").Query, Header, Json, Body, Form, File): every parameter but a path placeholder's says where it goes.httpx2.Client configuration through ClientX(...) arguments.AsyncClientX, AsyncResource) with the same decorators, for async def endpoints.clientx.tools): descriptions from docstrings, JSON Schemas, and errors a model can act on.User-Agent class defaults, authentication, logging and event hooks.AsyncClientX and AsyncResource for async def endpoints, concurrent requests, and async streaming.See CONTRIBUTING.md for setup, checks, and conventions.
ClientX is a passion project that comes from my experience integrating APIs. Every small prototype against a new API means writing the same boilerplate again, and third-party clients are hit or miss. ClientX lets me focus on outcomes rather than plumbing, and I hope it does the same for you. I maintain it in my spare time, so replies may take a while, but issues and pull requests are always welcome.
ClientX is pre-1.0, so the API may change between minor versions. Changes are listed in the changelog.
ClientX is inspired by FastAPI and built on Pydantic and httpx2, and I'm grateful to the developers behind all three. It's an independent project, though, and isn't affiliated with or endorsed by any of them.
ClientX is released under the MIT License.
Find threats in your stack.
OX Radar can check high-priority threats, like critical package CVEs, against your context.
Each incident is marked Detected or Not Detected with a remediation plan and proof all tracked in the Response Center.
The probe returned only these fields for this server — auth requirement, protocol and tool list weren’t observed, so they’re not shown (never guessed).
The publisher’s own links, as the registry reports them. These are not sources for the assessment on this page.