Giter Club home page Giter Club logo

simplepypi's Introduction

This is a really, really, simple HTTP PyPI-like server.

It is intended to be used for companies or organizations that need a private PyPi.

It literally supports four functions:

- Allows uploading of packages
- Downloading by package (or package and version)
- A / page that is navigatable with a web browser
- /pypi/ listing

It does not support:

- Stopping you from overwriting a package with the same name / version
- Registering packages
- Any sort of ACLs

To use it run "simplepypi". You can upload packages by:

Install twine if you haven't already:

pip install twine

Build your package if you haven't already:

python setup.py sdist

Upload your package using twine:

$ twine upload --repository-url http://127.0.0.1:8000/ dist/*
Uploading distributions to http://127.0.0.1:8000/
Enter your username: <whatever>
Enter your password: <doesn't matter, see above>

Then, when you want to install packages from it you do:

pip install -i http://127.0.0.1:8000/pypi <your favorite package>

Or, if you're stuck in the stone ages with setuptools/easy_install:

from setuptools import setup

setup(
    ...
    install_requires=['<package>'],
    dependency_links=['http://127.0.0.1:8000/packages/<package>'],
)

python setup.py install

To use the docker image, build and run:

docker build -t simplepypi .
docker run -it -p 8000:8000 simplepypi

Not using twine yet? Here is the legacy way of uploading Python packages (not recommended):

Modify your ~/.pypirc so it looks like:

[distutils]
index-servers =
    pypi
    local

[local]
username: <whatever>
password: <doesn't matter, see above>
repository: http://127.0.0.1:8000

[pypi]
...

Run this on the setup.py of your favorite package:

$ python setup.py sdist upload -r local

And that's it!

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.