Onedata REST-based filesystem for PyFilesystem
Project description
OnedataRESTFS
OnedataRESTFS is a PyFilesystem interface to Onedata virtual file system based on Onedata REST API.
As a PyFilesystem concrete class, OnedataRESTFS allows you to work with Onedata in the same way as any other supported filesystem.
Installing
You can install OnedataRESTFS from pip as follows:
pip install onedatarestfs
Opening a OnedataRESTFS
Open an OnedataRESTFS by explicitly using the constructor:
from fs.onedatarestfs import OnedataRESTFS
onedata_onezone_host = "..."
onedata_access_token = "..."
odfs = OnedataRESTFS(onedata_onezone_host, onedata_access_token)
Or with a FS URL:
from fs import open_fs
odfs = open_fs('onedatarestfs://HOST?token=...')
Optionally, OnedataRESTFS
constructs accepts a list of preferred Oneprovider
hosts, which should be selected if they support a specific Onedata space, e.g.:
from fs.onedatarestfs import OnedataRESTFS
onedata_onezone_host = "..."
onedata_access_token = "..."
odfs = OnedataRESTFS(onedata_onezone_host, onedata_access_token,
['krakow.onedata.org'])
Building and running tests
virtualenv -p /usr/bin/python3 venv
. venv/bin/activate
# Install tox
pip install coverage tox
# Run flake8 check
tox -c tox.ini -e flake8
# Run yapf check
tox -c tox.ini -e yapf
# Run mypy typing check
tox -c tox.ini -e mypy
# Run PyFilesystem test suite
tox -c tox.ini -e fstest
Running tests automatically
make submodules
virtualenv -p /usr/bin/python3 venv
. venv/bin/activate
./ct_run.py --verbose --image onedata/pybuilder:v2 --onenv-config tests/test_env_config.yaml --no-clean -s --suite flake8 --suite yapf --suite mypy --suite tests
Documentation
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
fs.onedatarestfs-21.2.4rc1.tar.gz
(11.7 kB
view hashes)
Built Distribution
Close
Hashes for fs.onedatarestfs-21.2.4rc1.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4912a307bbab66a86c6d61f6a64709f9cb0471dcaad19c36a7664db0654458bc |
|
MD5 | 527d1b64636d893102138ce860a5f86d |
|
BLAKE2b-256 | 968309fb069089ac44624ba4c36537793df4becfbb017b6824a188ce804253b4 |
Close
Hashes for fs.onedatarestfs-21.2.4rc1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0c7552c0febcc5ef0ea8a24db2d6d42914d57b1f80f3dd092682ec0a974b731e |
|
MD5 | c0ff9e616d66d8231bc22363581e2967 |
|
BLAKE2b-256 | 8b6077657901cccafda5bca7b2994698d040c7f289c0fff19fe32827dd6a5ed9 |