like-gold•2y ago
common actor code
Hello,
do you have any suggestions on how to share code between actors without using public repositories like pypi or github, instead only using apify platform/web IDE?
Some crazy idea: import from key value store apify internal pypi
3 Replies
Hey @rome
Some crazy idea: import from key value store apify internal pypiThis is a pretty good idea, just create a package in wheel format from the code you want to share. Here is an example for a requests package Which I have placed in my key-value store. Now I can just install it inside a docker container that I'll host on Apify. You can do the same with your code that you want to share between actors. sample with custom package
like-goldOP•2y ago
@Mantisus thx for your inputs. And you did not have to provide any api key?
@rome use your Apify API key when upload a package in the key-value if you do it for example from the Web IDE terminal
But you don't need any keys to download a package from Apify key-value. You can run the examples I've given you to see this