emerson@netdevops:~/netbox-sdk$ gh release view v0.0.7 --repo emersonfelipesp/netbox-sdk
back to releases / back to project
netbox-sdk v0.0.7
- author
- emersonfelipesp
- created
- 2026-03-30 15:48 UTC
- target
- main
- downloads
- 0
emerson@netdevops:~/netbox-sdk$ cat RELEASE_NOTES.md
netbox-sdk v0.0.7
Release date: 2026-03-30
Commit: 864a07c (merge of PR #10)
This release focuses on SDK quality: shared error types, structured logging across SDK/CLI/TUI, tighter HTTP and config error handling, generated OpenAPI module documentation, and CI lockfile alignment after the version bump.
Installation
pip install "netbox-sdk==0.0.7"
# optional extras
pip install "netbox-sdk[cli,tui,demo]==0.0.7"With uv:
uv add "netbox-sdk==0.0.7"Highlights
Centralized exceptions (netbox_sdk.exceptions)
RequestError— HTTP-layer failures (moved fromclient; still importable fromnetbox_sdk.clientandnetbox_sdk).ContentError,AllocationError,ParameterValidationError— facade-level errors (previously defined only infacade).JsonPayloadError— invalid or conflicting--body-json/--body-fileusage (subclass ofValueError).
This makes it easier for callers and tests to branch on failure type without parsing message strings.
Logging
- Dual file logging roots in
logging_runtime: bothnetbox_cliandnetbox_sdktrees attach to the same rotating JSON log file, sologging.getLogger("netbox_sdk....")records persist like CLI/TUI logs. - Module-level loggers added or expanded across SDK modules (
config,schema,http_cache,services,plugin_discovery,django_models.store, etc.), CLI (dynamic,runtime,support), and TUI (app,django_model_app,graphql_app,ssl_verify_support). - Policy documented in
netbox_sdk/CLAUDE.mdandnetbox_tui/CLAUDE.md: no secrets in logs; prefer structuredextra(e.g.nbx_event,request_path,http_method).
HTTP, payloads, and discovery
NetBoxApiClient: more precise typing (CacheEntry,aiohttp.ClientSessionunderTYPE_CHECKING); safer OpenAPI version parsing;create_tokenonly readskeywhen JSON body is an object.load_json_payload:FileNotFoundErrorfor missing--body-file;JSONDecodeErrorpreserved for malformed inline JSON (security tests); logging on decode/read issues.plugin_discovery: logs DEBUG for request/JSON failures; catches typed transport errors plus a finalExceptionpath with DEBUG +exc_infoso strict test mocks do not break the TUI.http_ssl: accurate return type forconnector_for_config; narrowed import guard when classifying TLS errors.
CLI runtime
_VERIFY_REQUEST_ERRORSfor status checks (RuntimeError,OSError,aiohttp.ClientError) with ERROR logs before re-raise where appropriate.- Demo token repair: narrower catches for refresh/save with structured logging.
dynamic: return typesApiResponse/ApiResponse | None; registration and dispatch logging.
TUI
graphql_app: parse failures narrowed toTypeError,ValueError,json.JSONDecodeErrorwith DEBUG logging.django_model_app: DEBUG/WARNING logs instead of silentpassin several optional UI paths.ssl_verify_support: logs when syncing SSL choice to CLI runtime cache fails.
Codegen and bundled OpenAPI artifacts
scripts/generate_typed_sdk.py: module docstring for generated typed bindings; docstrings on generated app/endpoint/root classes;_prepend_models_module_docafter datamodel-codegen.- Committed
models/v4_*andtyped_versions/v4_*: top-level module docstrings for generated files.
Packaging and CI
pyproject.toml/netbox_sdk.__version__: 0.0.7.uv.lock: refreshed souv sync --locked(used in GitHub Actions) succeeds after the version bump.- Ruff format:
http_cache.pyadjusted for pre-commit.
Upgrade notes
- Imports such as
from netbox_sdk import RequestErrorandfrom netbox_sdk.client import RequestErrorcontinue to work. - Code that relied on
load_json_payloadraising onlyValueErrorfor missing files should expectFileNotFoundErrorfor a non-existent--body-filepath. - Mutual exclusion and wrong-shape payloads may raise
JsonPayloadError(still aValueErrorsubclass where applicable).
Verification (upstream CI)
For commit 864a07cff6aaa4ea058b9b3d5b51fdc322421687, the following workflows completed successfully:
- Lint and Format
- Tests
- Security Tests
- Main Post-Merge Validation
- Build and deploy documentation
- Dependabot Updates (workflow run associated with the push)
Links
- PyPI: https://pypi.org/project/netbox-sdk/
- Documentation: https://emersonfelipesp.github.io/netbox-sdk/
- Repository: https://github.com/emersonfelipesp/netbox-sdk
- Full changelog (compare): v0.0.6...v0.0.7
Thanks
Thanks to everyone reporting issues and trying the SDK, CLI, and Textual TUIs. Feedback on logging noise levels and exception ergonomics is welcome for the next patch release.
emerson@netdevops:~/netbox-sdk$ gh release download --pattern '*'