Skip to content

Releases: opsmill/infrahub-sdk-python

v1.21.0

29 May 15:39
c985782

Choose a tag to compare

1.21.0 - 2026-05-29

Added

  • Add infrahubctl marketplace get for fetching schemas and collections from the Infrahub Marketplace. Auto-detects schemas vs collections by namespace/name, supports --version for pinning, --collection to force the collection path, --stdout to stream content for piping (status messages on stderr), and --marketplace-url / INFRAHUB_MARKETPLACE_URL to point at staging or local instances. (#952)

Changed

  • Change default value of sync_with_git parameter in branch.create() from True to False to match UI behavior. (#224)

Fixed

  • Improve error message when a single node is passed to a cardinality-many relationship. (#174)

v1.20.1

20 May 13:44
98bb218

Choose a tag to compare

1.20.1 - 2026-05-20

Added

  • Added SHA-1 idempotency primitives for CoreFileObject nodes:

    • InfrahubNode.matches_local_checksum(source) / sync variant — compare a local bytes | Path | BinaryIO source against the node's server-stored checksum without invoking a transfer.
    • InfrahubNode.upload_if_changed(source, name=None) / sync variant — stage + save only when the local source differs from the server, returning an UploadResult(was_uploaded, checksum) dataclass.
    • download_file(..., skip_if_unchanged=True) — short-circuit the download when dest already exists on disk with a matching SHA-1. Returns 0 bytes written when skipped.

    A shared sha1_of_source helper (streaming, 64 KiB chunks) centralises the hashing convention in infrahub_sdk.file_handler.

Fixed

  • Skip mandatory field validation during object loading when object_profile is specified. (#908)
  • Render schema rejections originating in an extensions: block as a readable one-line message in infrahubctl schema load, instead of crashing with ValueError: invalid literal for int(). (#1007)
  • Add MERGING branch status so that a merging branch can still be correctly retrieved. (#1037)

v1.20.0

24 Apr 19:25
dec3101

Choose a tag to compare

1.20.0 - 2026-04-24

Removed

  • Removed the deprecated raise_for_error argument from execute_graphql, query_gql_query, get_diff_summary, allocate_next_ip_address, and allocate_next_ip_prefix client methods. HTTP errors are now always raised via resp.raise_for_status().

Added

  • Add infrahubctl schema export command to export schemas from Infrahub. (#151)
  • Add artifact_content, file_object_content, from_json, and from_yaml Jinja2 filters for artifact content composition in templates.

Changed

  • Replace FilterDefinition.trusted: bool with flag-based ExecutionContext model (CORE, WORKER, LOCAL) for context-aware template validation. validate() now accepts an optional context parameter. Backward compatible.

Fixed

  • Allow direct assignment of authentication method to the configuration to override settings from environment variables. (#654)
  • Corrected protocol typing for IPHost.value IPAddress -> IPInterface (#891)
  • Generate protocols so that optional attributes with a default value are rendered as required (not nullable). (#894)
  • Fixed ObjectStore.get() and ObjectStore.upload() silently swallowing non-2xx HTTP errors instead of raising them. (#958)
  • Skip mandatory field validation during object loading when object_template is specified.

v1.19.0

16 Mar 15:26
84ee9ef

Choose a tag to compare

Added

  • Added support for FileObject nodes with file upload and download capabilities. New methods upload_from_path(path) and upload_from_bytes(content, name) allow setting file content before saving, while download_file(dest) enables downloading files to memory or streaming to disk for large files. (#ihs193)
  • Python SDK API documentation is now generated directly from the docstrings of the classes, functions, and methods contained in the code. (#201)
  • Added a 'py.typed' file to the project. This is to enable type checking when the Infrahub SDK is imported from other projects. The addition of this file could cause new typing issues in external projects until all typing issues have been resolved. Adding it to the project now to better highlight remaining issues.

Changed

  • Updated branch report command to use node metadata for proposed change creator information instead of the deprecated relationship-based approach. Requires Infrahub 1.7 or above.

Fixed

  • Allow SDK tracking feature to continue after encountering delete errors due to impacted nodes having already been deleted by cascade delete. (#265)
  • Fixed Python SDK query generation regarding from_pool generated attribute value (#497)

Full changelog

  • Merge stable into develop by @infrahub-github-bot-app[bot] in #741
  • Merge develop into infrahub-develop by @infrahub-github-bot-app[bot] in #743
  • Re-implement casting of HFIDs to a list if the rel peer schema has hf… by @FragmentedPacket in #746
  • IHS-183: Fix typing errors for protocols by @solababs in #749
  • Fix test annotations by @ogenstad in #751
  • Add annotations to unit tests by @ogenstad in #750
  • Merge develop into infrahub-develop by @infrahub-github-bot-app[bot] in #752
  • Fix ANN001 violations by @ogenstad in #753
  • Merge stable into develop by @infrahub-github-bot-app[bot] in #754
  • Merge develop into infrahub-develop by @infrahub-github-bot-app[bot] in #755
  • Avoid nested chained if statements by @ogenstad in #757
  • Revert "IHS-183: Fix typing errors for protocols" by @solababs in #760
  • Merge develop into infrahub-develop by @infrahub-github-bot-app[bot] in #762
  • Combine if statements by @ogenstad in #758
  • Typing corrections by @ogenstad in #759
  • Add CODEOWNERS by @ogenstad in #767
  • Fix extracting value from dictionary without calling .items() by @ogenstad in #764
  • Suppress try/except/pass by @ogenstad in #768
  • Favor .extend instead of chaining .append by @ogenstad in #769
  • Merge stable into develop by @infrahub-github-bot-app[bot] in #761
  • Merge develop into infrahub-develop by @infrahub-github-bot-app[bot] in #770
  • Replace ternary if expression with or operator by @ogenstad in #772
  • Prefer variables in lowercase by @ogenstad in #771
  • Simplify for-loop with any() by @ogenstad in #777
  • Prevent cascade delete from causing SDK tracking delete to fail by @ogenstad in #776
  • Merge stable into develop by @infrahub-github-bot-app[bot] in #775
  • Use a list comprehension to create a transformed list by @ogenstad in #774
  • Add missing init.py files by @ogenstad in #778
  • Fix ruff Jinja2 violations and move the remaining warning by @ogenstad in #781
  • Add hash method to object that already has eq by @ogenstad in #780
  • Move rules for too many branches by @ogenstad in #779
  • Update packages: urllib3, filelock & virtualenv by @ogenstad in #783
  • Fix flake8 raise linting violations by @ogenstad in #784
  • Split apart pytest rule violations by @ogenstad in #785
  • Avoid shadowing builtin list by @ogenstad in #786
  • Merge stable into develop by @infrahub-github-bot-app[bot] in #782
  • Merge develop into infrahub-develop by @infrahub-github-bot-app[bot] in #787
  • Add task to generate JSON schema for .infrahub.yml files by @ogenstad in #788
  • add libstdc++ to flake.nix to support Python dependencies that depend on compiled libraries by @wvandeun in #790
  • Upgrade infrahub-testcontainers to 1.7 by @gmazoyer in #793
  • Merge develop into infrahub-develop by @infrahub-github-bot-app[bot] in #796
  • Upgrade ty by @ogenstad in #797
  • add str method to JinjaTemplateError by @ajtmccarty in #795
  • Merge stable into develop by @infrahub-github-bot-app[bot] in #791
  • Merge develop into infrahub-develop by @infrahub-github-bot-app[bot] in #800
  • Update ruff==0.15.0 by @ogenstad in #799
  • Raise SDK specific Jinja errors on syntax error by @ogenstad in #798
  • IHS-193 Add support for file upload/download for CoreFileObject by @gmazoyer in #792
  • fix(dependabot): update infrahub-testcontainers by @fatih-acar in #801
  • Fix infrahubctl proposed change table generation by @gmazoyer in #805
  • IFC-2184: Add MERGED to branch status by @solababs in #794
  • Bump infrahub-testcontainers from 1.5.1 to 1.7.4 by @dependabot[bot] in #804
  • migrate from pre-commit to prek by @solababs in #789
  • Merge develop into infrahub-develop by @infrahub-github-bot-app[bot] in #808
  • Merge stable into develop with resolved conflicts by @ogenstad in #809
  • Add integration tests for file objects by @gmazoyer in #802
  • Merge 'develop' into 'infrahub-develop' with resolved conflicts by @ogenstad in #813
  • Add pull request template by @ogenstad in #812
  • Add invoke command specifically for code linting by @ogenstad in #815
  • Use ternary operator instead of if-else-block by @ogenstad in #814
  • Merge stable into develop by @infrahub-github-bot-app[bot] in #816
  • Merge develop into infrahub-develop by @infrahub-github-bot-app[bot] in #817
  • Linting: Incorrect import of pytest; use import pytest instead by @ogenstad in #824
  • Fix dulwich checkout_branch deprecation warning in testing utilities by @Copilot in #819
  • Add Spec Kit by @ogenstad in #827
  • Merge stable into develop by @infrahub-github-bot-app[bot] in #825
  • Fix pytest plugin for integration tests and empty YAML files by @FragmentedPacket in #744
  • Avoid + operator to concatenate collections by @ogenstad in #826
  • Break apart ty violations into smaller components by @ogenstad in #828
  • Merge develop into infrahub-develop by @infrahub-github-bot-app[bot] in #830
  • Add py.typed by @ogenstad in https://github...
Read more

v1.19.0 (Release Candidate 0)

27 Feb 21:17
f737549

Choose a tag to compare

Pre-release

Added

  • Added support for FileObject nodes with file upload and download capabilities. New methods upload_from_path(path) and upload_from_bytes(content, name) allow setting file content before saving, while download_file(dest) enables downloading files to memory or streaming to disk for large files. (#ihs193)
  • Python SDK API documentation is now generated directly from the docstrings of the classes, functions, and methods contained in the code. (#201)
  • Added a 'py.typed' file to the project. This is to enable type checking when the Infrahub SDK is imported from other projects. The addition of this file could cause new typing issues in external projects until all typing issues have been resolved. Adding it to the project now to better highlight remaining issues.

Changed

  • Updated branch report command to use node metadata for proposed change creator information instead of the deprecated relationship-based approach. Requires Infrahub 1.7 or above.

Fixed

  • Allow SDK tracking feature to continue after encountering delete errors due to impacted nodes having already been deleted by cascade delete. (#265)
  • Fixed Python SDK query generation regarding from_pool generated attribute value (#497)

Version 1.19.0 (beta 0)

18 Feb 14:54
f84bbd2

Choose a tag to compare

Pre-release

Added

  • Added support for FileObject nodes with file upload and download capabilities. New methods upload_from_path(path) and upload_from_bytes(content, name) allow setting file content before saving, while download_file(dest) enables downloading files to memory or streaming to disk for large files. (#ihs193)
  • Added a 'py.typed' file to the project. This is to enable type checking when the Infrahub SDK is imported from other projects. The addition of this file could cause new typing issues in external projects until all typing issues have been resolved. Adding it to the project now to better highlight remaining issues.

Changed

  • Updated branch report command to use node metadata for proposed change creator information instead of the deprecated relationship-based approach. Requires Infrahub 1.7 or above.

Fixed

  • Allow SDK tracking feature to continue after encountering delete errors due to impacted nodes having already been deleted by cascade delete. (#265)

v1.18.1

09 Jan 04:22
d116aa3

Choose a tag to compare

1.18.1 - 2026-01-08

Fixed

  • Reverted #723 (Fix code for HFID casting of strings that aren't UUIDs)

Version 1.18.0

08 Jan 14:57
391d41c

Choose a tag to compare

Added

  • Add ability to query for metadata on nodes to include information such as creation and update timestamps, creator and last user to update an object.
  • Added ability to order nodes by metadata created_at or updated_at fields

Removed

  • The previously deprecated 'background_execution' parameter under client.branch.create() was removed.

Fixed

  • Rewrite and re-enable integration tests (#187)
  • Fixed SDK including explicit null values for uninitialized optional relationships when creating nodes with object templates, which prevented the backend from applying template defaults. (#630)

Housekeeping

  • Fixed Python 3.14 compatibility warnings. Testing now requires pytest>=9.

Full changelog

Full Changelog: v1.17.0...v1.18.0

Release 1.15.2

29 Dec 11:21
d2c497a

Choose a tag to compare

Fixed

  • Fixed SDK including explicit null values for uninitialized optional relationships when creating nodes with object templates, which prevented the backend from applying template defaults. (#630)

Version 1.17.0

11 Dec 08:17
5b6991f

Choose a tag to compare

Added

  • Add support for Python 3.14

Removed

  • Removed copier as a dependency, this impacts the infrahub repository init command and contains new instructions for how to initialize a repository from the template.
  • Remove is_visible property from Infrahub

Full changelog

Full Changelog: v1.16.0...v1.17.0