On this page
apiconn
Prev: function-sequence | Up: projects | Next: compose-application
Rel: wispsy, Composition, requ
Ref: wispsy on GitHub
Tags: #public #wispsy #project #composition #tier/standard
Role
Operation-first REST and GraphQL API connections (API, AsyncAPI) built over requ, with explicit credentials, bounded pagination, and optional validators (Python 3.14+).
Install
pip install apiconn
Quickstart
from apiconn import API
with API.rest("https://api.example.com/v1", token="selected-token") as api:
users = api.resource("users")
user = users.get(123)
api.operation("activate_user", method="POST", path="users/{id}/activate")
result = api.call("activate_user", id=123, json={"active": True})
When to Reach for It
- Defining reusable, explicit REST or GraphQL API clients over
requwithout adopting a heavy SDK framework. - Note the boundary:
expose_apiserves APIs;apiconnconsumes them.
Gotchas & Pitfalls
- Client-only boundary:
apiconnconsumes REST and GraphQL APIs over requ; it does not serve routes (use expose-api for servers). - Python 3.14+ and
requpin: Requires Python>=3.14and pinsrequ>=0.2.0,<0.3.0; always openAPI/AsyncAPIas a context manager so pooled connections close cleanly. - Bounded pagination: Pagination helpers enforce explicit page/item limits rather than fetching unbounded streams—configure bounds intentionally when crawling large endpoints.
Pairs With
- requ — Underlying bounded HTTP(S) transport (
requ>=0.2.0,<0.3.0). - enforce-type — Validates typed input/output payloads.
Metadata
type: project-card
slug: apiconn
org: wispsy
repo: wispsy/apiconn
package: apiconn
version: 0.1.1
requires_python: ">=3.14"
layer: composition
topic: wispsy-composition
status: active
language: python
source_docs: README.md, docs/
Linked from
Related notes
- wiki/projects/compose-application Linked here; links to this page; shared tags: #composition, #project, #tier, #wispsy
- wiki/projects/function-sequence Linked here; links to this page; shared tags: #composition, #project, #tier, #wispsy
- wiki/projects/expose-api Linked here; links to this page; shared tags: #project, #tier, #wispsy
- wiki/projects/requ Linked here; links to this page; shared tags: #project, #tier, #wispsy
- wiki/stack/composition Linked here; links to this page; shared tags: #composition, #tier, #wispsy
- wiki/projects Linked here; links to this page; shared tags: #wispsy
- wiki/projects/enforce-type Linked here; shared tags: #project, #tier, #wispsy
- wiki/choosing links to this page; shared tags: #tier, #wispsy
- wiki/compatibility links to this page; shared tags: #tier, #wispsy
- wiki/orgs/wispsy Linked here; shared tags: #tier, #wispsy