Description
Teams running a self-hosted Shade backend or a staging environment at a custom URL need to override the default API base without changing the environment enum. shade.api_base should provide an escape hatch that takes precedence over the URL resolved from Environment.
Proposed Steps
- Add
api_base: Optional[str] = None to ShadeClient and config.py.
- In the HTTP client URL builder, prefer
api_base when set, otherwise fall back to the Environment-resolved URL.
- Trim trailing slashes on the provided value.
- Document that this is intended for development/testing only.
Acceptance Criteria
shade.api_base = "https://staging.shadeprotocol.io" routes all requests to that host.
ShadeClient(api_base="http://localhost:8000") routes that client's requests locally.
- When
api_base is set, Environment still controls the Stellar network passphrase.
- Trailing slashes in the provided URL are normalized.
Description
Teams running a self-hosted Shade backend or a staging environment at a custom URL need to override the default API base without changing the environment enum.
shade.api_baseshould provide an escape hatch that takes precedence over the URL resolved fromEnvironment.Proposed Steps
api_base: Optional[str] = NonetoShadeClientandconfig.py.api_basewhen set, otherwise fall back to theEnvironment-resolved URL.Acceptance Criteria
shade.api_base = "https://staging.shadeprotocol.io"routes all requests to that host.ShadeClient(api_base="http://localhost:8000")routes that client's requests locally.api_baseis set,Environmentstill controls the Stellar network passphrase.