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.4.7.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.

File details

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

File metadata

File hashes

Hashes for macss_modular_api_rest_client-0.4.7.tar.gz
Algorithm Hash digest
SHA256 e5dbe81e4a1e7f6e41281ac25dfad2b5bb09fc42229fe17a3feddb26889b3335
MD5 f63c38db69862460e211d5b4da613bf2
BLAKE2b-256 6ec0123d0fc6f886a6e1fbe7da0658356559200fc600ea4d874b2a9a27663254

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for macss_modular_api_rest_client-0.4.7-py3-none-any.whl
Algorithm Hash digest
SHA256 7e8768f5e6257cf7ed570ef72c7077a978afafe85394a5db0ddd0e0a3cdddb8f
MD5 affc8d89027e3cf6106da41277c9b381
BLAKE2b-256 e4a9a1fe52799b3b8bff2e8f57356227dcec05ac88342776661a558840b2939c

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