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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4a0fdfaae56fa27482f8b7fd87c2d066c2bd342159df35442c3ffc93a0341b63
|
|
| MD5 |
19d1373009fee8fe756a670e54d58127
|
|
| BLAKE2b-256 |
599907c4351c9de431b2de1bae7bd325fb74ff7be039046994dac6e31d0e25ac
|
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0ee664a7e1aa330a0b12230ce8e76f9cd0d3c5a225426319a0fd573938ab93b4
|
|
| MD5 |
b958e6d9f8f77943bcebb3cfd759f930
|
|
| BLAKE2b-256 |
9981df09ec91a4922c1824684dff7802262174a17c82aa00e9573d932dc3637d
|