Make all your private packages accessible in one place
with this github-hosted PyPi index
Description • Try it ! • Get Started • Modify indexed packages • Contribute • References
Github-hosted
- 🚀 Template ready to deploy
- 🔆 Easy to use through Github Actions
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.
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 !
- Use this template and create your own repository :
- Customize
index.html
andpkg_template.html
to your liking - You're ready to go !
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
Issues and PR are welcome !
If you come across anything weird / that can be improved, please get in touch !
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 !