Package: pypi-server
PYPI Server===========.. image:: https://travis-ci.org/mosquito/pypi-server.svg?branch=master:target: https://travis-ci.org/mosquito/pypi-server.. image:: https://img.shields.io/pypi/v/pypi-server.svg:target: https://pypi.python.org/pypi/pypi-server/:alt: Latest Version.. image:: https://img.shields.io/pypi/wheel/pypi-server.svg:target: https://pypi.python.org/pypi/pypi-server/.. image:: https://img.shields.io/pypi/pyversions/pypi-server.svg:target: https://pypi.python.org/pypi/pypi-server/.. image:: https://img.shields.io/pypi/l/pypi-server.svg:target: https://pypi.python.org/pypi/pypi-server/Fast asynchronous pypi server implementation.What is this?-------------pypi.python.org - is a global package repository of the python packages. This package is a self-hosted pypi service with caching functionallity from the global pypi.HTTP proxy can't work with XML-RPC of pypi.python.org.Screenshots-----------.. image:: screenshots/packages.png?raw=true:scale: 50 %.. image:: screenshots/users.png?raw=true:scale: 50 %.. image:: screenshots/create_user.png?raw=true:scale: 50 %Features--------Supports right now:* Caching packages from global-pypi* Serving own packages (registering and updating)* Password authentication for registering and uploading* Supported Databases:* Postgresql* Mysql (mariadb)* sqlite3 (only for development)Installation------------Docker++++++Use `docker image`_ and following `docker-compose.yml`_ (uses postgresql):.. code-block:: yamlversion: '2'services:db:image: postgresenvironment:POSTGRES_PASSWORD: pypi-serverPOSTGRES_USER: pypi-serverPOSTGRES_DB: pypi-servervolumes:- ./postgresql:/var/lib/postgresql/datapypi_server:image: mosquito/pypi-server:latestlinks:- dbrestart: alwaysports:- 8080:80volumes:- ./packages:/usr/lib/pypi-serverenvironment:# Database URL. Use `sqlite3:///` or `mysql://` when neededDB: "postgres://pypi-server:pypi-server@db/pypi-server"## By default random#SECRET: changeme## Override standard port#PORT: 80## Set "X-Headers" (e.g. X-Forwarded-For)#PROXY_MODE: 1## Set 0 when you want to disable proxying from global pypi#PYPI_PROXY: 1## Tread-pool size (default cpu_count * 2)#POOL_SIZE: 4## Maximum proxy clients count#MAX_CLIENTS: 25## PYPI server url#PYPY_SERVER: https://pypi.python.orgCentos++++++Use prepared Centos 7 rpm from `releases`_.Manual installation:.. code-block:: bash# Install compillersyum groupinstall -y "Development tools"# Install dependency headersyum install -y python-pip python-devel libxml2-devel libxslt-devel libffi-devel# Install the database library headers (if you use postgresql)yum install -y libpqxx-develDebian (Ubuntu)+++++++++++++++Use prepared deb files from `releases`_.Manual installation:.. code-block:: bash# Install compillersapt-get install -y build-essentialapt-get install -y python-dev python-pip libxml2-dev libxslt-dev libffi-devapt-get install -y libpq-devInstall pypi-server:.. code-block:: bashpip install pypi-serverIf you want to support postgres or mysql database:.. code-block:: bashpip install 'pypi-server[postgres]' # or 'pypi-server[mysql]'Default admin login \ password is: admin \ adminHow to upload your own package---------------------------1. Make sure that your package setup.py file is correct. Check reference at https://packaging.python.org/distributing/2. Create at home directory .pypirc.. code-block::[distutils]index-servers =mypypi[mypypi]repository=http://example.com/pypiusername=adminpassword=admin3. Make bundle, register package at your pypi-server and upload package:.. code-block:: bashcd your_package_root_folderpython setup.py sdist register upload -r mypypi.. _releases: https://github.com/mosquito/pypi-server/releases/.. _docker image: https://hub.docker.com/r/mosquito/pypi-server/.. _docker-compose.yml: https://github.com/mosquito/pypi-server/blob/master/docker-compose.yml