用于pip/easy_安装的最小pypi服务器。
pypiserver的Python项目详细描述
pypi server-用于pip的最小pypi服务器/easy_安装
<表> < COL/> < COL/> <正文> 版本:1.3.0 日期:2019-05-05 来源:https://github.com/pypiserver/pypiserver" rel="nofollow">https://github.com/pypiserver/pypiserver pypi: https://pypi.org/project/pypiserver/ 特拉维斯: https://travis ci.org/pypiserver/pypiserver 维护人员:Kostis Anagnostopoulos<; ankostis @ gmail com >;, matthew planchard<; mplanchard @ gmail com >; 许可证:zlib/libpng+mit <表>pypi server 是与 pip 或 easy\u install 兼容的最小服务器。 它基于 瓶子 并提供来自常规目录的包裹。 可以上传轮子、bdists、eggs和附带的pgp签名 使用 pip , setuptools , tween , pypi uploader ,或者简单地复制 使用 scp
目录
- 安装最新版本
- 将其作为独立脚本安装
- 在heroku/dotcloud上运行
- 管理包目录
- 提供数千个包裹
- 管理自动启动
- 作为a systemd 服务运行
- 通过主管启动
快速启动:安装和使用
pypiserver >;1.2.x 与python 2.7 和 3.4+ 或 pypypy 一起工作。 较旧的python版本可能仍然可以工作,但它们没有经过测试。 对于传统的python版本,请使用pypiserver-1.1.x系列。 < div >
Tip
下面的命令在一个类unix操作系统上使用posix shell。 '~' 字符扩展到用户的主目录。
如果您使用的是windows,则必须使用它们的"windows对应项"。 其他文档也是如此。
使用以下命令安装 pypiserver :
pip install pypiserver ## Or: pypiserver[passlib,watchdog] mkdir ~/packages ## Copy packages into this directory.
另请参见替代安装方法。
将一些包复制到您的 ~/packages 文件夹中,然后 启动并运行您的 pypiserver :
pypi-server -p 8080 ~/packages & ## Will listen to all IPs.
从客户端计算机中,键入以下内容:
## Download and Install hosted packages. pip install --extra-index-url http://localhost:8080/simple/ ... # or pip install --extra-index-url http://localhost:8080 ## Search hosted packages pip search --index http://localhost:8080 ... # Note that pip search does not currently work with the /simple endpoint
另请参见客户端配置以避免冗长的输入。
在命令行中输入pypi服务器以打印详细使用信息:
pypi-server [OPTIONS] [PACKAGES_DIRECTORY...] start PyPI compatible package server serving packages from PACKAGES_DIRECTORY. If PACKAGES_DIRECTORY is not given on the command line, it uses the default ~/packages. pypiserver scans this directory recursively for packages. It skips packages and directories starting with a dot. Multiple package directories can be specified. pypi-server understands the following options: -p, --port PORT listen on port PORT (default: 8080) -i, --interface INTERFACE listen on interface INTERFACE (default: 0.0.0.0, any interface) -a, --authenticate (UPDATE|download|list), ... comma-separated list of (case-insensitive) actions to authenticate Use '.' or '' for empty. Requires to have set the password (-P option). For example to password-protect package downloads (in addition to uploads) while leaving listings public, give: -P foo/htpasswd.txt -a update,download To drop all authentications, use: -P . -a . Note that when uploads are not protected, the `register` command is not necessary, but `~/.pypirc` still need username and password fields, even if bogus. By default, only 'update' is password-protected. -P, --passwords PASSWORD_FILE use apache htpasswd file PASSWORD_FILE to set usernames & passwords when authenticating certain actions (see -a option). If you want to allow un-authorized access, set this option and -a explicitly to empty (either '.' or''). --disable-fallback disable redirect to real PyPI index for packages not found in the local index --fallback-url FALLBACK_URL for packages not found in the local index, this URL will be used to redirect to (default: https://pypi.org/simple) --server METHOD use METHOD to run the server. Valid values include paste, cherrypy, twisted, gunicorn, gevent, wsgiref, auto. The default is to use "auto" which chooses one of paste, cherrypy, twisted or wsgiref. -r, --root PACKAGES_DIRECTORY [deprecated] serve packages from PACKAGES_DIRECTORY -o, --overwrite allow overwriting existing package files --hash-algo ALGO any `hashlib` available algo used as fragments on package links. Set one of (0, no, off, false) to disabled it. (default: md5) --welcome HTML_FILE uses the ASCII contents of HTML_FILE as welcome message response. -v enable INFO logging; repeat for more verbosity. --log-conf <FILE> read logging configuration from FILE. By default, configuration is read from `log.conf` if found in server's dir. --log-file <FILE> write logging info into this FILE. --log-frmt <FILE> the logging format-string. (see `logging.LogRecord` class from standard python library) [Default: %(asctime)s|%(name)s|%(levelname)s|%(thread)d|%(message)s] --log-req-frmt FORMAT a format-string selecting Http-Request properties to log; set to '%s' to see them all. [Default: %(bottle.request)s] --log-res-frmt FORMAT a format-string selecting Http-Response properties to log; set to '%s' to see them all. [Default: %(status)s] --log-err-frmt FORMAT a format-string selecting Http-Error properties to log; set to '%s' to see them all. [Default: %(body)s: %(exception)s \n%(traceback)s] pypi-server -h pypi-server --help show this help message pypi-server --version show pypi-server's version pypi-server -U [OPTIONS] [PACKAGES_DIRECTORY...] update packages in PACKAGES_DIRECTORY. This command searches pypi.org for updates and shows a pip command line which updates the package. The following additional options can be specified with -U: -x execute the pip commands instead of only showing them -d DOWNLOAD_DIRECTORY download package updates to this directory. The default is to use the directory which contains the latest version of the package to be updated. -u allow updating to unstable version (alpha, beta, rc, dev versions) Visit https://github.com/pypiserver/pypiserver for more information.
< > >