Skip to main content

A simple python implementation of RStudio's pins package to work with RStudio Connect

Project description

pins

A simple package to pin and retrieve pinned data from RStudio Connect.

Read more about pins on the offical R implementations's website

This project is not affiliated with RStudio.

Available functions

Make a pin on RStudio Connect.

pin_rsconnect()

Parameters:

  • data: any object that has a to_json method
  • pin_name (str): name of pin, only alphanumeric and underscores
  • pretty_pin_name (str): display name of pin
  • connect_server (str): RStudio Connect server address e.g. https://connect.example.com/
  • api_key (str): API key of a user on RStudio Connect

Returns:

  • Url of content

Get data from a python pin on RStudio Connect

pin_get_rsconnect(url):

Parameters:

  • url (str) content solo URL on Connect (NOT dashboard URL)

Returns:

  • JSON version of pin

Try it out

import pins
pin = pins.pin_rsconnect(
    data = df, 
    pin_name = "my_pin_7788", 
    pretty_pin_name = "Python Pin", 
    connect_server = connect_server, 
    api_key = api_key
)
pins.pin_get_rsconnect(pin['content_url'])

License

This package is released under an MIT license and was created by Alex Gold and Mark Sellors.

"RStudio" and "RStudio Connect" are trademarks of RStudio, PBC.

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

pins-0.0.2.tar.gz (2.9 kB view hashes)

Uploaded Source

Built Distribution

pins-0.0.2-py3-none-any.whl (3.9 kB view hashes)

Uploaded Python 3

Supported by

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