Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add safe and well maintained operator for running external code from web sources #954

Open
elronbandel opened this issue Jun 26, 2024 · 1 comment
Assignees

Comments

@elronbandel
Copy link
Member

prototype:

class WebModuleOperator(FieldOperator):
    source_urls: List[str] # all downloaded to tempdir
    function: str # imported from tempdir when set
    hash: str # used to make sure the files hasnt changed

    def prepare(self):
        # here come your logic to set things up

    def process(self, value):
        return self._loaded_func(value)
@yoavkatz
Copy link
Member

I think it should be called ApplyRemoteCode - and have as similar API to Apply.

ApplyRemoteCode("a", function="koko", to_field="b", source_urls = ['https:... '], source_urls_content_hash="XXXXX")

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants