Skip to main content

Shared HTTP types (HttpResponse, HttpError) for the Model Context Standard.

Project description

mcs-types-http

Shared HTTP types for the Model Context Standard (MCS).

Contains HttpResponse and HttpError -- the library-agnostic value objects returned by any MCS HTTP adapter (mcs-adapter-http, mcs-adapter-http-httpx, ...).

This package has zero dependencies. It exists so that alternative HTTP adapter implementations can share the same response type without depending on each other.

Installation

pip install mcs-types-http

Most users don't need to install this directly -- it's pulled in automatically by mcs-adapter-http and other adapter packages.

Usage

from mcs.types.http import HttpResponse, HttpError

resp = HttpResponse(status_code=200, text='{"ok": true}')
assert resp.ok
data = resp.json()

Links

License

Apache-2.0

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

mcs_types_http-0.1.0.tar.gz (6.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

mcs_types_http-0.1.0-py3-none-any.whl (7.3 kB view details)

Uploaded Python 3

File details

Details for the file mcs_types_http-0.1.0.tar.gz.

File metadata

  • Download URL: mcs_types_http-0.1.0.tar.gz
  • Upload date:
  • Size: 6.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.5

File hashes

Hashes for mcs_types_http-0.1.0.tar.gz
Algorithm Hash digest
SHA256 03f0697f546ca358119101e2af594288348f757757960003efa3b436ece3fd6d
MD5 5a0b21698d94142f6d9a7544dd83ab77
BLAKE2b-256 99a86f1cb46d31f69411d538ee4908e4a9d5d53089af3addacc5393d676a64a6

See more details on using hashes here.

File details

Details for the file mcs_types_http-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: mcs_types_http-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 7.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.5

File hashes

Hashes for mcs_types_http-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 13dbbf41d37227d656a58a5316328b13fb4fad1b2f6a03d3348e827da66711b5
MD5 cf5643c7169a33e48f972da573e8f9c4
BLAKE2b-256 e223b48487d44a6faf15d9b1ba91e5e3512b62dc5a07ed8b59348cf09724dfd3

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page