Let customers bring their own connectors.
Riza lets you run untrusted code from multiple customers
in a secure sandbox embedded inside your application.
interface storage { get: func(path: string) -> string; put: func(path: string, contents: string); }
1import io
2import boto3
3
4class S3Storage(storage):
5 def __init__(self):
6 self.bucket = "example"
7 self.s3 = boto3.client('s3')
8
9 def get(self, path):
10 f = io.BytesIO()
11 self.s3.download_fileobj(self.bucket, path, f)
12 return f.getvalue().decode()
13
14 def put(self, path, contents):
15 self.s3.put_object(
16 Bucket=self.bucket, Key=path, Body=contents)
17