Code Monkey home page Code Monkey logo

irods-python-icommands's Introduction

irods-python-icommands

This is a basic set of pure-Python iRODS clients.

It is a work in progress at the moment and the ".py" commands don't follow quite the same standards as the officially supported icommands.

In fact, it is possible this might move toward an irods CLI type of interface.

Motivation:

The aim is eventually that these commands could serve as a substitute for the icommands on platforms where their installation is infeasible (such as on Windows).

Initializing the client environment:

The following two commands can be used together to achieve what is normally done with iinit , ie. the creation of an environment file and a native authentication under the ~/.irods directory:

  • iHostinit.py
  • iPwinit.py

The i*.py commands have been tested manually on native (non-WSL) Windows 10 with the following python-irodsclient development branch and appear to work fine.

Prerequisites:

  • git (with which to clone this repository)
  • PRC installed
    • can install with pip install python-irodsclient
  • a running irods server as the target host/port/user/zone to be accessed. (Or ... use the first part of the demo below to download and run your own local one in docker.)

Demo (Linux):

  • If access to a running iRODS instance is unavailable, run one via docker:
    $ docker pull dwmoore/irods_pkg_postgres:latest
    $ docker run -it --name irods_test --hostname "$(hostname)" \
      -p 1247:1247 -p 20000-20199:20000-20199 \
      dwmoore/irods_pkg_postgres:latest
    $ docker exec irods_test /start_postgresql_and_irods.sh
    
  • Then download these commands to the host, and access iRODS via the Python client commands.
    $ git clone https://github.com/d-w-moore/irods-python-icommands
    $ cd irods-python-icommands
    $ ./iHostinit.py -h "$(hostname)" -z tempZone -u rods -p 1247 
    $ ./iPwinit.py
    irods password -> #### (silent entry)
    $ ./iLs.py
    C /tempZone/home/rods
    $ ./iMkdir.py /tempZone/home/rods/subcoll
    $ ./iLs.py -r /tempZone/home/rods
    C /tempZone/home/rods
    C /tempZone/home/rods/subcoll
    $ echo "Hello" > World
    $ ./iPut.py World /tempZone/home/rods/World.dat
    $ ./iGet.py World.dat
    $ diff World.dat World
    

irods-python-icommands's People

Contributors

d-w-moore avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.