Publish data sets, models, and other python objects, making it easy to share them across projects and with your colleagues.
Maintained. Last release 7 weeks ago, commits in 3 of the last 26 weeks. Weaker on commit activity and release cadence.
pip install pinspins
The pins package publishes data, models, and other Python objects, making it easy to share them across projects and with your colleagues. 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, and Google Cloud Storage. Pins can be automatically versioned, making it straightforward to track changes, re-run analyses on historical data, and undo mistakes.
See the documentation for getting started.
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.
Installation
You can install the released version of pins from PyPI:
python -m pip install pins
And the development version from GitHub with:
python -m pip install git+https://github.com/rstudio/pins-python
Usage
To use the pins package, you must first create a pin board. A good place
to start is board_folder(), which stores pins in a directory you
specify. Here I’ll use a special version of board_folder() called
board_temp() which creates a temporary board that’s automatically
deleted when your Python script or notebook session ends. This is great
for examples, but obviously you shouldn’t use it for real work!
import pins
from pins.data import mtcars
board = pins.board_temp()
You can “pin” (save) data to a board with the .pin_write() method. It
requires three arguments: an object, a name, and a pin type:
board.pin_write(mtcars.head(), "mtcars", type="csv")
