Releases: sshimek42/britecore_sdk
Release list
v2.2.0
Added
-
Optional native async HTTP transport —
AsyncBritecoreAPIClientnow accepts
async_transport="httpx"(default:"threaded"). When set to"httpx", requests
are executed natively viahttpx.AsyncClientinstead of wrapping the sync client in
asyncio.to_thread. An optionalhttpx_clientkwarg allows injecting a pre-built
client (e.g., for shared connection pools or testing). Install the new optional extra
to enable:pip install britecore_sdk[async-http]. -
Optional pydantic-validated settings view —
get_typed_settings(site_names=[...])
is now exported frombritecore_sdk.settings. It returns a strongly-typed pydantic
model built from the live Dynaconf config, providing IDE autocompletion and runtime
field validation without changing SDK initialization behavior. Requires:
pip install britecore_sdk[typed-config]. -
New
toml_compatwrapper (britecore_sdk.utils.toml_compat) — thin adapter that
exposes atoml-like API (load/dump/loads/dumps) backed by stdlib
tomllibfor parsing andtomli-wfor serialization. Internal SDK utilities now use
this wrapper, removing the dependency on the untypedtomlpackage. -
New optional dependency extras in
pyproject.toml:britecore_sdk[async-http]— pulls inhttpxfor native async transport.britecore_sdk[typed-config]— pulls inpydanticandpydantic-settings.britecore_sdk[all]— now includes both new extras in addition tointeractive.
Changed
-
Removed
typing-extensionsfrom core runtime dependencies — the project targets
Python>=3.11, whereTypedDictis part of stdlibtyping. The only consumer
(api/types.py) now imports fromtypingdirectly. -
Replaced
tomlwithtomli-win core runtime dependencies.tomllib(stdlib
since Python 3.11) handles parsing;tomli-wprovides the write path.
Iftomli-wis unavailable at runtime the wrapper transparently falls back totoml
(backward compatible, no hard breakage).
Migration notes
toml → tomli-w (write path)
No action required for most consumers. The internal TOML I/O used by config utilities
is fully backward-compatible. If you import toml from check_site_configs.py or
_config_common directly, switch to:
from britecore_sdk.utils.toml_compat import tomlAsync transport
Existing code that uses AsyncBritecoreAPIClient is unaffected; the default transport
remains "threaded". To opt into native async I/O:
from britecore_sdk.api import AsyncBritecoreAPIClient
client = AsyncBritecoreAPIClient(target_site="prod", async_transport="httpx")Typed settings (opt-in)
from britecore_sdk.settings import get_typed_settings
typed = get_typed_settings(site_names=["prod", "staging"])
print(typed.sites["prod"].base_url)v2.1.1
Changed
- Completed the v2.1.x quote-wrapper quality pass in
src/britecore_sdk/api/api_calls/v2/quotes.pyby expanding remaining endpoint docstrings to include parameter intent, return behavior, and error semantics. - Added missing input validation to quote wrappers that accepted required identifiers without guardrails (
associate_agentcy_to_quote,prefill_loss_history,prefill_violations,summary,turn_quote_into_application, andupdate_e_delivery_enabled). - Continued policy lifecycle quality-of-life improvements in
src/britecore_sdk/api/api_calls/v2/policies.pyforbind,cancel_policy,create_policy_from_britequote,evaluate_cancellation, andsubmit_quote.
Fixed
- Corrected silent validation behavior in policy creation/retrieval paths by ensuring
BritecoreError.MissingParameteris raised where required parameters are missing.
Documentation
- Added completion records for the v2.1.x effort:
QUALITY_OF_LIFE_AUDIT_2026-07-23.mdV2.1.1_SESSION_STATUS_2026-07-23.mdV2.1.X_COMPLETION_2026-07-23.md
v2.0.5
Added
- Added
[project.urls]metadata inpyproject.toml(Homepage, Documentation, Repository, Issues, Changelog) for richer package index/project link display. - Added a "Project Links" section to
docs/index.mdanddocs/project_overview.md.
Changed
- Raised runtime minimums for
dynaconfandtyping-extensionsinpyproject.toml. - Refreshed dev/docs dependency minimums in
pyproject.tomlwhile preserving Python 3.11 compatibility (sphinx>=9.0.4,<9.1). - Updated workflow action pins in release/publish workflows to current majors used in this repo (
softprops/action-gh-release@v3,actions/download-artifact@v5).
v2.0.4
Fixed
- CI formatting parity: normalized
tests/unit/test_config_wizard.pyformatting and line endings so local pre-commit and GitHub Actionsblack --checkagree across platforms. - Release documentation drift: aligned package version references and metadata dates in actively maintained root docs.
Changed
- Bumped package version to 2.0.4 in
pyproject.toml.
v2.0.3
Added
- 85 new always-on tests replacing the fully-skipped
test_workflows_integration.py
template suite across 10 test classes:TestPhoneValidatorProperties(15): format normalization, sentinel rejection ("0","-"),
all type-map entries (mobile→Cell,business→Work,office→Work,cellular→Cell),
multi-entry list processingTestEmailValidatorProperties(12): lowercase normalization,validate_email(), type-map
entries (home→Personal,business→Work),InvalidEmailAddressguard, silent empty-entry skipTestNameValidatorProperties(6): apostrophe lowercasing, suffix handling (IV, III, Jr)TestBritecoreQuoteModel(6):to_dict()field completeness, auto-generated description,
explicit description preservation, inspection date include/exclude,underwriting_questionsresetTestBritecoreContactModel(5):process_contact()name normalization, type defaulting,
organization type, policy number, key completenessTestPolicyWorkflows(3):retrieve_policypath routing, payload building,revision_stateTestContactWorkflows(6):new_contactpath, address/phone/email type normalization,
MissingParameterguards for empty name and empty address listTestQuoteWorkflows(6):create_full_quotetuple return, path routing, empty/Nonepayload
guards,Noneresponse(None, None)tuple, explicit-client overrideTestErrorHandlingWorkflows(8): exceptionstatus_codemetadata, flat-alias identity,
BritecoreError.Basehierarchy,request_id/error_codein__str__TestMultiEnvironmentWorkflows(4):use_api_clientcontext manager,init_api_client,
get_api_clientwith autouse mock
Fixed
test_live_create_quote_round_trip: replaced unconditionalpytest.skip()with a real
create_full_quote→get_quoteround-trip test, gated on the new
BRITECORE_SANDBOX_POLICY_TYPE_IDenv var; preserves skip behaviour when the variable is absenttest_interactive_menu_module_can_be_imported: removed catch-alltry/except pytest.skip();
the module uses a lazy proxy (_LazyAPIClient) that never requires config at import time- black ↔ ruff-format formatting cycle on
test_endpoints.py: extracted long assertion
message into a local variable so the statement fits on one line and both formatters agree post_probe_report.json/post_probe_report.md: fixed missing end-of-file newline and
mixed Windows/Unix line endings
v2.0.2
Fixed
- Critical docstring gaps: added the missing module-level docstring to
src/britecore_sdk/api/api_calls/v1/contacts.py. - Documentation quality improvements:
- Expanded
src/britecore_sdk/settings/config.pymodule docstring from 2 words to comprehensive layered-configuration documentation. - Corrected and expanded
src/britecore_sdk/models/quote.pymodule docstring (it was incorrectly labeled as a policy model).
- Expanded
- API reference generation: ensured all module-level docstrings are present and properly formatted for Sphinx autodoc and IDE tooltips.
Verified
- All 560+ endpoint wrapper functions have comprehensive Google-style docstrings.
- Zero autogenerated wrapper stubs remain without proper documentation.
- 100% module-level docstring coverage across core modules.
- No regressions: all 90 API module files compile successfully.
- Local validation passed:
- Ruff linting
- Black formatting
- Mypy type checks
- Unit tests (593 passed)
Release Notes
This patch release focuses on documentation quality and release hygiene for the SDK.
v2.0.1
Added
- POST probe utility (
src/britecore_sdk/utils/probe_post_requirements.py): CLI tool that
sends empty payloads to every undocumented POST endpoint in the OpenAPI spec and infers
required field names from server validation-error responses. Supports--dry-run,
--use-spec-empty-properties,--print-selected-paths,--export-selected-paths, and
--log-levelflags. Outputs structured JSON and Markdown reports. - Probe regression test generator (
generate_probe_regression_tests.py): Script that reads
post_probe_report.jsonand producestests/unit/test_probe_endpoint_regression.py— 209
parametrized tests that verify every probe-confirmed wrapper routes to the correct API path.
Re-run after future probe runs to keep the suite current. - Probe endpoint regression tests (
tests/unit/test_probe_endpoint_regression.py): 209
generated path-routing tests covering allgenuine_successandinformative_errorprobe
results. No live API required; runs fully mocked in ~1 second.
Changed
- 136 autogenerated wrapper stubs updated with probe-discovered required parameters.
Functions that previously accepted only**kwargsnow expose named parameters for their
required fields (e.g.return_premium_id,claim_contact,quote_id). All new parameters
default toNoneand are filtered from the payload before sending, preserving backward
compatibility. claim_exposures.get_accounting_loss_details,get_accounting_overview,
get_accounting_recoveries_data: addedapi_keyparameter to match OpenAPI spec.test_autogenerated_wrapper_request_keys_match_spec: updated to accept probe-discovered and
manually-curated fields as valid additions to spec-defined keys (spec is intentionally
incomplete for many endpoints).test_claims_wrapper_requests: configuremultiple_parameter_verification.return_valueso
theget_claimparametrized case passes under the autousemock_api_clientfixture.
Fixed
probe_post_requirements.py: replaced adjacent%s%slogging format tokens that matched
the legacy SCLogging token regex, resolvingtest_no_legacy_logging_tokens_in_source_tree.
v2.0.0 — Production Release
What's new in 2.0.0
This is the full production release of the BriteCore SDK, completing the 6-phase v2.0.0 roadmap.
Phase highlights
Phase 1 — Client Lifecycle Redesign
- Explicit client= parameter on all endpoint wrappers
esolve_client() / �resolve_client() helpers
Phase 2 — Typed Response Models
- �ritecore_sdk.api.responses: ResponseEnvelope, QuoteResponse, PolicyResponse, ContactResponse, ListResponse, BatchOperationResponse
- .from_api() factory pattern; full IDE autocomplete; raw data via .raw_data
Phase 3 — Standardized Error Model - All exceptions include status_code, error_code,
equest_id, detail,
aw_payload, sanitized_body - ValidationError.validation_errors for field-level details
- Backwards compatible
Phase 4 — Transport Middleware System - �ritecore_sdk.api.middleware: RequestIdMiddleware, LoggingMiddleware, HeaderInjectionMiddleware, TimeoutMiddleware
- �dd_middleware() /
emove_middleware() on the client
Phase 5 — Pagination Iterators - iter_quotes(), iter_policies(), iter_contacts() and async equivalents
- Automatic page management, lazy-loading, sync and async
Phase 6 — Legacy Cleanup - �ritecore_sdk.api._compat migration helpers
- Comprehensive docs/migrations/V2.0.0-COMPLETE-MIGRATION.md
Bug fixes
- �ritecore_sdk.api.iterators: fixed SyntaxError: yield from inside async function that prevented module import on 3.11+
Upgrading from 1.5.x
See docs/migrations/V2.0.0-COMPLETE-MIGRATION.md for the full migration guide.
v1.5.4
Changed
- Fixed
.github/workflows/docs.ymlvalidation by moving the Read the Docs hook secret to job-levelenv. - Tightened packaging dependency metadata:
typing_extensions>=4.15.0,<5.0.0toml>=0.10.2,<0.11.0- Kept
setuptools>=83.0.0indevextras so CI audits run against a non-vulnerable build toolchain.
- Aligned docs packaging requirements with
pyproject.toml:docs/requirements.txtnow matches thedocsextra Sphinx constraint.
v1.5.3
Changed
- Packaging metadata now marks the project as stable in
pyproject.toml:Development Status :: 4 - Beta->Development Status :: 5 - Production/Stable
- Updated docs to reflect current exception diagnostics and security behavior:
API.mdnow documents exceptionrequest_idandsanitized_bodyfields.docs/OBSERVABILITY.mdnow includes exception-based request correlation examples.SECURITY.mdnow clarifies redacted exception request context viasanitized_body.