Getting started

Installation

The easiest way to get started with the redivis-python client library is via a Redivis notebook, which comes with the latest version of this library pre-installed. Additionally, authentication is automatically handled within the Redivis notebook environment.

Consult the Python notebooks documentation for examples of common workflows when reading data from Redivis.

If you'd like to use the client in another environment, you can install the redivis library from PyPI. Use pip, or your python package manager of choice, to install:

pip install --upgrade redivis

Authentication

If you are using this library within a Redivis notebook, you'll automatically be authenticated. You can ignore this section.

In order to authenticate with your Redivis account, you must first generate an API Token.

This API token must then be set as the REDIVIS_API_TOKEN environment variable before running your script. You can set the variable for your current session by running the following in your terminal:

export REDIVIS_API_TOKEN=YOUR_TOKEN

Example usage

import redivis

organization = redivis.organization("demo")
dataset = organization.dataset("cms_2014_medicare_data")
table = dataset.table("home_health_agencies")

df = table.to_pandas_dataframe()

When referencing datasets, projects, and tables on Redivis, you should be familiar with the resource reference syntax.

Learn more

pageReferencepageExamples

Last updated