Skip to main content

Package to interact with RichView API.

Project description

RichView Python SDK

This Python SDK allows you to interact with the RichView API to manage your reports. You can authenticate, retrieve, duplicate, update, and delete reports. You can also manage the charts within the reports.

Installation

To install the SDK, you can use pip:

pip install richviewsdk

Usage

Here is a typical use case:

# Import necessary libraries
import pandas as pd
import numpy as np
from richviewsdk import RichViewSession, ParagraphBlock

# Step 1: We authenticate using our PW and Password
with open('pws.txt') as f:
    email, password = f.read().split(',')
session = RichViewSession.authenticate_with_password(email, password)

# Step 2: Lets retrieve all the RichView reports in our account
reports = session.get_reports()

# Step 3: Lets choose the report named GummiesJune23 of the reports and retrieves it
old_report = next(report for report in reports if report.title == 'GummiesJune23')

# Step 4: Lets duplicate the report and renames it GummiesJuly23
report = old_report.duplicate()
report = report.set_title('GummiesJuly23')

# Step 5: Lets query the report for all the charts
charts = report.get_charts()

# Step 6: Lets  now get the chart we want to update by it's ID
chart_id = [chart.block_id for chart in charts if chart.title == 'Gummy Bear Price Index'][0]
chart = report.get_chart(chart_id)

# Step 7: Lets retrieve the data of the chart to see how it's structured
old_data = chart.get_data()

# Step 8: Lets generate a fresh of data for the chart
# This is a placeholder, replace with actual data generation code
new_data = old_data.copy()  # replace with actual data generation code

# Step 9: Lets update the data of the chart and changes the chart type
all_data = pd.concat([old_data, new_data])
all_data = all_data.rename(
    columns={'Gummy Bear Price Index | Line': 'Gummy Bear Price Index | Area'})
chart = chart.set_data(all_data)

# Step 10: Lets update the title of the chart
chart = chart.set_title('Gummy Bear Price Index July Update')

# Step 11: Lets add a paragraph of the text
paragraph = ParagraphBlock(report.report_id, 'I can add some autogenerated text', session)
report.add_block(paragraph)

Documentation

For more detailed documentation, please refer to the official RichView API documentation.

Support

If you encounter any issues or have any questions, please contact our support team at support@therichview.com

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

richviewsdk-1.0.5.tar.gz (9.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

richviewsdk-1.0.5-py3-none-any.whl (8.0 kB view details)

Uploaded Python 3

File details

Details for the file richviewsdk-1.0.5.tar.gz.

File metadata

  • Download URL: richviewsdk-1.0.5.tar.gz
  • Upload date:
  • Size: 9.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.4

File hashes

Hashes for richviewsdk-1.0.5.tar.gz
Algorithm Hash digest
SHA256 3dc22309dd4419240356b73795263a566a25d19059dfc3a7a2ddb88014949a96
MD5 fc92ad5df2c27f769fd852835f169f57
BLAKE2b-256 5f4d5e4e8a49825ca7b2038c6acd44c952205f2e75a4c8cef3efe8dab27b0002

See more details on using hashes here.

File details

Details for the file richviewsdk-1.0.5-py3-none-any.whl.

File metadata

  • Download URL: richviewsdk-1.0.5-py3-none-any.whl
  • Upload date:
  • Size: 8.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.4

File hashes

Hashes for richviewsdk-1.0.5-py3-none-any.whl
Algorithm Hash digest
SHA256 ad050618e7c52cbbf539a428ba9752a673966d869b681f9fbbc16f085808f1e0
MD5 b9ae6b2ba5bc85c3700112723d4457c5
BLAKE2b-256 7a9e2cc5e66dc846fce02e4c1035adac89bebd341e6bb0dc70d1058b91463ab0

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page