GithubHelp home page GithubHelp logo

danielbok / simple-pypi-repository Goto Github PK

View Code? Open in Web Editor NEW
1.0 2.0 0.0 1.28 MB

Self-hosted PyPI repository with added security features

Makefile 0.43% Python 28.88% HTML 2.51% Mako 0.33% JavaScript 0.84% TypeScript 61.09% CSS 5.37% Dockerfile 0.47% Shell 0.10%

simple-pypi-repository's Introduction

Simple PyPI Repository

Simple PyPI Repository (SPR) is an application for users to share Python packages in an internal corporate environment.

Use this when

You need to upload and share your python packages with your colleagues in an internal network.

You need to protect your packages, allowing only people with a token to download the package.

Don't use this when

You can upload and download your packages straight from

Usage

Run the docker-compose.yaml file as seen in the Simple Example for an idea on how to initiate the application.

We assume the backend server is running at http://spr-host:9090 henceforth.

Uploading packages

You can use twine to upload your packages as per normal. It is recommended to add SPR to your .pypirc. An example where SPR is named as internal is provided below.

[distutils]
index-servers =
        pypi
        testpypi
        internal

[pypi]
username: PyPI-Username
password: PyPI-Password

[internal]
repository: http://spr-host:9090/simple
username: test-account
password: password

Assuming you have a package called pokedex, you can upload the package with the following command.

twine upload -r internal pokedex-0.0.1-py3-none-any.whl

Downloading Packages

To install packages, your users can do a standard pip install. The only difference is that they'll have to add the extra repository to install from as follows.

pip install --extra-index-url http://spr-host:9090/simple pokedex

If you have set the package as private, the user will need to install the package with a token.

pip install --extra-index-url http://<user-token>@spr-host:9090/simple pokedex

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.