iRODS HTTP API Python Wrapper
This is a Python wrapper for the iRODS HTTP API.
Documentation for the endpoint operations can be found here.
Install
This wrapper is available via pip:
pip install irods-http
Usage
To use the wrapper, follow the steps listed below.
import irods_http
# Placeholder values needed for irods_http.authenticate()
url_base = "http://<host>:<port>/irods-http-api/<version>"
username = "<username>"
password = "<password>"
# Create an IRODSHTTPSession to an iRODS HTTP API server
session = irods_http.authenticate(url_base, username, password)
# Use the session for all other operations
response = irods_http.collections.create(session, '/<zone_name>/home/<username>/new_collection')
# Check the resopnse for errors
if response['status_code'] != 200:
# Handle HTTP error.
if response['data']['irods_response']['status_code'] < 0:
# Handle iRODS error.
The response dict will have this format:
{
'status_code': <integer>,
'data': <dict>
}
where status_code is the HTTP status code from the response, and data is the result of the iRODS operation.
response['data'] will contain a dict named irods_response, which will contain the status_code returned by the iRODS Server as well as any other expected properties.
{
'irods_response': {
'status_code': <integer>
# Other properties vary between endpoints
}
}
When calling data_objects.read(), the response['data'] will contain the raw bytes instead of a dict.
More information regarding iRODS HTTP API response data is available here.
Metadata
Release files for irods-http 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| irods_http-0.1.0.tar.gz | 30.1 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| irods_http-0.1.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 49.3 kB
Release files / irods_http-0.1.0.tar.gz
| Download URL | irods_http-0.1.0.tar.gz |
|---|---|
| Size | 30.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
97f08f94dc9ec39cb1d30c69822143ee9d1da4798a4be231ee941e8675987920
|
|
BLAKE2b-256 checksum How to use checksums |
d854159988201823b7d2e36e71e527bdfa23d340bd134360516336e0bbbaaa71
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.13.5
|
Release files / irods_http-0.1.0-py3-none-any.whl
| Download URL | irods_http-0.1.0-py3-none-any.whl |
|---|---|
| Size | 19.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
c3db8a327c48e75b8ba5c1807146e6f0b7b2fc947854a07b8d1f5a71cabd2895
|
|
BLAKE2b-256 checksum How to use checksums |
8666cfc57c3650b185c26064dc8ec9cc96684cb97577a301ccafb750f2e5d150
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.13.5
|