瓦尔描述
django-pypi的Python项目详细描述
通过orm访问数据库中的pypi结构。
安装
从pypi获得最新的稳定版本
$ pip install django-pypi
从github获取最新提交
$ pip install -e git+git://github.com/Celc/django-pypi.git#egg=pypi
TOdo:描述进一步的安装步骤(编辑/删除以下示例):
将pypi添加到INSTALLED_APPS
INSTALLED_APPS=(...,'pypi',)
不要忘记迁移数据库
./manage.py migrate pypi
用法
使用./manage.py pypi_refresh来获取pypi,这需要一段时间。
然后开始查询orm:
>>>package=Package.objects.get(name='Django')>>>package.versions.values_list('version',flat=True)[u'1.0.1',u'1.0.2',u'1.0.3','...(remaining elements truncated)...']
贡献
如果您想参与此项目,请执行以下步骤
# Fork this repository # Clone your fork $ mkvirtualenv -p python2.7 django-pypi $ python setup.py install $ git co -b feature_branch master # Implement your feature and tests $ git add . && git commit $ git push -u origin feature_branch # Send us a pull request for your feature branch