Skip to content

Python API Release Notes

1.0.13

Python SDK


Version 1.0.13 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

  • Expanded graph APIs:

  • Added cumsum_asc() for cumulative sums over ascending keys.

  • Added global --json and --no-color options to the rai CLI to make output easier to handle in automation. --json returns structured output for reasoners:list, reasoners:get, jobs:list, and jobs:get. For example:

    rai --json jobs:list
    rai --no-color reasoners:list
    
  • Updated rai CLI wait flows so they make fewer unnecessary backend status and result checks before returning. These flows occur when you use --wait with commands like rai reasoners:create and rai reasoners:resume:

    rai reasoners:create --type Logic --name my_reasoner --wait
    rai reasoners:resume --type Logic --name my_reasoner --wait
    

    The same improvements also apply when PyRel waits on jobs and reasoners.

Upgrade Notes

  • If you work with multiple prescriptive solutions, keep the ProblemVariable returned by problem.solve_for(...) and query it directly instead of calling Problem.variable_values(). For example:

    var = problem.solve_for(...)
    sol_idx = Integer.ref()
    value = Float.ref()
    
    model.select(sol_idx, value).where(var.values(sol_idx, value))
    

    This returns (sol_idx, value) pairs, so you can inspect every solution or filter to one specific solution index. Problem.variable_values() still works, but it is deprecated and no longer preferred.

  • Problem.load_point() still works as a deprecated no-op for load_point(0), but load_point(k) for k > 0 is no longer supported.

1.0.12

Python SDK


Version 1.0.12 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

1.0.11

Python SDK


Version 1.0.11 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

  • Fixed the warning shown when direct_access: true is used with an unsupported authenticator. Before, the warning could use older terminology that did not match the v1 config fields. Now the warning uses v1 naming, explains the fallback to direct_access: false, and lists the supported authenticator names. For direct access configuration details, see Enable Direct Access.

1.0.10

Python SDK


Version 1.0.10 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

  • PyRel DSL objects now show readable structure in repr(), str(), and .pprint(). Before, inspecting concepts, expressions, fragments, aggregates, refs, fields, and models showed generic values like <ClassName object at 0x...>. Now those representations show the object structure directly, which makes debugging and interactive inspection easier.

Bug Fixes

  • Fixed primitive-value lists passed to .in_() inside select() queries so they no longer create temporary data tables or mutate model state. Before, filters like Person.name.in_(["Alice", "Bob"]) could register extra model state as a side effect. Now those select() filters compile as literal unions, leave the model unchanged, and still return the expected results.

1.0.9

Python SDK


Version 1.0.9 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 RAI_CONFIG_FILE_PATH support so PyRel can load a specific config file instead of auto-discovering one. PyRel now checks that path first, raises a clearer error when the override is invalid, and shows the active config file when you run rai config:explain.

  • Restored Snowflake OAuth authorization-code sign-in for Direct Access. This restores the interactive browser callback and token-exchange sign-in flow that Direct Access workflows use. For setup, see Create an OAuth Security Integration for Direct Access.

  • Added weighted-graph support to Graph.preferential_attachment(). The graph docs now also clarify how self-loops contribute to degree() and weighted_degree().

Bug Fixes

  • Fixed Graph.diameter_range() to raise explicit unsupported-graph errors for directed and weighted graphs. Before, those graph types were documented as supported. Now PyRel fails early with an explicit error instead of implying that those modes are available.