Coder Social home page Coder Social logo

w3ss / pypi-server Goto Github PK

View Code? Open in Web Editor NEW

This project forked from mosquito/pypi-server

0.0 3.0 0.0 1.05 MB

Tornado based server like pypi.python.org. With caching from pypi.

License: MIT License

Makefile 0.91% Python 77.95% CSS 1.30% JavaScript 8.78% HTML 11.06%

pypi-server's Introduction

PYPI Server

https://travis-ci.org/mosquito/pypi-server.svg?branch=master Latest Version

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.python.org

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

pypi-server's People

Contributors

mosquito avatar jgiannuzzi avatar vlanse avatar guydou avatar uda avatar

Watchers

James Cloos avatar Wendel G. Santana avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.