Skip to main content

(Python) Path-File URL comms

Project description

https://badge.fury.io/py/pfurl.svg https://travis-ci.org/FNNDSC/pfurl.svg?branch=master https://img.shields.io/badge/python-3.5%2B-blue.svg

Overview

This repository provides a curl-like client tool that is also able to perform simple file/directory functions (such as zip/unzip) suitable for remote http transmission:

  • pfurl: a tool to transfer data using HTTP (similar to curl);

pfurl

A client application called pfurl is provided that can be used to speak to both pman and pfioh.

Installation

Installation is relatively straightforward, and we recommend using either python virtual environments or docker.

Python Virtual Environment

On Ubuntu, install the Python virtual environment creator

sudo apt install virtualenv

Then, create a directory for your virtual environments e.g.:

mkdir ~/python-envs

You might want to add to your .bashrc file these two lines:

export WORKON_HOME=~/python-envs
source /usr/local/bin/virtualenvwrapper.sh

Then you can source your .bashrc and create a new Python3 virtual environment:

source .bashrc
mkvirtualenv --python=python3 python_env

To activate or “enter” the virtual env:

workon python_env

To deactivate virtual env:

deactivate

Using the fnndsc/ubuntu-python3 dock

We provide a slim docker image with python3 based off Ubuntu. If you want to play inside this dock and install pman manually, do

docker pull fnndsc/ubuntu-python3

This docker has an entry point python3. To enter the dock at a different entry and install your own stuff:

docker run -ti --entrypoint /bin/bash fnndsc/ubuntu-python3

Now, install pman and friends using pip

apt update && \
apt install -y libssl-dev libcurl4-openssl-dev librtmp-dev && \
pip install pfurl

If you do the above, remember to commit your changes to the docker image otherwise they’ll be lost when you remove the dock instance!

 docker commit <container-ID> local/ubuntu-python3-pman

where ``<container-ID>`` is the ID of the above container.

Using the fnndsc/pman dock

The easiest option however, is to just use the fnndsc/pman dock.

docker pull fnndsc/pfurl

and then run

docker run --name pfurl fnndsc/pfurl --VERB POST --raw --http localhost:5055/api/v1/cmd --httpResponseBodyParse --msg '{}'

where the msg contains JSON syntax instructions of what to perform.

Usage

For usage of pfurl, consult the relevant wiki pages.

pfurl usage

For pfurl detailed information, see the pfurl wiki page.

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

pfurl-1.2.4.tar.gz (22.1 kB view details)

Uploaded Source

File details

Details for the file pfurl-1.2.4.tar.gz.

File metadata

  • Download URL: pfurl-1.2.4.tar.gz
  • Upload date:
  • Size: 22.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for pfurl-1.2.4.tar.gz
Algorithm Hash digest
SHA256 c074cfb62b3e8f0804235d9a158ebc669332755d1945013db9b35feb53802d40
MD5 4bf39b5e3ea0b4ef2d651f2000862467
BLAKE2b-256 11699d8e44be874bc82c5bed41f459d1ff951af8fbd6c27342d2c430c5e7886b

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