board

board(protocol, path='', versioned=True, cache=DEFAULT, allow_pickle_read=None, storage_options=None, board_factory=None)

General function for constructing a pins board.

Note that this is a lower-level function. For most use cases, use a more specific function like board_local, or board_s3.

Parameters

Name Type Description Default
protocol str File system protocol. E.g. file, s3, github, rsc (for Posit Connect). See fsspec.filesystem for more information. required
path str A base path the board should use. For example, the directory the board lives in, or the path to its S3 bucket. ''
versioned bool Whether or not pins should be versioned. True
cache type[DEFAULT] | None Whether to use a cache. By default, pins attempts to select the right cache directory, given your filesystem. If None is passed, then no cache will be used. You can set the cache using the PINS_CACHE_DIR environment variable. DEFAULT
allow_pickle_read Whether to allow reading pins that use the pickle protocol. Pickles are unsafe, and can execute arbitrary code. Only allow reading pickles if you trust the board to execute Python code on your computer. You can enable reading pickles by setting this to True, or by setting the environment variable PINS_ALLOW_PICKLE_READ. If both are set, this argument takes precedence. None
storage_options dict | None Additional options passed to the underlying filesystem created by fsspec.filesystem. None
board_factory Callable | type[BaseBoard] | None An optional board class to use as the constructor. None

Notes

Many fsspec implementations of filesystems cache the searching of files, which may cause you to not see pins saved by other people. Disable this on these file systems with storage_options = {"listings_expiry_time": 0} on S3, or {"cache_timeout": 0} on Google Cloud Storage.