Skip to content

Commit b6049c8

Browse files
authored
Merge pull request #189 from rstudio/docs-posit-connect
Docs posit connect
2 parents 94973c5 + d230073 commit b6049c8

File tree

5 files changed

+29
-23
lines changed

5 files changed

+29
-23
lines changed

README.Rmd

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,13 @@ pd.set_option("display.notebook_repr_html", False)
1212
The pins package publishes data, models, and other Python objects, making it
1313
easy to share them across projects and with your colleagues. You can pin
1414
objects to a variety of pin *boards*, including folders (to share on a
15-
networked drive or with services like DropBox), RStudio Connect, and Amazon
16-
S3.
15+
networked drive or with services like DropBox), Posit Connect, Amazon
16+
S3, and Google Cloud Storage.
1717
Pins can be automatically versioned, making it straightforward to track changes,
1818
re-run analyses on historical data, and undo mistakes.
1919

20+
See the [documentation](https://rstudio.github.io/pins-python) for getting started.
21+
2022
## Installation
2123

2224
```shell
@@ -50,7 +52,7 @@ board.pin_write(mtcars.head(), "mtcars", type="csv")
5052

5153
Above, we saved the data as a CSV, but depending on
5254
what you’re saving and who else you want to read it, you might use the
53-
`type` argument to instead save it as a `joblib` or `arrow` file (NOTE: arrow is not yet supported).
55+
`type` argument to instead save it as a `joblib`, `parquet`, or `json` file.
5456

5557
You can later retrieve the pinned data with `.pin_read()`:
5658

@@ -61,7 +63,7 @@ board.pin_read("mtcars")
6163
A board on your computer is good place to start, but the real power of
6264
pins comes when you use a board that’s shared with multiple people. To
6365
get started, you can use `board_folder()` with a directory on a shared
64-
drive or in DropBox, or if you use [RStudio
66+
drive or in DropBox, or if you use [Posit
6567
Connect](https://www.rstudio.com/products/connect/) you can use
6668
`board_rsconnect()`:
6769

@@ -81,12 +83,12 @@ board = board_rsconnect()
8183
board.pin_read("hadley/sales-summary")
8284
```
8385

84-
You can easily control who gets to access the data using the RStudio
86+
You can easily control who gets to access the data using the Posit
8587
Connect permissions pane.
8688

8789
The pins package also includes boards that allow you to share data on
88-
services like Amazon’s S3 (`board_s3()`), with plans to support other backends--
89-
such as Azure's blob storage.
90+
services like Amazon’s S3 (`board_s3()`), Google Cloud Storage (`board_gcs()`),
91+
and Azure blob storage (`board_azure()`).
9092

9193
## Development
9294

README.md

Lines changed: 13 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,13 @@
55
The pins package publishes data, models, and other Python objects, making it
66
easy to share them across projects and with your colleagues. You can pin
77
objects to a variety of pin *boards*, including folders (to share on a
8-
networked drive or with services like DropBox), RStudio Connect, Amazon S3,
9-
and Google Cloud Storage.
8+
networked drive or with services like DropBox), Posit Connect, Amazon
9+
S3, and Google Cloud Storage.
1010
Pins can be automatically versioned, making it straightforward to track changes,
1111
re-run analyses on historical data, and undo mistakes.
1212

13+
See the [documentation](https://rstudio.github.io/pins-python) for getting started.
14+
1315
## Installation
1416

1517
```shell
@@ -43,19 +45,21 @@ arguments: an object, a name, and a pin type:
4345
board.pin_write(mtcars.head(), "mtcars", type="csv")
4446
```
4547

46-
Writing to pin 'mtcars'
48+
Writing pin:
49+
Name: 'mtcars'
50+
Version: 20230321T151326Z-120a5
4751

4852

4953

5054

5155

52-
Meta(title='mtcars: a pinned 5 x 11 DataFrame', description=None, created='20220526T165625Z', pin_hash='120a54f7e0818041', file='mtcars.csv', file_size=249, type='csv', api_version=1, version=Version(created=datetime.datetime(2022, 5, 26, 16, 56, 25, 738735), hash='120a54f7e0818041'), name='mtcars', user={})
56+
Meta(title='mtcars: a pinned 5 x 11 DataFrame', description=None, created='20230321T151326Z', pin_hash='120a54f7e0818041', file='mtcars.csv', file_size=249, type='csv', api_version=1, version=Version(created=datetime.datetime(2023, 3, 21, 15, 13, 26, 362951), hash='120a54f7e0818041'), tags=None, name='mtcars', user={}, local={})
5357

5458

5559

5660
Above, we saved the data as a CSV, but depending on
5761
what you’re saving and who else you want to read it, you might use the
58-
`type` argument to instead save it as a `joblib` or `arrow` file.
62+
`type` argument to instead save it as a `joblib`, `parquet`, or `json` file.
5963

6064
You can later retrieve the pinned data with `.pin_read()`:
6165

@@ -79,7 +83,7 @@ board.pin_read("mtcars")
7983
A board on your computer is good place to start, but the real power of
8084
pins comes when you use a board that’s shared with multiple people. To
8185
get started, you can use `board_folder()` with a directory on a shared
82-
drive or in DropBox, or if you use [RStudio
86+
drive or in DropBox, or if you use [Posit
8387
Connect](https://www.rstudio.com/products/connect/) you can use
8488
`board_rsconnect()`:
8589

@@ -99,12 +103,12 @@ board = board_rsconnect()
99103
board.pin_read("hadley/sales-summary")
100104
```
101105

102-
You can easily control who gets to access the data using the RStudio
106+
You can easily control who gets to access the data using the Posit
103107
Connect permissions pane.
104108

105109
The pins package also includes boards that allow you to share data on
106-
services like Amazon’s S3 (`board_s3()`), and Google Cloud Storage (`board_gcs`), with plans to support other backends--
107-
such as Azure's blob storage.
110+
services like Amazon’s S3 (`board_s3()`), Google Cloud Storage (`board_gcs()`),
111+
and Azure blob storage (`board_azure()`).
108112

109113
## Development
110114

pins/constructors.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -29,12 +29,12 @@ def board_deparse(board: BaseBoard):
2929
Examples
3030
--------
3131
32-
The example below deparses a board connected to RStudio Connect.
32+
The example below deparses a board connected to Posit Connect.
3333
3434
>>> board_deparse(board_connect(server_url="http://example.com", api_key="xxx"))
3535
"board_connect(server_url='http://example.com')"
3636
37-
Note that the deparsing an RStudio Connect board does not keep the api_key,
37+
Note that the deparsing a Posit Connect board does not keep the api_key,
3838
which is sensitive information. In this case, you can set the CONNECT_API_KEY
3939
environment variable to connect.
4040
@@ -92,7 +92,7 @@ def board(
9292
Parameters
9393
----------
9494
protocol:
95-
File system protocol. E.g. file, s3, github, rsc (for RStudio Connect).
95+
File system protocol. E.g. file, s3, github, rsc (for Posit Connect).
9696
See fsspec.filesystem for more information.
9797
path:
9898
A base path the board should use. For example, the directory the board lives in,
@@ -356,12 +356,12 @@ def board_url(path: str, pin_paths: dict, cache=DEFAULT, allow_pickle_read=None)
356356
def board_connect(
357357
server_url=None, versioned=True, api_key=None, cache=DEFAULT, allow_pickle_read=None
358358
):
359-
"""Create a board to read and write pins from an RStudio Connect instance.
359+
"""Create a board to read and write pins from an Posit Connect instance.
360360
361361
Parameters
362362
----------
363363
server_url:
364-
Url to the RStudio Connect server.
364+
Url to the Posit Connect server.
365365
api_key:
366366
API key for server. If not specified, pins will attempt to read it from
367367
CONNECT_API_KEY environment variable.

pins/rsconnect/html/index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ <h3>{{pin_name}}</h3>
4949
<section>
5050
<h3>Python Code</h3>
5151

52-
<pre id="pin-python" class="pin-code"><code class="python">from pins import board_rsconnect
52+
<pre id="pin-python" class="pin-code"><code class="python">from pins import board_connect
5353
board = {{board_deparse}}
5454
board.pin_read("{{pin_name}}")</code></pre>
5555

pins/tests/_snapshots/test_board_pin_write_rsc_index_html/index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ <h3>derek/test_rsc_pin</h3>
5858
<section>
5959
<h3>Python Code</h3>
6060

61-
<pre id="pin-python" class="pin-code"><code class="python">from pins import board_rsconnect
61+
<pre id="pin-python" class="pin-code"><code class="python">from pins import board_connect
6262
board = board_connect(server_url='http://localhost:3939')
6363
board.pin_read("derek/test_rsc_pin")</code></pre>
6464

0 commit comments

Comments
 (0)