http上的路径和文件io
pfioh的Python项目详细描述
Overview
这个存储库提供了pfioh–一个server进程(可以把它看作是匿名的ftp,它本机理解递归路径),允许文件/路径推送/复制。
pfioh
pfioh是在不同位置之间推送/拉取文件和目录的服务。
Installation
安装相对简单,我们建议使用python虚拟环境或docker。
Python Virtual Environment
在ubuntu上,安装python virtual environment creator
sudo apt install virtualenv
然后,为您的虚拟环境创建一个目录,例如:
mkdir ~/python-envs
您可能需要将这两行代码添加到.bashrc文件中:
exportWORKON_HOME=~/python-envs source /usr/local/bin/virtualenvwrapper.sh
然后,您可以获得.bashrc源代码并创建一个新的python3虚拟环境:
source .bashrc mkvirtualenv --python=python3 python_env
激活或“输入”虚拟环境:
workon python_env
要停用虚拟环境:
deactivate
Using the ^{tt1}$ dock
不过,最简单的选择是使用fnndsc/pfiohdock。
docker pull fnndsc/pfioh
然后运行
docker run --name pfioh -v /home:/Users --rm \ fnndsc/pfioh \ --forever --httpResponse \ --storeBase=/tmp --createDirsAsNeeded
Usage
pfioh用法
有关pfioh的详细信息,请参见pfioh wiki page。
[--ip <IP>] The IP interface on which to listen. Defaults to current host IP. [--port <port>] The port on which to listen. Defaults to '5055'. [--forever] Start service and do not terminate. [--httpResponse] Send return strings as HTTP formatted replies with content-type html. [--storeBase <storagePath>] A file system location in the network space accessible to ``pfioh`` that is used to unpack received files and also store results of processing. [--createDirsAsNeeded] If specified, create dirs in the base storage as needed. [--enableTokenAuth] Enables token based authorization and can be configured to look for a .ini file or an openshift secret. [--tokenPath <tokenPath>] Specify the absolute path to the token in the file system. By default, this looks for the pfiohConfig.ini file in the current working directory. [--swift-storage] If specified, use Swift as object storage. [--test] Run internal tests. [-x|--desc] Provide an overview help page. [-y|--synopsis] Provide a synopsis help summary. [--version] Print internal version number and exit. [-v|--verbosity <level>] Set the verbosity level. "0" typically means no/minimal output. Allows for more fine tuned output control as opposed to '--quiet' that effectively silences everything.
EXAMPLES
以forever模式启动pfioh,可在本地主机上访问:
pfioh \\ --forever \\ --port 5055\\ --storeBase=/tmp \\ --httpResponse \\ --createDirsAsNeeded \\ --verbosity 1\\ --ip 127.0.0.1