pypi服务器的实现

ClueReleaseManager的Python项目详细描述


cluereleasemanager是提供的pypi服务器后端的实现 通过http://pypi.python.org。它使用sqlalchemy(默认位于sqlite之上) 存储所有项目元数据和用于存储项目文件的文件系统。

当前功能

  • User registration via setuptools
  • File upload (ie eggs) via setuptools
  • Basic authentication based security
  • Simple index browsing

即将推出的功能

要求

  • Python 2.5
  • setuptools
  • SQLAlchemy 0.5rc4 or higher
  • repoze.who 1.0.8 or higher
  • Werkzeug 0.4 or higher (less than 0.5 which has issues)

安装

使用easy_install工具安装,如:

$ easy_install ClueReleaseManager

这将提供cluerelmgr-servercluerelmgr-admin脚本 这是俱乐部经理的切入点。

开始

第一个用户

默认情况下,没有安全/访问规则设置,因此上载到 clueReleaseManager实例将无法工作。最重要的 准备的步骤是创建一个具有访问权限的新用户:

$ cluerelmgr-admin updateuser firstuser somepassword firstuser@localhost manager

此命令创建一个用户名为“firstuser”的新用户, 密码“somepassword”和电子邮件“firstuser@localhost”。“经理” 最后的条目允许此用户完全访问 clueReleaseManager实例。

启动服务器

现在已经创建了用户,我们可以继续并启动服务器:

$ cluerelmgr-server

首次上传-标准distutils/setuptools

首先,需要配置本地distutils以使用新的本地pypi 服务器为此,请编辑$HOME/.pypirc

[server-login]
username:firstuser
password:somepassword

接下来进入您的新项目并向服务器注册:

$ python setup.py register -r http://localhost:8080

现在,这个项目(或cluereleasemanager术语中的发行版)是 注册后,我们可以上载文件:

$ python setup.py bdist_egg sdist upload -r http://localhost:8080

允许匿名访问

有一个名为anonymous的特殊用户也可以被赋予角色。到 允许匿名用户查看所有发行版,首先将其添加到 A组:

$ cluerelmgr-admin updateusersgroups anonymous common

接下来,通过执行以下操作为该组提供全局访问:

$ cluerelmgr-admin updategroup common reader

服务器命令行选项

Usage: cluerelmgr-server [options]

Options:
  -h, --help            show this help message and exit
  -p PORT, --port=PORT  Port to listen on, defaults to 8080
  -i HOST, --interface=HOST
                        Host to listen on, defaults to 0.0.0.0
  -b BASEFILEDIR, --basefiledir=BASEFILEDIR
                        Base directory to store uploaded files,
                        defaults to files
  -d, --debug           Activate debug mode
  -s, --self-register   Allow self-registration
  -u BASEURL, --baseurl=BASEURL
                        The base url used in case of proxying
  --security-config=SECURITY_CONFIG
                        Use a separate configuration file to declare
                        the repoze.who config. See
                        http://static.repoze.org/whodocs
                        /#middleware-configuration-via-config-file
                        for details.
  --backup-pypi=BACKUP_PYPIS
                        Python indexes to fall back to.  When backup
                        index servers are configured they will be
                        queried if the user browsing this server has
                        the adddistro role and the this server will
                        be updated with all metadata and files.

学分

由Rocky Burt创建和维护。 ……--rst--

变更日志

0.3.3-2009年9月18日

  • Updated README.txt to help with getting started
  • Users with the MANAGER role can now also register new projects (previously only users with ADD role could do this)
  • Added favicon.ico and updated the wsgi app to support serving this file
  • When viewing the project/distro listing, if no files are accessible the user is now told
  • Fixed bug with uploading files

0.3.2-2009年6月24日

  • Updated requirements to require Werkzeug < 0.5
  • reStructuredText parsing now handles errors
  • Pointing distutils/setuptools to the index without the /simple suffix now works

0.3.1-2009年4月18日

  • Can now setup an index (admin setupindex) based on a virtualenv
  • Added batching/paging support for latest changed distros on main page
  • Uncoupled the user-group mapping from the user table for situations where there is no user table record (ie anonymous)
  • Added search support

0.3.0.1-2009年1月26日

  • Fixed issue where uploading via distutils was broken

0.3-2009年1月20日

  • New cluerelmgr-admin tool for managing the db
  • Added custom index support
  • Anonymous users can now be added access on a per-distro basis
  • Browsing index to see metadata now possible

0.2-2009年1月4日

  • Added –security_config option for specifying a separate security configuration based on repoze.who
  • Added -u option for specifying a proxied url
  • Added basic user-based security settings

0.1-2009年12月29日

  • Initial release

欢迎加入QQ群-->: 979659372 Python中文网_新手群

推荐PyPI第三方库


热门话题
java testNG优先级和依赖性   java JPQL:以下WHERE子句使用继承时出现问题   java是否可以在JTable渲染器中进行查询?   java如何在javascript中向url添加变量并使用@PathVariable获取   在外部jframe中显示java控制台   java I无法连接到IBM MQ的QM错误2035 MQRC\u未授权   apache zookeeper如何解决Storm应用程序在本地集群中运行时出现的错误“java.net.ConnectException:连接被拒绝:connect”?   读取第一行的java文本文件具有键和第二行前进值   java在哪个线程池中affinityRun提交任务?如何配置线程数?   Java拆分字符串正则表达式:前导空格   如何在Java中读取Pop3服务器中的入站电子邮件   带/不带布局管理器的swing Java定位GUI组件   在Spring Webflux中使用域设置java多会话ID   http Java web将其内容刮除,但只刮除正文样式,然后不退出并永远运行   java图形绘制组件和循环故障