# RelationalAI Python API Reference

This document outlines all of the functions, classes, and methods in the public RelationalAI Python API.

## `relationalai`

The `relationalai` namespace contains classes for fundamental concepts, including the
[`Model`](./Model/README.md), [`Type`](./Type/README.md), [`Context`](./Context/README.md), and [`Producer`](./Producer/README.md) classes.

- [`Context`](./Context/README.md)
  - [`Context.__enter__()`](./Context/enter__.md)
  - [`Context.__exit__()`](./Context/exit__.md)
  - [`Context.__iter__()`](./Context/iter__.md)
  - [`Context.model`](./Context/model.md)
  - [`Context.results`](./Context/results.md)
- [`ContextSelect`](./ContextSelect/README.md)
  - [`ContextSelect.__call__()`](./ContextSelect/call__.md)
  - [`ContextSelect.__getattribute__()`](./ContextSelect/getattribute__.md)
  - [`ContextSelect.add()`](./ContextSelect/add.md)
- [`Expression`](./Expression.md)
- [`Instance`](./Instance/README.md)
  - [`Instance.persist()`](./Instance/persist.md)
  - [`Instance.set()`](./Instance/set.md)
  - [`Instance.unpersist()`](./Instance/unpersist.md)
- [`InstanceProperty`](./InstanceProperty/README.md)
  - [`InstanceProperty.or_()`](./InstanceProperty/or_.md)
- [`Model`](./Model/README.md)
  - [`Model.found()`](./Model/found.md)
  - [`Model.name`](./Model/name.md)
  - [`Model.not_found()`](./Model/not_found.md)
  - [`Model.ordered_choice()`](./Model/ordered_choice.md)
  - [`Model.query()`](./Model/query.md)
  - [`Model.read()`](./Model/read.md)
  - [`Model.rule()`](./Model/rule.md)
  - [`Model.scope()`](./Model/scope.md)
  - [`Model.Type()`](./Model/Type.md)
  - [`Model.union()`](./Model/union.md)
- [`Producer`](./Producer/README.md)
  - [`Producer.__add__()`](./Producer/add__.md)
  - [`Producer.__enter__()`](./Producer/enter__.md)
  - [`Producer.__eq__()`](./Producer/eq__.md)
  - [`Producer.__exit__()`](./Producer/exit__.md)
  - [`Producer.__floordiv__()`](./Producer/floordiv__.md)
  - [`Producer.__ge__()`](./Producer/ge__.md)
  - [`Producer.__getattribute__()`](./Producer/getattribute__.md)
  - [`Producer.__gt__()`](./Producer/gt__.md)
  - [`Producer.__le__()`](./Producer/le__.md)
  - [`Producer.__lt__()`](./Producer/lt__.md)
  - [`Producer.__mul__()`](./Producer/mul__.md)
  - [`Producer.__ne__()`](./Producer/ne__.md)
  - [`Producer.__radd__()`](./Producer/radd__.md)
  - [`Producer.__rfloordiv__()`](./Producer/rfloordiv__.md)
  - [`Producer.__rmul__()`](./Producer/rmul__.md)
  - [`Producer.__rsub__()`](./Producer/rsub__.md)
  - [`Producer.__rtruediv__()`](./Producer/rtruediv__.md)
  - [`Producer.__sub__()`](./Producer/sub__.md)
  - [`Producer.__truediv__()`](./Producer/truediv__.md)
- [`Property`](./Property.md)
- [`Type`](./Type/README.md)
  - [`Type.__call__()`](./Type/call__.md)
  - [`Type.__or__()`](./Type/or__.md)
  - [`Type.add()`](./Type/add.md)
  - [`Type.extend()`](./Type/extend.md)
  - [`Type.known_properties()`](./Type/known_properties.md)
  - [`Type.model`](./Type/model.md)
  - [`Type.name`](./Type/name.md)

## [`relationalai.std`](./std/README.md)

The `relationalai.std` namespace contains the RelationalAI Query Builder Standard Library.
This includes functions for performing [aggregations](./std/aggregates/)
as well as classes for creating and working with [graphs](./std/graphs.md).

- [`alias()`](./std/alias.md)
- [`Vars`](./std/Vars.md)

### [`relationalai.std.aggregates`](./std/aggregates/README.md)

- [`aggregates.avg()`](./std/aggregates/avg.md)
- [`aggregates.count()`](./std/aggregates/count.md)
- [`aggregates.max()`](./std/aggregates/max.md)
- [`aggregates.min()`](./std/aggregates/min.md)
- [`aggregates.rank_asc()`](./std/aggregates/rank_asc.md)
- [`aggregates.rank_desc()`](./std/aggregates/rank_desc.md)
- [`aggregates.sum()`](./std/aggregates/sum.md)

### [`relationalai.std.graphs`](./std/graphs/README.md)

- [`graphs.Compute`](./std/graphs/Compute/README.md)
  - [`graphs.Compute.adamic_adar()`](./std/graphs/Compute/adamic_adar.md)
  - [`graphs.Compute.avg_clustering_coefficient()`](./std/graphs/Compute/avg_clustering_coefficient.md)
  - [`graphs.Compute.avg_degree()`](./std/graphs/Compute/avg_degree.md)
  - [`graphs.Compute.avg_indegree()`](./std/graphs/Compute/avg_indegree.md)
  - [`graphs.Compute.avg_outdegree()`](./std/graphs/Compute/avg_outdegree.md)
  - [`graphs.Compute.betweenness_centrality()`](./std/graphs/Compute/betweeness_centrality.md)
  - [`graphs.Compute.cosine_similarity()`](./std/graphs/Compute/cosine_similarity.md)
  - [`graphs.Compute.common_neighbor()`](./std/graphs/Compute/common_neighbor.md)
  - [`graphs.Compute.degree_centrality()`](./std/graphs/Compute/degree_centrality.md)
  - [`graphs.Compute.degree()`](./std/graphs/Compute/degree.md)
  - [`graphs.Compute.diameter_range()`](./std/graphs/Compute/diameter_range.md)
  - [`graphs.Compute.distance()`](./std/graphs/Compute/distance.md)
  - [`graphs.Compute.eigenvector_centrality()`](./std/graphs/Compute/eigenvector_centrality.md)
  - [`graphs.Compute.indegree()`](./std/graphs/Compute/indegree.md)
  - [`graphs.Compute.is_connected()`](./std/graphs/Compute/is_connected.md)
  - [`graphs.Compute.is_reachable()`](./std/graphs/Compute/is_reachable.md)
  - [`graphs.Compute.is_triangle()`](./std/graphs/Compute/is_triangle.md)
  - [`graphs.Compute.label_propagation()`](./std/graphs/Compute/label_propagation.md)
  - [`graphs.Compute.local_clustering_coefficient()`](./std/graphs/Compute/local_clustering_coefficient.md)
  - [`graphs.Compute.louvain()`](./std/graphs/Compute/louvain.md)
  - [`graphs.Compute.max_degree()`](./std/graphs/Compute/max_degree.md)
  - [`graphs.Compute.max_indegree()`](./std/graphs/Compute/max_indegree.md)
  - [`graphs.Compute.max_outdegree()`](./std/graphs/Compute/max_outdegree.md)
  - [`graphs.Compute.min_degree()`](./std/graphs/Compute/min_degree.md)
  - [`graphs.Compute.min_indegree()`](./std/graphs/Compute/min_indegree.md)
  - [`graphs.Compute.min_outdegree()`](./std/graphs/Compute/min_outdegree.md)
  - [`graphs.Compute.num_edges()`](./std/graphs/Compute/num_edges.md)
  - [`graphs.Compute.num_nodes()`](./std//graphs//Compute/num_nodes.md)
  - [`graphs.Compute.num_triangles()`](./std/graphs/Compute/num_triangles.md)
  - [`graphs.Compute.outdegree()`](./std/graphs/Compute/outdegree.md)
  - [`graphs.Compute.pagerank()`](./std/graphs/Compute/pagerank.md)
  - [`graphs.Compute.preferential_attachment()`](./std/graphs/Compute/preferential_attachment.md)
  - [`graphs.Compute.reachable_from()`](./std/graphs/Compute/reachable_from.md)
  - [`graphs.Compute.triangles()`](./std/graphs/Compute/triangles.md)
  - [`graphs.Compute.weakly_connected_component()`](./std/graphs/Compute/weakly_connected_component.md)
  - [`graphs.Compute.weighted_distance()`](./std/graphs/Compute/weighted_distance.md)
  - [`graphs.Compute.weighted_cosine_similarity()`](./std/graphs/Compute/weighted_cosine_similarity.md)
  - [`graphs.Compute.weighted_degree_centrality()`](./std/graphs/Compute/weighted_degree_centrality.md)
  - [`graphs.Compute.weighted_jaccard_similarity()`](./std/graphs/Compute/weighted_jaccard_similarity.md)
- [`graphs.Edge`](./std/graphs/Edge/README.md)
  - [`graphs.Edge.add()`](./std/graphs/Edge/add.md)
  - [`graphs.Edge.extend()`](./std/graphs/Edge/extend.md)
- [`graphs.EdgeInstance`](./std/graphs/EdgeInstance/README.md)
  - [`graphs.EdgeInstance.from_`](./std/graphs/EdgeInstance/from_.md)
  - [`graphs.EdgeInstance.to`](./std/graphs/EdgeInstance/to.md)
  - [`graphs.EdgeInstance.set()`](./std/graphs/EdgeInstance/set.md)
- [`graphs.Graph`](./std/graphs/Graph/README.md)
  - [`graphs.Graph.compute`](./std/graphs/Graph/compute.md)
  - [`graphs.Graph.Edge`](./std/graphs/Graph/Edge.md)
  - [`graphs.Graph.fetch()`](./std/graphs/Graph/fetch.md)
  - [`graphs.Graph.id`](./std/graphs/Graph/id.md)
  - [`graphs.Graph.model`](./std/graphs/Graph/model.md)
  - [`graphs.Graph.Node`](./std/graphs/Graph/Node.md)
  - [`graphs.Graph.undirected`](./std/graphs/Graph/undirected.md)
  - [`graphs.Graph.visualize()`](./std/graphs/Graph/visualize.md)

### [`relationalai.std.math`](./std/math/README.md)

- [`math.abs()`](./std/math/abs.md)
- [`math.acos()`](./std/math/acos.md)
- [`math.asin()`](./std/math/asin.md)
- [`math.atan()`](./std/math/atan.md)
- [`math.isclose()`](./std/math/isclose.md)
- [`math.ceil()`](./std/math/ceil.md)
- [`math.cbrt()`](./std/math/cbrt.md)
- [`math.cos()`](./std/math/cos.md)
- [`math.degrees()`](./std/math/degrees.md)
- [`math.floor()`](./std/math/floor.md)
- [`math.log()`](./std/math/log.md)
- [`math.radians()`](./std/math/radians.md)
- [`math.sign()`](./std/math/sign.md)
- [`math.sin()`](./std/math/sin.md)
- [`math.sqrt()`](./std/math/sqrt.md)
- [`math.tan()`](./std/math/tan.md)
- [`math.trunc_divide()`](./std/math/trunc_divide.md)

### [`relationalai.std.strings`](./std/strings/README.md)

- [`strings.concat()`](./std/strings/concat.md)
- [`strings.contains()`](./std/strings/contains.md)
- [`strings.ends_with()`](./std/strings/ends_with.md)
- [`strings.join()`](./std/strings/join.md)
- [`strings.length()`](./std/strings/length.md)
- [`strings.like()`](./std/strings/like.md)
- [`strings.lowercase()`](./std/strings/lowercase.md)
- [`strings.regex_compile()`](./std/strings/regex_compile.md)
- [`strings.regex_match()`](./std/strings/regex_match.md)
- [`strings.replace()`](./std/strings/replace.md)
- [`strings.split()`](./std/strings/split.md)
- [`strings.split_part()`](./std/strings/split_part.md)
- [`strings.uppercase()`](./std/strings/uppercase.md)

## [`relationalai.clients`](./clients/README.md)

- [`clients.snowflake`](./clients/snowflake/README.md)
  - [`clients.snowflake.PrimaryKey`](./clients/snowflake/PrimaryKey.md)
  - [`clients.snowflake.Snowflake`](./clients/snowflake/Snowflake.md)
  - [`clients.snowflake.SnowflakeTable`](./clients/snowflake/SnowflakeTable/README.md)
    - [`clients.snowflake.SnowflakeTable.describe()`](./clients/snowflake/SnowflakeTable/describe.md)
    - [`clients.snowflake.SnowflakeTable.fqname()`](./clients/snowflake/SnowflakeTable/fqname.md)
    - [`clients.snowflake.SnowflakeTable.namespace()`](./clients/snowflake/SnowflakeTable/namespace.md)
