Client
archibald.client.ArchieClient
Async HTTP client for ESRI REST APIs.
Manages an internal httpx.AsyncClient with lazy initialization. Enforces f=json on all requests (preserving f=geojson when explicitly set), handles token refresh on 498/499 responses, and raises for HTTP-level errors before ESRI envelope errors are inspected.
Can be used as an async context manager or instantiated directly; in the latter case call aclose() manually when done.
__aenter__()
async
Enter the async context manager.
__aexit__(*args)
async
Exit the async context manager, closing the internal client.
aclose()
async
Close the underlying httpx.AsyncClient if it was created.
get(endpoint=None, *, url=None, params=None, **kwargs)
async
Send a GET request.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
endpoint
|
str | None
|
Path appended to the client's base_url (or url). |
None
|
url
|
str | None
|
Override base URL for this request only. |
None
|
params
|
dict | None
|
Query parameters. f=json is enforced (f=geojson is preserved). |
None
|
**kwargs
|
Forwarded to httpx.AsyncClient.request(). |
{}
|
post(endpoint=None, *, url=None, params=None, data=None, **kwargs)
async
Send a POST request with a form-encoded body.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
endpoint
|
str | None
|
Path appended to the client's base_url (or url). |
None
|
url
|
str | None
|
Override base URL for this request only. |
None
|
params
|
dict | None
|
Query parameters (not form data). |
None
|
data
|
dict | None
|
Form body. f=json is enforced here (f=geojson is preserved). |
None
|
**kwargs
|
Forwarded to httpx.AsyncClient.request() (e.g. files=). |
{}
|