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.6.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.6.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.6.0.tar.gz.

File metadata

File hashes

Hashes for macss_modular_api_rest_client-0.6.0.tar.gz
Algorithm Hash digest
SHA256 9df724f1ed5313dfb8b2288281cfe40a8b55e1894e4fa918be3f80b793061590
MD5 02d8b423072461b713bd7134c1106550
BLAKE2b-256 90d69b67e45ed9357ade20536266fcde314051699eb9142adde7ac3fd7c83f76

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for macss_modular_api_rest_client-0.6.0-py3-none-any.whl
Algorithm Hash digest
SHA256 d99c559a299906a7a2e6795c515ab652663f756adb9fd2a829e3b36a51dff4cf
MD5 23c8ec5cf60add5503c5297d0d0dc560
BLAKE2b-256 2323fdada7707aaa3380a88b0ffebf18d67cd0d6c8dd9ce670e30b68698abb64

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