Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion docs/api/constructors.rst
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,6 @@ Board Constructors
~board_s3
~board_gcs
~board_azure
~board_rsconnect
~board_connect
~board_url
~board
4 changes: 3 additions & 1 deletion docs/api/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,10 @@ Boards abstract over different storage backends, making it easy to share data in
- Use an Azure storage container as a board
* - :func:`.board_folder`, :func:`.board_local`, :func:`.board_temp`
- Use a local folder as a board
* - :func:`.board_connect`
- Use Posit Connect as a board
* - :func:`.board_rsconnect`
- Use RStudio Connect as a board
- Alias for Posit Connect board (it was formerly called RStudio Connect)
* - :func:`.board_s3`
- Use an S3 bucket as a board
* - :func:`.board_gcs`
Expand Down
4 changes: 2 additions & 2 deletions docs/getting_started.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ Here are a few options:
board = board_local() # share data across R sessions on the same computer
board = board_folder("~/Dropbox") # share data with others using dropbox
board = board_folder("Z:\\my-team\pins") # share data using a shared network drive
board = board_rsconnect() # share data with RStudio Connect
board = board_connect() # share data with Posit Connect
```


Expand Down Expand Up @@ -88,7 +88,7 @@ If you find yourself routinely pinning data larger that this, you might need to

<!-- #region -->
```{note}
If you are using the RStudio Connect board (`board_rsconnect`), then you must specify your pin name as
If you are using the Posit Connect board (`board_connect`), then you must specify your pin name as
`<user_name>/<content_name>`. For example, `hadley/sales-report`.
```
<!-- #endregion -->
Expand Down
12 changes: 6 additions & 6 deletions docs/intro.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ kernelspec:
```

The pins package publishes data, models, and other Python objects, making it easy to share
You can pin objects to a variety of pin *boards*, including folders (to share on a networked drive or with services like DropBox), RStudio Connect, Amazon S3, Google Cloud Storage, and Azure Datalake.
You can pin objects to a variety of pin *boards*, including folders (to share on a networked drive or with services like DropBox), Posit Connect, Amazon S3, Google Cloud Storage, and Azure Datalake.
Pins can be automatically versioned, making it straightforward to track changes, re-run analyses on historical data, and undo mistakes.

You can use pins from R as well as Python. For example, you can use one language to read a pin created with the other. Learn more about [pins for R](https://pins.rstudio.com).
Expand Down Expand Up @@ -67,14 +67,14 @@ board.pin_read("mtcars")
```

A board on your computer is good place to start, but the real power of pins comes when you use a board that's shared with multiple people.
To get started, you can use `board_folder()` with a directory on a shared drive or in DropBox, or if you use [RStudio Connect](https://www.rstudio.com/products/connect/) you can use `board_rsconnect()`:
To get started, you can use `board_folder()` with a directory on a shared drive or in DropBox, or if you use [Posit Connect](https://www.posit.co/products/connect/) you can use `board_connect()`:

+++

```python
from pins import board_rsconnect
from pins import board_connect

board = board_rsconnect()
board = board_connect()

board.pin_write(tidy_sales_data, "hadley/sales-summary", type = "csv")
#> Writing pin:
Expand All @@ -89,13 +89,13 @@ Then, someone else (or an automated report) can read and use your pin:
+++

```python
board = board_rsconnect()
board = board_connect()
board.pin_read("hadley/sales-summary")
```

+++

You can easily control who gets to access the data using the RStudio Connect permissions pane.
You can easily control who gets to access the data using the Posit Connect permissions pane.

The pins package also includes boards that allow you to share data on services like
Amazon's S3 (`board_s3()`), Google Cloud Storage (`board_gcs()`), and Azure Datalake (`board_azure()`).
Expand Down
1 change: 1 addition & 0 deletions pins/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
board_github,
board_urls, # DEPRECATED
board_url,
board_connect,
board_rsconnect,
board_azure,
board_s3,
Expand Down
13 changes: 8 additions & 5 deletions pins/constructors.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,8 @@ def board_deparse(board: BaseBoard):

The example below deparses a board connected to RStudio Connect.

>>> board_deparse(board_rsconnect(server_url="http://example.com", api_key="xxx"))
"board_rsconnect(server_url='http://example.com')"
>>> board_deparse(board_connect(server_url="http://example.com", api_key="xxx"))
"board_connect(server_url='http://example.com')"

Note that the deparsing an RStudio Connect board does not keep the api_key,
which is sensitive information. In this case, you can set the CONNECT_API_KEY
Expand All @@ -55,7 +55,7 @@ def board_deparse(board: BaseBoard):

if prot == "rsc":
url = board.fs.api.server_url
return f"board_rsconnect(server_url={repr(url)}{allow_pickle})"
return f"board_connect(server_url={repr(url)}{allow_pickle})"
elif prot == "file":
return f"board_folder({repr(board.board)}{allow_pickle})"
elif prot == ["s3", "s3a"]:
Expand Down Expand Up @@ -353,7 +353,7 @@ def board_url(path: str, pin_paths: dict, cache=DEFAULT, allow_pickle_read=None)
)


def board_rsconnect(
def board_connect(
server_url=None, versioned=True, api_key=None, cache=DEFAULT, allow_pickle_read=None
):
"""Create a board to read and write pins from an RStudio Connect instance.
Expand All @@ -375,7 +375,7 @@ def board_rsconnect(
::

server_url = "https://connect.rstudioservices.com"
board = board_rsconnect(server_url)
board = board_connect(server_url)

In order to read a public pin, use board_manual with the public pin url.

Expand Down Expand Up @@ -406,6 +406,9 @@ def board_rsconnect(
)


board_rsconnect = board_connect


def board_s3(path, versioned=True, cache=DEFAULT, allow_pickle_read=None):
"""Create a board to read and write pins from an AWS S3 bucket folder.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ <h3>derek/test_rsc_pin</h3>
<h3>Code</h3>

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

<script type="text/javascript">
Expand Down
2 changes: 1 addition & 1 deletion setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ test =
pytest-dotenv
pytest-parallel
s3fs
adlfs
adlfs==2022.2.0
gcsfs
fastparquet
pyarrow
Expand Down