basst
Pydantic-first HTTP testing client for Python. Fluent request builder, one-step model binding, native Python assertions.
Install
pip install basst
Quick Start
from basst import Client, matchers
from pydantic import BaseModel
class User(BaseModel):
id: int
name: str
email: str
roles: list[str]
api = Client("https://api.example.com")
user = (
api.get("/users/1")
.header("X-Token", "secret")
.expect()
.status(200)
.header("content-type", matchers.contains("json"))
.model(User)
)
assert user.name == "Ada"
assert "admin" in user.roles
Features
- Fluent, chainable request builder (all HTTP verbs)
- Pydantic model binding with
.model()and.model_list() - Automatic content-type validation before parsing
- Built-in header matchers (
equals,contains,starts_with,ends_with,matches) - Custom matchers via simple callables
- Async support (
awaitonly at.expect()) - Contextual error messages with request/response details
from_httpxfor wrapping existing httpx clients
Documentation
Full documentation at basst.readthedocs.io.
Inspiration
basst draws inspiration from REST Assured (Java) and gavv/httpexpect (Go).
License
MIT
Metadata
Release files for basst 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 | |
|---|---|---|---|---|
| basst-0.1.1.tar.gz | 7.7 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| basst-0.1.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 17.1 kB
Release files / basst-0.1.1.tar.gz
| Download URL | basst-0.1.1.tar.gz |
|---|---|
| Size | 7.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
63423774fe6a1d3b6d61e8ff80a5ea759030e7a01d89b0b88c88e7464a00dfbe
|
|
BLAKE2b-256 checksum How to use checksums |
4c4d55be60b7d12894954e10c0ddc8b97a9a0f53bf584a24326cba77363b586f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.9.18 {"installer":{"name":"uv","version":"0.9.18","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Arch Linux","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
|
Release files / basst-0.1.1-py3-none-any.whl
| Download URL | basst-0.1.1-py3-none-any.whl |
|---|---|
| Size | 9.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
0d2a4154ea043a15a052e6b6e025cf8bbd681260a28f4d71a71a04b00c97d7da
|
|
BLAKE2b-256 checksum How to use checksums |
37c4546286cccca489a4f1a743124f0057a7101d955b0261f5659fde67f83449
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.9.18 {"installer":{"name":"uv","version":"0.9.18","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Arch Linux","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
|
Security for basst 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.
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.