Name | pins JSON |
Version |
0.8.6
JSON |
| download |
home_page | https://github.com/rstudio/pins-python |
Summary | Publish data sets, models, and other python objects, making it easy to share them across projects and with your colleagues. |
upload_time | 2024-05-03 20:53:57 |
maintainer | None |
docs_url | None |
author | Isabel Zimmerman |
requires_python | >=3.8 |
license | MIT |
keywords |
data
tidyverse
|
VCS |
|
bugtrack_url |
|
requirements |
No requirements were recorded.
|
Travis-CI |
No Travis.
|
coveralls test coverage |
No coveralls.
|
# pins
<a href="https://rstudio.github.io/pins-python/"><img src="docs/logo.png" align="right" height="138" /></a>
![PyPI - Version](https://img.shields.io/pypi/v/pins.svg) ![PyPI - Python Version](https://img.shields.io/pypi/pyversions/pins)
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](https://rstudio.github.io/pins-python) 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](https://pins.rstudio.com).
## Installation
You can install the released version of pins from
[PyPI](https://pypi.org/project/pins/):
``` shell
python -m pip install pins
```
And the development version from
[GitHub](https://github.com/rstudio/pins-python) with:
``` shell
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!
``` python
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:
``` python
board.pin_write(mtcars.head(), "mtcars", type="csv")
```
Writing pin:
Name: 'mtcars'
Version: 20230523T115348Z-120a5
Meta(title='mtcars: a pinned 5 x 11 DataFrame', description=None, created='20230523T115348Z', pin_hash='120a54f7e0818041', file='mtcars.csv', file_size=249, type='csv', api_version=1, version=Version(created=datetime.datetime(2023, 5, 23, 11, 53, 48, 555797), hash='120a54f7e0818041'), tags=None, name='mtcars', user={}, local={})
Above, we saved the data as a CSV, but depending on what you’re saving
and who else you want to read it, you might use the `type` argument to
instead save it as a `joblib`, `parquet`, or `json` file.
You can later retrieve the pinned data with `.pin_read()`:
``` python
board.pin_read("mtcars")
```
mpg cyl disp hp drat wt qsec vs am gear carb
0 21.0 6 160.0 110 3.90 2.620 16.46 0 1 4 4
1 21.0 6 160.0 110 3.90 2.875 17.02 0 1 4 4
2 22.8 4 108.0 93 3.85 2.320 18.61 1 1 4 1
3 21.4 6 258.0 110 3.08 3.215 19.44 1 0 3 1
4 18.7 8 360.0 175 3.15 3.440 17.02 0 0 3 2
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 [Posit
Connect](https://posit.co/products/enterprise/connect/) you can use
`board_connect()`:
``` python
# Note that this uses one approach to connecting,
# the environment variables CONNECT_SERVER and CONNECT_API_KEY
board = pins.board_connect()
board.pin_write(tidy_sales_data, "hadley/sales-summary", type="csv")
```
Then, someone else (or an automated report) can read and use your pin:
``` python
board = board_connect()
board.pin_read("hadley/sales-summary")
```
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 blob storage (`board_azure()`).
## Contributing
- This project is released with a [Contributor Code of
Conduct](https://www.contributor-covenant.org/version/2/1/CODE_OF_CONDUCT.html).
By contributing to this project, you agree to abide by its terms.
- If you think you have encountered a bug, please [submit an
issue](https://github.com/rstudio/pins-python/issues).
Raw data
{
"_id": null,
"home_page": "https://github.com/rstudio/pins-python",
"name": "pins",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.8",
"maintainer_email": null,
"keywords": "data, tidyverse",
"author": "Isabel Zimmerman",
"author_email": "isabel.zimmerman@posit.co",
"download_url": "https://files.pythonhosted.org/packages/1f/d1/4114c97aef3c620cfb632860bedf2ef07ad2987083319ae4d746e2caa4e0/pins-0.8.6.tar.gz",
"platform": null,
"description": "# pins\n<a href=\"https://rstudio.github.io/pins-python/\"><img src=\"docs/logo.png\" align=\"right\" height=\"138\" /></a>\n\n![PyPI - Version](https://img.shields.io/pypi/v/pins.svg) ![PyPI - Python Version](https://img.shields.io/pypi/pyversions/pins)\n\n\n\nThe pins package publishes data, models, and other Python objects,\nmaking it easy to share them across projects and with your colleagues.\nYou can pin objects to a variety of pin *boards*, including folders (to\nshare on a networked drive or with services like DropBox), Posit\nConnect, Amazon S3, and Google Cloud Storage. Pins can be automatically\nversioned, making it straightforward to track changes, re-run analyses\non historical data, and undo mistakes.\n\nSee the [documentation](https://rstudio.github.io/pins-python) for\ngetting started.\n\nYou can use pins from R as well as Python. For example, you can use one\nlanguage to read a pin created with the other. Learn more about [pins\nfor R](https://pins.rstudio.com).\n\n## Installation\n\nYou can install the released version of pins from\n[PyPI](https://pypi.org/project/pins/):\n\n``` shell\npython -m pip install pins\n```\n\nAnd the development version from\n[GitHub](https://github.com/rstudio/pins-python) with:\n\n``` shell\npython -m pip install git+https://github.com/rstudio/pins-python\n```\n\n## Usage\n\nTo use the pins package, you must first create a pin board. A good place\nto start is `board_folder()`, which stores pins in a directory you\nspecify. Here I\u2019ll use a special version of `board_folder()` called\n`board_temp()` which creates a temporary board that\u2019s automatically\ndeleted when your Python script or notebook session ends. This is great\nfor examples, but obviously you shouldn\u2019t use it for real work!\n\n``` python\nimport pins\nfrom pins.data import mtcars\n\nboard = pins.board_temp()\n```\n\nYou can \u201cpin\u201d (save) data to a board with the `.pin_write()` method. It\nrequires three arguments: an object, a name, and a pin type:\n\n``` python\nboard.pin_write(mtcars.head(), \"mtcars\", type=\"csv\")\n```\n\n Writing pin:\n Name: 'mtcars'\n Version: 20230523T115348Z-120a5\n\n Meta(title='mtcars: a pinned 5 x 11 DataFrame', description=None, created='20230523T115348Z', pin_hash='120a54f7e0818041', file='mtcars.csv', file_size=249, type='csv', api_version=1, version=Version(created=datetime.datetime(2023, 5, 23, 11, 53, 48, 555797), hash='120a54f7e0818041'), tags=None, name='mtcars', user={}, local={})\n\nAbove, we saved the data as a CSV, but depending on what you\u2019re saving\nand who else you want to read it, you might use the `type` argument to\ninstead save it as a `joblib`, `parquet`, or `json` file.\n\nYou can later retrieve the pinned data with `.pin_read()`:\n\n``` python\nboard.pin_read(\"mtcars\")\n```\n\n mpg cyl disp hp drat wt qsec vs am gear carb\n 0 21.0 6 160.0 110 3.90 2.620 16.46 0 1 4 4\n 1 21.0 6 160.0 110 3.90 2.875 17.02 0 1 4 4\n 2 22.8 4 108.0 93 3.85 2.320 18.61 1 1 4 1\n 3 21.4 6 258.0 110 3.08 3.215 19.44 1 0 3 1\n 4 18.7 8 360.0 175 3.15 3.440 17.02 0 0 3 2\n\nA board on your computer is good place to start, but the real power of\npins comes when you use a board that\u2019s shared with multiple people. To\nget started, you can use `board_folder()` with a directory on a shared\ndrive or in DropBox, or if you use [Posit\nConnect](https://posit.co/products/enterprise/connect/) you can use\n`board_connect()`:\n\n``` python\n# Note that this uses one approach to connecting,\n# the environment variables CONNECT_SERVER and CONNECT_API_KEY\n\nboard = pins.board_connect()\nboard.pin_write(tidy_sales_data, \"hadley/sales-summary\", type=\"csv\")\n```\n\nThen, someone else (or an automated report) can read and use your pin:\n\n``` python\nboard = board_connect()\nboard.pin_read(\"hadley/sales-summary\")\n```\n\nYou can easily control who gets to access the data using the Posit\nConnect permissions pane.\n\nThe pins package also includes boards that allow you to share data on\nservices like Amazon\u2019s S3 (`board_s3()`), Google Cloud Storage\n(`board_gcs()`), and Azure blob storage (`board_azure()`).\n\n## Contributing\n\n- This project is released with a [Contributor Code of\n Conduct](https://www.contributor-covenant.org/version/2/1/CODE_OF_CONDUCT.html).\n By contributing to this project, you agree to abide by its terms.\n\n- If you think you have encountered a bug, please [submit an\n issue](https://github.com/rstudio/pins-python/issues).\n",
"bugtrack_url": null,
"license": "MIT",
"summary": "Publish data sets, models, and other python objects, making it easy to share them across projects and with your colleagues.",
"version": "0.8.6",
"project_urls": {
"Documentation": "https://rstudio.github.io/pins-python",
"Homepage": "https://github.com/rstudio/pins-python"
},
"split_keywords": [
"data",
" tidyverse"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "ffaa780696e3252b1ec3e9a29ee8f9419167da0b0fd32f3f68293e0f3f55f7b0",
"md5": "1d94a60f56dadb1ebe382c3d767240fa",
"sha256": "6ef17c0b617f93d7a4ab3ecb0e9d2ccc0fa9f1a7e26e8a2be3f43f2778567c9a"
},
"downloads": -1,
"filename": "pins-0.8.6-py2.py3-none-any.whl",
"has_sig": false,
"md5_digest": "1d94a60f56dadb1ebe382c3d767240fa",
"packagetype": "bdist_wheel",
"python_version": "py2.py3",
"requires_python": ">=3.8",
"size": 114209,
"upload_time": "2024-05-03T20:53:55",
"upload_time_iso_8601": "2024-05-03T20:53:55.747752Z",
"url": "https://files.pythonhosted.org/packages/ff/aa/780696e3252b1ec3e9a29ee8f9419167da0b0fd32f3f68293e0f3f55f7b0/pins-0.8.6-py2.py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "1fd14114c97aef3c620cfb632860bedf2ef07ad2987083319ae4d746e2caa4e0",
"md5": "12daa35d197e09250d293bd6d5884b1b",
"sha256": "49ba7b7bde43ad384b31bab58687ccf2d27d4aca434824c7696bb2d6ca3a398b"
},
"downloads": -1,
"filename": "pins-0.8.6.tar.gz",
"has_sig": false,
"md5_digest": "12daa35d197e09250d293bd6d5884b1b",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.8",
"size": 111873,
"upload_time": "2024-05-03T20:53:57",
"upload_time_iso_8601": "2024-05-03T20:53:57.483127Z",
"url": "https://files.pythonhosted.org/packages/1f/d1/4114c97aef3c620cfb632860bedf2ef07ad2987083319ae4d746e2caa4e0/pins-0.8.6.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-05-03 20:53:57",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "rstudio",
"github_project": "pins-python",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"lcname": "pins"
}