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 implementation's website

This project is not affiliated with RStudio.

Available functions

Make a pin on RStudio Connect.

pin_rsconnect(data, pin_name, pretty_pin_name, connect_server, api_key)

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, api_key):

Parameters:

  • url (str) content solo URL on Connect (NOT dashboard URL)
  • api_key (str): API key of a user on RStudio Connect

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.4.tar.gz (3.9 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.4-py3-none-any.whl (4.2 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: pins-0.0.4.tar.gz
  • Upload date:
  • Size: 3.9 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.4

File hashes

Hashes for pins-0.0.4.tar.gz
Algorithm Hash digest
SHA256 4a0fdfaae56fa27482f8b7fd87c2d066c2bd342159df35442c3ffc93a0341b63
MD5 19d1373009fee8fe756a670e54d58127
BLAKE2b-256 599907c4351c9de431b2de1bae7bd325fb74ff7be039046994dac6e31d0e25ac

See more details on using hashes here.

File details

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

File metadata

  • Download URL: pins-0.0.4-py3-none-any.whl
  • Upload date:
  • Size: 4.2 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.4

File hashes

Hashes for pins-0.0.4-py3-none-any.whl
Algorithm Hash digest
SHA256 0ee664a7e1aa330a0b12230ce8e76f9cd0d3c5a225426319a0fd573938ab93b4
MD5 b958e6d9f8f77943bcebb3cfd759f930
BLAKE2b-256 9981df09ec91a4922c1824684dff7802262174a17c82aa00e9573d932dc3637d

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