Skip to main content

Tornado PyPi server

Project description

https://travis-ci.org/mosquito/pypi-server.svg?branch=master Latest Version https://img.shields.io/pypi/wheel/pypi-server.svg https://img.shields.io/pypi/pyversions/pypi-server.svg https://img.shields.io/pypi/l/pypi-server.svg

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

screenshots/packages.png?raw=true screenshots/users.png?raw=true screenshots/create_user.png?raw=true

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):

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-hypernode.com

Centos

Use prepared Centos 7 rpm from releases.

Manual installation:

# 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:

# 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:

pip install pypi-server

If you want to support postgres or mysql database:

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

[distutils]
index-servers =
    mypypi

[mypypi]
repository=http://example.com/pypi
username=admin
password=admin
  1. Make bundle, register package at your pypi-server and upload package:

cd your_package_root_folder
python setup.py sdist register upload -r mypypi

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.4.tar.gz (699.0 kB view details)

Uploaded Source

Built Distributions

pypi_server-0.4.4-py3-none-any.whl (764.5 kB view details)

Uploaded Python 3

pypi_server-0.4.4-py2-none-any.whl (764.6 kB view details)

Uploaded Python 2

File details

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

File metadata

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

File hashes

Hashes for pypi-server-0.4.4.tar.gz
Algorithm Hash digest
SHA256 4179a80c81fac1592283afd45379b63b2a02426f1984dcd987e9e0d3661d7b80
MD5 37bdf355a08bc28a4d643e75ab46df83
BLAKE2b-256 9d4e12a27e9b1d8907535c52423a7d42c5415041cfa4df23c427b9ba2766a527

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pypi_server-0.4.4-py3-none-any.whl
Algorithm Hash digest
SHA256 771eeb6577dd73775b2ece2dfb58b44f2980ec066726f413ee5bbb5f281d6f86
MD5 21f8d2e8a865b3fab4feaa847f65dcab
BLAKE2b-256 c7b37ccbd871c466d9669b6eb6c52a21bb540b567fd22389d64ce66537af1692

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pypi_server-0.4.4-py2-none-any.whl
Algorithm Hash digest
SHA256 2b741991bcfe4307499bf830a697f68e8c623e9641935951fdd71d36388e65d6
MD5 94f946f6b2667ccb6101491facde1335
BLAKE2b-256 40c5c9fcea4a6dc8e8718a1085daba212380a3569f59d24e5f630479c6426ca7

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