Skip to main content

Tornado PyPi server

Project description

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 works 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:: yaml

version: '2'

services:
db:
image: postgres
environment:
POSTGRES_PASSWORD: pypi-server
POSTGRES_USER: pypi-server
POSTGRES_DB: pypi-server
volumes:
- ./postgresql:/var/lib/postgresql/data

pypi_server:
image: mosquito/pypi-server:latest
links:
- db
restart: always
ports:
- 8080:80
volumes:
- ./packages:/usr/lib/pypi-server
environment:
# Database URL. Use `sqlite3:///` or `mysql://` when needed
DB: "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.org


Centos
++++++

Use prepared Centos 7 rpm from `releases`_.

Manual installation:

.. code-block:: bash

# Install compillers
yum groupinstall -y "Development tools"

# Install dependency headers
yum 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-devel


Debian (Ubuntu)
+++++++++++++++

Use prepared deb files from `releases`_.

Manual installation:

.. code-block:: bash

# Install compillers
apt-get install -y build-essential
apt-get install -y python-dev python-pip libxml2-dev libxslt-dev libffi-dev
apt-get install -y libpq-dev



Install pypi-server:

.. code-block:: bash

pip install pypi-server


If you want to support postgres or mysql database:

.. code-block:: bash

pip install 'pypi-server[postgres]' # or 'pypi-server[mysql]'

Default admin login \ password is: admin \ admin


How upload your own package
---------------------------

1. Make sure what 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/pypi
username=admin
password=admin

3. Make bundle, register package at your pypi-server and upload package:

.. code-block:: bash

cd your_package_root_folder
python 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

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pypi-server-0.4.7.tar.gz (418.8 kB view details)

Uploaded Source

Built Distributions

pypi_server-0.4.7-py3-none-any.whl (725.1 kB view details)

Uploaded Python 3

pypi_server-0.4.7-py2-none-any.whl (725.1 kB view details)

Uploaded Python 2

File details

Details for the file pypi-server-0.4.7.tar.gz.

File metadata

  • Download URL: pypi-server-0.4.7.tar.gz
  • Upload date:
  • Size: 418.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for pypi-server-0.4.7.tar.gz
Algorithm Hash digest
SHA256 7b36dac9d802ec5b64bad4c6f6e9131c413afe7ac179bbb0a133c58b564f9609
MD5 b7db763559842d37795d2ffb5886a6e0
BLAKE2b-256 c5c2aa50aeb7dde2be689ae9cd684805bfb23d3d60cb18d0f3356f7cde9cba86

See more details on using hashes here.

File details

Details for the file pypi_server-0.4.7-py3-none-any.whl.

File metadata

File hashes

Hashes for pypi_server-0.4.7-py3-none-any.whl
Algorithm Hash digest
SHA256 140ad9bc7c7988551672754f8e4e7b5ad71df6f00d5df716b842ea050dab9c9b
MD5 9c1a1e4f658ab6409b3b96b7be311634
BLAKE2b-256 7557dbd18f716424ed1c832b136ff519de6ddc5254c7ae44b08894b5232bfd9c

See more details on using hashes here.

File details

Details for the file pypi_server-0.4.7-py2-none-any.whl.

File metadata

File hashes

Hashes for pypi_server-0.4.7-py2-none-any.whl
Algorithm Hash digest
SHA256 4b6f17ab2b644b3313c34487f5b34f3cb6999b0595c52178b53d22790d3b2c3d
MD5 c0442852e6a08bccc102fe6b0237c1a6
BLAKE2b-256 4a3b907e8167841233875e56721fa2ddb5fe62e4d3fda0b69efc55701028537d

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page