> For the complete documentation index, see [llms.txt](https://docs.redivis.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.redivis.com/api/client-libraries/redivis-python/reference/redivis.md).

# redivis

## *module* <mark style="color:purple;">Redivis</mark>

The redivis module, available via `import redivis`. Through this module and its methods, you can create, update, delete, query, and read from various resources on Redivis.

## Attributes

| **`__version__`** | The current version of this library |
| ----------------- | ----------------------------------- |

## Methods

<table data-header-hidden><thead><tr><th width="441"></th><th></th></tr></thead><tbody><tr><td><a href="/api/client-libraries/redivis-python/reference/redivis/redivis.current_notebook.md"><strong><code>redivis.current_notebook</code></strong></a>()</td><td>Construct a reference to the current notebook. Can only be called within a Redivis notebook.</td></tr><tr><td><a href="/api/client-libraries/redivis-python/reference/redivis/redivis.current_user.md"><strong><code>redivis.current_user</code></strong></a>()</td><td>Construct a reference to the currently authenticated user.</td></tr><tr><td><a href="/api/client-libraries/redivis-python/reference/redivis/redivis.current_notebook.md"><strong><code>redivis.current_workflow</code></strong></a>()</td><td>Construct a reference to the current workflow. Can only be called within a Redivis notebook, or if a <a href="/api/client-libraries/redivis-python/reference.md#environment-variables">default workflow is set</a>.</td></tr><tr><td><a href="/api/client-libraries/redivis-python/reference/redivis/redivis.current_notebook.md"><strong><code>redivis.datasource</code></strong></a>(source)</td><td>Construct a new <a href="/api/client-libraries/redivis-python/reference/datasource.md">Datasource</a> instance. Can only be called if a <a href="/api/client-libraries/redivis-python/reference.md#environment-variables">default workflow is set</a>. Otherwise, use the <a href="/api/client-libraries/redivis-python/reference/workflow/workflow.datasource.md">workflow.datasource()</a> constructor.</td></tr><tr><td><a href="/api/client-libraries/redivis-python/reference/redivis/redivis.make_api_request.md"><strong><code>redivis.make_api_request</code></strong></a>(*, [method, path, ...])</td><td>Call the Redivis API directly (for advanced use cases).</td></tr><tr><td><a href="/api/client-libraries/redivis-python/reference/redivis/redivis.notebook.md"><strong><code>redivis.notebook</code></strong></a>(name)</td><td>Construct a new <a href="/api/client-libraries/redivis-python/reference/notebook.md">Notebook</a> instance.</td></tr><tr><td><a href="/api/client-libraries/redivis-python/reference/redivis/redivis.organization.md"><strong><code>redivis.organization</code></strong></a>(name)</td><td>Construct a new <a href="/api/client-libraries/redivis-python/reference/organization.md">Organization</a> instance.</td></tr><tr><td><a href="/api/client-libraries/redivis-python/reference/redivis/redivis.parameter.md"><strong><code>redivis.parameter</code></strong></a>(name)</td><td>Construct a new <a href="/api/client-libraries/redivis-python/reference/parameter.md">Parameter</a> instance</td></tr><tr><td><a href="/api/client-libraries/redivis-python/reference/redivis/redivis.query.md"><strong><code>redivis.query</code></strong></a>(query)</td><td>Execute a SQL query, returning a <a href="/api/client-libraries/redivis-python/reference/query.md">Query</a> instance.</td></tr><tr><td><a href="/api/client-libraries/redivis-python/reference/redivis/redivis.table.md"><strong><code>redivis.table</code></strong></a>(name)</td><td>Construct a new <a href="/api/client-libraries/redivis-python/reference/table.md">Table</a> instance.</td></tr><tr><td><a href="/api/client-libraries/redivis-python/reference/redivis/redivis.transform.md"><strong><code>redivis.transform</code></strong></a>(name)</td><td>Construct a new <a href="/api/client-libraries/redivis-python/reference/transform.md">Transform</a> instance.</td></tr><tr><td><a href="/api/client-libraries/redivis-python/reference/redivis/redivis.user.md"><strong><code>redivis.user</code></strong></a>(name)</td><td>Construct a new <a href="/api/client-libraries/redivis-python/reference/user.md">User</a> instance.</td></tr></tbody></table>

## Exceptions

All exceptions raised by Redivis will be of class `redivis.exceptions.RedivisError` . Subclasses of RedivisError can be used to handle errors around specific events. See [redivis.exceptions](/api/client-libraries/redivis-python/reference/redivis/redivis.exceptions.md) for full details.

## Examples

```python
import redivis

organization = redivis.organization("Demo")
# organization.list_datasets(), organization.dataset("Iris species"), etc...

dataset = organization.dataset("iris_species")
table = dataset.table("iris")  
# table.to_pandas_dataframe(), etc...
# In a notebook, can do redivis.table("_source_") to reference the source table

query = redivis.query("""
    SELECT * 
    FROM demo.iris_species.iris 
    WHERE SepalLengthCm > 5
""")
# query.to_pandas_dataframe(), etc...
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.redivis.com/api/client-libraries/redivis-python/reference/redivis.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
