irods_fsspec
Allows you to open files from iRODS servers using irods:// URLs in fsspec.
Usage
Implicit authentication
If you already have the iRODS iCommands, log in with iinit to store your username and password. Subsequent use of irods_fsspec will use those credentials automatically. (You may also set $IRODS_ENVIRONMENT_FILE in your shell to point to an irods_environment.json.)
import fsspec
import irods_fsspec
irods_fsspec.register() # register irods:// handler
# Write to iRODS path
f1 = fsspec.open('irods://data.cyverse.org/iplant/home/myuser/test.txt', 'wb')
with f1 as fh:
fh.write(b'test\n')
# Read from iRODS path
f2 = fsspec.open('irods://data.cyverse.org/iplant/home/myuser/test.txt', 'rb')
with f2 as fh:
assert fh.read() == b'test\n'
Explicit authentication
The user, zone, password, and port can all be included in the URL, bypassing the need for iinit / iCommands:
f3 = fsspec.open('irods://myuser+iplant:mypass@data.cyverse.org:1247/iplant/home/myuser/test.txt', 'rb')
with f3 as fh:
assert fh.read() == b'test\n'
The format looks like this:
irods://<username>+<zone>:<password>@<hostname>[:<port>]/<path to data object>
Note the + to separate user name from the zone name. irods_fsspec will use the default port if :<port> is omitted, but all other components are required.
Filesystem API usage
To use the IRODSFileSystem API, either import it yourself or use fsspec:
irodsfs = fsspec.filesystem('irods', user='myuser', zone='iplant', password='mypass', host='data.cyverse.org', port=1247)
irodsfs.mkdir('/iplant/home/myuser/_irods_fsspec_test/')
irodsfs.mv('/iplant/home/myuser/test.txt', '/iplant/home/myuser/_irods_fsspec_test/test2.txt')
f4 = irodsfs.open('/iplant/home/myuser/_irods_fsspec_test/test2.txt', 'rb')
with f4 as fh:
assert fh.read() == b'test\n'
Metadata
Release files for irods-fsspec 0.0.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| irods_fsspec-0.0.1.tar.gz | 19.8 kB | Without provenance | Details for irods_fsspec-0.0.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| irods_fsspec-0.0.1-py3-none-any.whl | Python 3 | none | any | Details for irods_fsspec-0.0.1-py3-none-any.whl |
Total release size: 38.4 kB
Release files / irods_fsspec-0.0.1.tar.gz
| Download URL | irods_fsspec-0.0.1.tar.gz |
|---|---|
| Size | 19.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
ffa2e16ec97e4958b4dab69b1ae8bf5942a341f4d7506f0e57cc13159559d87f
|
|
BLAKE2b-256 checksum How to use checksums |
808893f27f35bb1092ada788dc5effaa8edae47dc48621742ec0f41dc74c7521
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.7.1 importlib_metadata/4.8.2 pkginfo/1.8.2 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.7
|
Release files / irods_fsspec-0.0.1-py3-none-any.whl
| Download URL | irods_fsspec-0.0.1-py3-none-any.whl |
|---|---|
| Size | 18.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
33771b100df840f850471a5dc96a1cd1e7c26f94f235724953d66f5b8acf0265
|
|
BLAKE2b-256 checksum How to use checksums |
8eec24877b2093647d4270c78cdf7d3d3fa08453eb1aa293ac530c7672579b82
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.7.1 importlib_metadata/4.8.2 pkginfo/1.8.2 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.7
|
Security for irods-fsspec 0.0.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.