Skip to content

Python API Release Notes

1.0.4

Python SDK


Version 1.0.4 of the relationalai Python package is now available!

To upgrade, activate your virtual environment and run the following command:

pip install --upgrade relationalai

New Features and Enhancements

  • Added a new rai config:explain command to inspect the active configuration and where each value came from. Now you can inspect the active config directly from the CLI and optionally show full provenance details with --verbose:

    rai config:explain
    rai config:explain --verbose
    
  • Improved dtype inference for pandas columns with object dtype when PyRel derives concept types from data. PyRel now does a better job recognizing numbers in pandas object columns. For example, if a column contains decimal values, PyRel now treats it as numeric instead of treating it as text.

Bug Fixes

  • Fixed an issue with rai connect where invalid Snowflake warehouse names could pass basic connectivity checks. The command now validates the configured warehouse.

  • Fixed a bug that caused select() to raise a ValueError when selecting a Match object.

  • Fixed a bug where PyRel would warn about graph validation whenever you selected a Graph.Edge entity. You can now select or inspect Graph.Edge without triggering validation warnings. PyRel waits to validate until you run a graph operation that actually needs it.

  • Fixed a bug that could cause the client to get disconnected during long-running graph algorithms or other work if a jobs polling attempt was delayed or missed. The maximum polling delay is now short enough to prevent accidental disconnects from transient polling issues.

  • Fixed a bug that could affect results in some queries involving values that could match multiple types.

1.0.3

Python SDK


Version 1.0.3 of the relationalai Python package is now available!

To upgrade, activate your virtual environment and run the following command:

pip install --upgrade relationalai

New Features and Enhancements

  • Added a new reasoner library for prescriptive reasoning. See the prescriptive reasoning guides. For API reference docs, see std.reasoners.prescriptive.

  • Improved typing support for Graph. Graph.__init__() now has overloads so IDEs and static type checkers can catch incorrect combinations of graph constructor parameters.

  • Made Graph attributes directed and weighted read-only. Mutations to these attributes had no effect on graph behavior. They are now immutable to avoid confusion.

  • Improved configuration and authentication diagnostics. create_config() now includes the active profile name in YAML validation errors when available.

  • Improved CLI diagnostics for Snowflake authentication failures. The CLI now surfaces clearer guidance for login and SSO failures.

  • Added await_storage_vacuum support for reasoner configuration. You can now set this in raiconfig.yaml under reasoners.*. Use it when you want a reasoner to wait for storage vacuum work to finish before suspending.

Bug Fixes

  • Made field access by name in relationships case-insensitive. For example, Thermometer.readings["time"] and Thermometer.readings["Time"] now refer to the same field.

  • rai init --migrate now produces cleaner raiconfig.yaml output when migrating from raiconfig.toml. Generated YAML no longer includes spurious default fields, places reuse_model under model, and formats profiles and connections more readably.

  • Fixed ProgrammaticAccessTokenAuth so token_file_path works correctly in v1 configuration. You can now provide either a literal token string or a file path to a Programmatic Access Token in raiconfig.yaml.

  • Improved type checking for relationships and properties. If a field's target type can't be inferred, PyRel now raises a type mismatch error.

Upgrade Notes

  • DataConfig.data_freshness_mins is now capped at 30240 minutes (3 weeks). If you set a larger value, PyRel clamps it to 3 weeks and emits a warning during config creation.

1.0.2

Python SDK


Version 1.0.2 of the relationalai Python package is now available!

To upgrade, activate your virtual environment and run the following command:

pip install --upgrade relationalai

Bug Fixes

  • raiconfig.toml is deprecated, and PyRel now reliably emits a visible warning when it loads a raiconfig.toml config. The warning points you to rai init to migrate or create a raiconfig.yaml.

  • Fixed an issue in Snowflake stored procedures where importing your package could fail or behave unexpectedly if it triggered config auto-discovery at import time. This could attempt to read config files in a restricted runtime, and raise errors such as ConfigFileNotFoundError.

    If your code relied on implicit config loading, update it to construct a Config explicitly and pass it into the SDK objects you create. For example: cfg = create_config(...). In stored procedures, prefer creating the config inside the stored procedure handler rather than at module import time.

    See create_config() for the supported config sources and defaults.

1.0.1

Python SDK


Version 1.0.1 of the relationalai Python package is now available!

To upgrade, activate your virtual environment and run the following command:

pip install --upgrade relationalai

New Features and Enhancements

  • Improved concurrent call handling for ReasonersClient.ensure() and ReasonersClientSync.ensure(). When multiple processes try to create or resume the same reasoner at the same time, ensure() will wait for the in-progress operation to complete instead of failing with a conflict error.

  • Improved the error raised when a logic reasoner job is aborted because the client disconnected. If that happens, JobsClient.wait() / JobsClientSync.wait() raises JobClientDisconnectedError:

    from relationalai.services.jobs.errors import JobClientDisconnectedError
    
    try:
        job = await client.jobs.wait("LOGIC", job_id)
    except JobClientDisconnectedError:
        # The client disconnected before the job completed.
        # Retry after restoring connectivity.
        ...
    

Bug Fixes

  • Fixed an issue where running reasoner CLI commands, such as rai reasoners:create, could fail with an ImportError.

1.0.0

Python SDK


Version 1.0.0 of the relationalai Python package is now available!

To upgrade, activate your virtual environment and run the following command:

pip install --upgrade relationalai

Breaking Changes

  • Version 1.0.0 is a major update of the Python SDK that introduces:

    • PyRel, a new modeling and query DSL organized around Concept, Property, and Relationship classes, and new chainable query methods like define, where, and select. See Build a semantic model for an introduction to the new modeling and query patterns.

    • Improved configuration management with a new raiconfig.yaml format. The v1 SDK treats raiconfig.toml as deprecated, so if you have an existing raiconfig.toml, you should migrate to YAML using rai init --migrate. See Configuring PyRel for details on new configuration patterns.

    • A new CLI with updated commands for managing reasoners, which were previously called engines, and job, which were previously called transactions. Check out the CLI reference for details on the new CLI commands and syntax.

    :::note For docs on the v0.x versions of the Python SDK and CLI, check out https://v0.docs.relational.ai. :::

Upgrade Notes

  • Treat this upgrade as a migration. You should expect to make non-trivial changes to your codebase when upgrading from v0.x to v1.0.0. If you need help, contact RelationalAI support for assistance.

  • Protect existing workflows. Make sure existing production and staging environments install relationalai in a way that doesn't break existing code until you're ready to migrate. For example, if you use pip, you can specify the version in your requirements.txt or setup.py to avoid accidentally upgrading to v1.0.0 before you're ready.

    You can pin your project to the latest v0.x version with:

    relationalai==0.14.3
    

    Or, you can use a version specifier to allow the latest v0.x but prevent upgrading to v1.0.0 until you're ready:

    relationalai>=0.14.0,<1.0.0