ibridges.session.Session
- class ibridges.session.Session(irods_env, password=None, irods_home=None)
Irods session authentication.
- __init__(irods_env, password=None, irods_home=None)
IRODS authentication with Python client.
- Parameters:
irods_env (dict) – Dictionary from irods_environment.json or file to read the dictionary from if irods_env is not supplied.
password (str) – Plain text password.
irods_home (
Optional[str]) – Override the home directory of irods. Otherwise attempt to retrive the value from the irods environment dictionary. If it is not there either, then use /{zone}/home/{username}.
- Raises:
FileNotFoundError: – If the irods_env parameter is interpreted as a file name and not found.
TypeError: – If the irods_env parameter is not a dict, str or Path.
LoginError: – If the connection to the iRODS server fails to establish.
Examples
>>> session = Session(Path.home() / ".irods" / "irods_environment.json", >>> password="your_password", irods_home="/zone/home/user") >>> session = Session(env_dictionary) # env_dictionary with connection info >>> with Session("irods_environment.json") as session: >>> # Do operations with the session here. >>> # The session will be automatically closed on finish/error.
Methods
__init__(irods_env[, password, irods_home])IRODS authentication with Python client.
Authenticate with an authentication file.
Authenticate with the iRODS server using a password.
close()Disconnect the irods session.
connect()Establish an iRODS session.
Query for user type and groups.
Check if the iRODS session is valid.
network_check(hostname, port)Check connectivity to an iRODS server.
Store the password in the iRODS authentication file in obfuscated form.
Attributes
Default resource name from iRODS environment.
Current working directory for irods.
Retrieve version of the iRODS server.