Metadata-Version: 2.4
Name: macss-modular-api-rest-client
Version: 0.5.0
Summary: Official MACSS outbound REST client for Python.
Author: ccisne.dev
License-Expression: MIT
Project-URL: Homepage, https://github.com/macss-dev/modular_api
Project-URL: Repository, https://github.com/macss-dev/modular_api/tree/main/code/py/modular_api_rest_client
Project-URL: Issues, https://github.com/macss-dev/modular_api/issues
Project-URL: Documentation, https://github.com/macss-dev/modular_api/tree/main/code/py/modular_api_rest_client#readme
Keywords: macss,http,rest,client
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Topic :: Internet :: WWW/HTTP :: Dynamic Content
Classifier: Typing :: Typed
Requires-Python: >=3.11
Description-Content-Type: text/markdown
Provides-Extra: dev
Requires-Dist: pytest>=8.0; extra == "dev"

# macss-modular-api-rest-client

Official MACSS outbound REST client for Python.

## Quick start

```python
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
