Programmatic

Overview

You can interface with Redivis data programmatically using the Redivis R, Python, and Javascript client libraries, which allow external environments using these programming languages to connect to Redivis, facilitating integration with a wide variety of scientific libraries and paradigms.

These libraries leverage the underlying REST API, which can also be used if you want to connect to Redivis from another programming language.

You can also use R and Python to interface with data directly on Redivis, using the integrated Redivis notebooks. Importantly, the R or Python code that you write in a notebook is the same as what you would write elsewhere, allowing you to easily port your analyses between Redivis and other systems.

Note that, if data exports are restricted, you might first need to gain approval to export the table before exporting to an external environment.

Python

The Programmatic tab in the table export modal contains a code snippet to help you get started in working with Redivis data via Python. E.g.:

dataset = redivis.organization("Demo").dataset("iris_species")
table = dataset.table("Iris")

table.to_pandas_dataframe()
# 	Id	SepalLengthCm	SepalWidthCm	PetalLengthCm	PetalWidthCm	Species
# 0	33	5.2	        4.1	        1.5	        0.1	        Iris-setosa
# ...

# Other methods to read tabular data:
# table.to_arrow_batch_iterator()
# table.to_arrow_dataset()
# table.to_arrow_table()
# table.to_geopandas_dataframe()
# table.to_dask_dataframe()
# table.to_polars_lazyframe()

# Reading unstructured data from file index tables:
# table.list_files()
# table.download_files()

View the full redivis-python documentation here:

R

The Programmatic tab in the table export modal contains a code snippet to help you get started in working with Redivis data via R. E.g.:

dataset <- redivis::organization("Demo")$dataset("iris_species")
table <- dataset$table("Iris")

table$to_tibble()
# 	Id	SepalLengthCm	SepalWidthCm	PetalLengthCm	PetalWidthCm	Species
# 0	33	5.2	        4.1	        1.5	        0.1	        Iris-setosa
# ...

# Other methods to read tabular data:
# table$to_arrow_batch_reader()
# table$to_arrow_dataset()
# table$to_arrow_table()
# table$to_data_frame()
# table$to_data_table()
# table$to_sf_tibble()

# Reading unstructured data from file index tables:
# table$list_files()
# table$download_files()

View the full redivis-python documentation here:

REST API

The Redivis REST API provides an intuitive, resource-based approach to programmatically interfacing with Redivis. It opens up the ability to query, manipulate, and export data (and other Redivis resources) from within any programming language, supporting the workflows and tools that are familiar and best suited to your use case.

curl --header "Authorization: Bearer YOUR_ACCESS_TOKEN" \
    https://redivis.com/api/v1/organizations/demo/datasets?maxResults=10

View the full REST API documentation here:

Last updated