Skip to main content

Official MACSS outbound REST client for Python.

Project description

macss-modular-api-rest-client

Official MACSS outbound REST client for Python.

Quick start

from modular_api_rest_client import ServiceClientConfig, ServiceRequest, http_client

result = http_client(
	config=ServiceClientConfig(
		service_id="users",
		base_url="https://api.example.test",
		redacted_summary="users@example",
		default_headers={"accept": "application/json"},
	),
	request=ServiceRequest(
		operation_id="users.list",
		method="GET",
		path="/users",
	),
)

if result.is_success:
	print(result.value.data)
else:
	print(result.failure.message)

Current slice

  • normalized ServiceResult[T] and ServiceFailure
  • persistent HttpServiceClient
  • one-shot http_client() helper
  • explicit request metadata via ServiceRequest
  • JSON-first response decoding and HTTP metadata preservation

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

macss_modular_api_rest_client-0.5.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.

macss_modular_api_rest_client-0.5.0-py3-none-any.whl (5.8 kB view details)

Uploaded Python 3

File details

Details for the file macss_modular_api_rest_client-0.5.0.tar.gz.

File metadata

File hashes

Hashes for macss_modular_api_rest_client-0.5.0.tar.gz
Algorithm Hash digest
SHA256 ba48af75d32c04076d58ee3abcefff990d2fdfb1c107502bcab7caea0e0bb356
MD5 97f140f0529ffe67b47a214dcb2e4c3a
BLAKE2b-256 91201830efe6f06613f90bd7f112842870d8449dd64c07866017126880fc576d

See more details on using hashes here.

File details

Details for the file macss_modular_api_rest_client-0.5.0-py3-none-any.whl.

File metadata

File hashes

Hashes for macss_modular_api_rest_client-0.5.0-py3-none-any.whl
Algorithm Hash digest
SHA256 0a9860fce492b11a5bd0cb2a05bb7251a1ea1b0027e012036cef3c785c6d3c5f
MD5 7d06aaa2d72c630259c970da1ebc4df0
BLAKE2b-256 df09e06eb5d6d2a6c15e4534c57bb5323ea39508473781f5aa1fa30bf7024925

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