跳转到主要内容

PyPi服务器的实现

项目描述

ClueReleaseManager是实现PyPi服务器后端的实现,由http://pypi.python.org提供。它使用SQLAlchemy(默认为sqlite之上)来存储所有项目元数据,以及文件系统来存储项目文件。

当前功能

  • 通过setuptools进行用户注册

  • 通过setuptools上传文件(即eggs)

  • 基于基本认证的安全

  • 简单的索引浏览

即将推出的功能

要求

  • Python 2.5

  • setuptools

  • SQLAlchemy 0.5rc4或更高版本

  • repoze.who 1.0.8或更高版本

  • Werkzeug 0.4或更高版本(小于0.5,存在问题)

安装

使用如easy_install工具安装

$ easy_install ClueReleaseManager

这将提供cluerelmgr-servercluerelmgr-admin脚本,它们是ClueReleaseManager的所有入口点。

入门指南

第一个用户

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

$ cluerelmgr-admin updateuser firstuser somepassword firstuser@localhost manager

此命令创建了一个名为“firstuser”的新用户,密码为“somepassword”,电子邮件为“firstuser@localhost”。末尾的“manager”条目给此用户完全访问此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

允许匿名访问

有一个名为匿名的特殊用户,也可以分配角色。要允许匿名用户查看所有发行版,首先将他添加到组中

$ 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创建和维护 <rocky@serverzen.com>.. --rst--

变更日志

0.3.3 - 2009年9月18日

  • 更新README.txt以帮助开始使用

  • 具有MANAGER角色的用户现在也可以注册新项目(以前只有具有ADD角色的用户可以这样做)

  • 添加了favicon.ico并更新了wsgi应用以支持服务此文件

  • 在查看项目/发行版列表时,如果没有可访问的文件,现在用户会被告知

  • 修复了上传文件的bug

0.3.2 - 2009年6月24日

  • 更新需求以要求Werkzeug < 0.5

  • reStructuredText解析现在可以处理错误

  • 现在可以指向不带/simpe后缀的索引而没有问题

0.3.1 - 2009年4月18日

  • 现在可以基于virtualenv设置索引(admin setupindex)

  • 为主页上的最新更改的发行版添加了批处理/分页支持

  • 将用户-组映射从用户表解耦,以处理没有用户表记录的情况(即匿名用户)

  • 添加了搜索支持

0.3.0.1 - 2009年1月26日

  • 修复了通过distutils上传时的问题

0.3 - 2009年1月20日

  • 添加了用于管理数据库的cluerelmgr-admin工具

  • 添加了自定义索引支持

  • 现在可以按发行版为匿名用户添加访问权限

  • 现在可以浏览索引以查看元数据

0.2 - 2009年1月4日

  • 添加了用于指定基于repoze.who的独立安全配置的–security_config选项

  • 添加了用于指定代理URL的-u选项

  • 添加了基于用户的基本安全设置

0.1 - 2008年12月29日

  • 初始发布

项目详情


下载文件

下载适用于您的平台的文件。如果您不确定选择哪个,请了解更多关于安装包的信息。

源发行版

ClueReleaseManager-0.3.3.tar.gz (25.4 kB 查看散列)

上传时间

构建发行版

ClueReleaseManager-0.3.3-py2.5.egg (54.4 kB 查看散列)

上传时间

由以下支持

AWS AWS 云计算和安全赞助商 Datadog Datadog 监控 Fastly Fastly CDN Google Google 下载分析 Microsoft Microsoft PSF赞助商 Pingdom Pingdom 监控 Sentry Sentry 错误记录 StatusPage StatusPage 状态页面