3 ms·
> I don’t think it is possible to create a Python library that is not publicly available through pypi/pip, but can be installed in cloud functions Of course it
by BerislavLopac 6y ago
> I don’t think it is possible to create a Python library that is not publicly available through pypi/pip, but can be installed in cloud functions
Of course it is possible. You can set up your own PEP 503 [0] compliant repository, even unreachable outside your VPC, and use pip to install from it. One caveat: on GCF you can -- if I'm not mistaken -- only install Python-only libraries; but if you use Cloud Run you can install anything inside your container.
There are servers for hosting your own PEP503 repo, such as devpi [1] -- but ultimately you only need a Web server to serve the file index.
[0] https://www.python.org/dev/peps/pep-0503/ https://www.python.org/dev/peps/pep-0503/
[1] https://www.devpi.net/ https://www.devpi.net/