Skip to content

astariul/github-hosted-pypi

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

92 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

github-hosted-pypi

Make all your private packages accessible in one place
with this github-hosted PyPi index


DescriptionTry it !Get StartedModify indexed packagesContributeReferences


Features

  • :octocat: Github-hosted
  • 🚀 Template ready to deploy
  • 🔆 Easy to use through Github Actions

Description

This repository is a Github page used as a PyPi index, conform to PEP503.

You can use it to group all your packages in one place, and access it easily through pip, almost like any other package publicly available !


While the PyPi index is public, private packages indexed here are kept private : you will need Github authentication to be able to retrieve it.

Try it !

Visit astariul.github.io/github-hosted-pypi/ and try to install packages indexed there !


Try to install the package public-hello :

pip install public-hello --extra-index-url https://astariul.github.io/github-hosted-pypi/

It will also install the package mydependency, automatically !

Try it with :

from public_hello import hi
print(hi())

You can also install a specific version :

pip install public-hello==0.1 --extra-index-url https://astariul.github.io/github-hosted-pypi/

Now try to install the package private-hello :

pip install private-hello --extra-index-url https://astariul.github.io/github-hosted-pypi/

It will not work, because it's private and only me can access it !

Get started

  • Use this template and create your own repository : Generic badge
  • Customize index.html and pkg_template.html to your liking
  • You're ready to go !

Modify indexed packages

Now that your PyPi index is setup, you can register / update / delete packages indexed.
Github actions are setup to do it automatically for you.

You just have to :

  • Open an issue with the appropriate template
  • Fill the information of the template (replace the comments)
  • Wait a bit
  • Check the new PR opened (ensure the code added correspond to what you want)
  • Merge the PR

Contribute

Issues and PR are welcome !

If you come across anything weird / that can be improved, please get in touch !

References

This is greatly inspired from this repository.
It's just a glorified version, with cleaner pages and github actions for easily adding, updating and removing packages from your index.

Also check the blogpost of the original author !


Icon used in the page was made by Freepik from Flaticon