Skip to main content

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 (eg. pandas DataFrame)
  • 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 panads
import pins

mydata = {'col1': [1, 2], 'col2': [3, 4]}
df = pd.DataFrame(data=mydata)

# pin the data to connect
pin = pins.pin_rsconnect(
    data = df, 
    pin_name = "my_pin_7788", 
    pretty_pin_name = "Python Pin", 
    connect_server = connect_server, 
    api_key = api_key
)

# retrieve the pinned data
pins.pin_get_rsconnect(pin['content_url'], api_key = api_key)

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.

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.3.tar.gz (3.1 kB view details)

Uploaded Source

Built Distribution

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

pins-0.0.3-py3-none-any.whl (4.0 kB view details)

Uploaded Python 3

File details

Details for the file pins-0.0.3.tar.gz.

File metadata

  • Download URL: pins-0.0.3.tar.gz
  • Upload date:
  • Size: 3.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/3.7.3 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.59.0 CPython/3.9.2

File hashes

Hashes for pins-0.0.3.tar.gz
Algorithm Hash digest
SHA256 74740275a8cb9dd047cbf5b0afbf6a3181260ea974f3f86add00ef8d7ab241cd
MD5 0722b7fd9c293baaab907a9d68439f58
BLAKE2b-256 55a5d8f58041b92f1fba96f665233a0887e1d0e7b78e6e26392697c86760191c

See more details on using hashes here.

File details

Details for the file pins-0.0.3-py3-none-any.whl.

File metadata

  • Download URL: pins-0.0.3-py3-none-any.whl
  • Upload date:
  • Size: 4.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/3.7.3 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.59.0 CPython/3.9.2

File hashes

Hashes for pins-0.0.3-py3-none-any.whl
Algorithm Hash digest
SHA256 f80958e67e62cc7c0b503771924c2389e261807a3b48c5f6dfaa9ffb620c0425
MD5 fb06880a97924c732f373a2670d0b77f
BLAKE2b-256 d2f6ef3a0dce41e3a0c34faebf716abbbbf99b0743b15fb7b8e0a4d00ad6de53

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 Sentry Error logging StatusPage Status page