Skip to main content

Onedata REST-based filesystem for PyFilesystem

Project description

OnedataRESTFS

Build status Version

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


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.4rc2.tar.gz (11.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

fs.onedatarestfs-21.2.4rc2-py3-none-any.whl (11.7 kB view details)

Uploaded Python 3

File details

Details for the file fs.onedatarestfs-21.2.4rc2.tar.gz.

File metadata

  • Download URL: fs.onedatarestfs-21.2.4rc2.tar.gz
  • Upload date:
  • Size: 11.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.10.12

File hashes

Hashes for fs.onedatarestfs-21.2.4rc2.tar.gz
Algorithm Hash digest
SHA256 0e60d6777f934b1cdc572c40bb2cdeafc8506c8548cb4db212daaced431f6908
MD5 eac92952be3af7a6cf5ae6aa8b84762d
BLAKE2b-256 fb56e53c605ca987dc094a30a385ba4958f0b7a6d3272cc06d62663358d2bf10

See more details on using hashes here.

File details

Details for the file fs.onedatarestfs-21.2.4rc2-py3-none-any.whl.

File metadata

File hashes

Hashes for fs.onedatarestfs-21.2.4rc2-py3-none-any.whl
Algorithm Hash digest
SHA256 3df8cdec06d7254992d954d4c9ec029041163d51c2c65a57e48ed38808e12743
MD5 e5aa193aa4eb0476310267168dc577b5
BLAKE2b-256 0a20d0450fb55755adf9bcdddcf06995d994d93bede4f7b1e5802dfe01e739a3

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page