Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion examples/01_create_sandbox.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ def main():
suffix = "".join(random.choices(string.ascii_lowercase + string.digits, k=8))
try:
sandbox = Sandbox.create(
image="koyeb/sandbox",
image="koyeb/sandbox:slim",
name=f"example-sandbox-{suffix}",
wait_ready=True,
api_token=api_token,
Expand Down
2 changes: 1 addition & 1 deletion examples/01_create_sandbox_async.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ async def main():
suffix = "".join(random.choices(string.ascii_lowercase + string.digits, k=8))
try:
sandbox = await AsyncSandbox.create(
image="koyeb/sandbox",
image="koyeb/sandbox:slim",
name=f"example-sandbox-{suffix}",
wait_ready=True,
api_token=api_token,
Expand Down
2 changes: 1 addition & 1 deletion examples/02_create_sandbox_with_timing.py
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ def main(run_long_tests=False):
print(" → Creating sandbox...")
create_start = time.time()
sandbox = Sandbox.create(
image="koyeb/sandbox",
image="koyeb/sandbox:slim",
name=f"example-sandbox-timed-{suffix}",
wait_ready=True,
api_token=api_token,
Expand Down
2 changes: 1 addition & 1 deletion examples/02_create_sandbox_with_timing_async.py
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ async def main(run_long_tests=False):
print(" → Creating sandbox...")
create_start = time.time()
sandbox = await AsyncSandbox.create(
image="koyeb/sandbox",
image="koyeb/sandbox:slim",
name=f"example-sandbox-timed-{suffix}",
wait_ready=True,
api_token=api_token,
Expand Down
2 changes: 1 addition & 1 deletion examples/03_basic_commands.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ def main():
suffix = "".join(random.choices(string.ascii_lowercase + string.digits, k=8))
try:
sandbox = Sandbox.create(
image="koyeb/sandbox",
image="koyeb/sandbox:slim",
name=f"basic-commands-{suffix}",
wait_ready=True,
api_token=api_token,
Expand Down
2 changes: 1 addition & 1 deletion examples/03_basic_commands_async.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ async def main():
suffix = "".join(random.choices(string.ascii_lowercase + string.digits, k=8))
try:
sandbox = await AsyncSandbox.create(
image="koyeb/sandbox",
image="koyeb/sandbox:slim",
name=f"basic-commands-{suffix}",
wait_ready=True,
api_token=api_token,
Expand Down
2 changes: 1 addition & 1 deletion examples/04_streaming_output.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ def main():
suffix = "".join(random.choices(string.ascii_lowercase + string.digits, k=8))
try:
sandbox = Sandbox.create(
image="koyeb/sandbox",
image="koyeb/sandbox:slim",
name=f"streaming-{suffix}",
wait_ready=True,
api_token=api_token,
Expand Down
2 changes: 1 addition & 1 deletion examples/04_streaming_output_async.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ async def main():
suffix = "".join(random.choices(string.ascii_lowercase + string.digits, k=8))
try:
sandbox = await AsyncSandbox.create(
image="koyeb/sandbox",
image="koyeb/sandbox:slim",
name=f"streaming-{suffix}",
wait_ready=True,
api_token=api_token,
Expand Down
2 changes: 1 addition & 1 deletion examples/05_environment_variables.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ def main():

# Create sandbox with env vars referencing the secret and using interpolation
sandbox = Sandbox.create(
image="koyeb/sandbox",
image="koyeb/sandbox:slim",
name=f"env-vars-{suffix}",
wait_ready=True,
api_token=api_token,
Expand Down
2 changes: 1 addition & 1 deletion examples/05_environment_variables_async.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ async def main():

# Create sandbox with env vars referencing the secret and using interpolation
sandbox = await AsyncSandbox.create(
image="koyeb/sandbox",
image="koyeb/sandbox:slim",
name=f"env-vars-{suffix}",
wait_ready=True,
api_token=api_token,
Expand Down
2 changes: 1 addition & 1 deletion examples/06_working_directory.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ def main():
suffix = "".join(random.choices(string.ascii_lowercase + string.digits, k=8))
try:
sandbox = Sandbox.create(
image="koyeb/sandbox",
image="koyeb/sandbox:slim",
name=f"working-dir-{suffix}",
wait_ready=True,
api_token=api_token,
Expand Down
2 changes: 1 addition & 1 deletion examples/06_working_directory_async.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ async def main():
suffix = "".join(random.choices(string.ascii_lowercase + string.digits, k=8))
try:
sandbox = await AsyncSandbox.create(
image="koyeb/sandbox",
image="koyeb/sandbox:slim",
name=f"working-dir-{suffix}",
wait_ready=True,
api_token=api_token,
Expand Down
2 changes: 1 addition & 1 deletion examples/07_file_operations.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ def main():
suffix = "".join(random.choices(string.ascii_lowercase + string.digits, k=8))
try:
sandbox = Sandbox.create(
image="koyeb/sandbox",
image="koyeb/sandbox:slim",
name=f"file-ops-{suffix}",
wait_ready=True,
api_token=api_token,
Expand Down
2 changes: 1 addition & 1 deletion examples/07_file_operations_async.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ async def main():
suffix = "".join(random.choices(string.ascii_lowercase + string.digits, k=8))
try:
sandbox = await AsyncSandbox.create(
image="koyeb/sandbox",
image="koyeb/sandbox:slim",
name=f"file-ops-{suffix}",
wait_ready=True,
api_token=api_token,
Expand Down
2 changes: 1 addition & 1 deletion examples/08_directory_operations.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ def main():
suffix = "".join(random.choices(string.ascii_lowercase + string.digits, k=8))
try:
sandbox = Sandbox.create(
image="koyeb/sandbox",
image="koyeb/sandbox:slim",
name=f"directory-ops-{suffix}",
wait_ready=True,
api_token=api_token,
Expand Down
2 changes: 1 addition & 1 deletion examples/08_directory_operations_async.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ async def main():
suffix = "".join(random.choices(string.ascii_lowercase + string.digits, k=8))
try:
sandbox = await AsyncSandbox.create(
image="koyeb/sandbox",
image="koyeb/sandbox:slim",
name=f"directory-ops-{suffix}",
wait_ready=True,
api_token=api_token,
Expand Down
2 changes: 1 addition & 1 deletion examples/09_binary_files.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ def main():
suffix = "".join(random.choices(string.ascii_lowercase + string.digits, k=8))
try:
sandbox = Sandbox.create(
image="koyeb/sandbox",
image="koyeb/sandbox:slim",
name=f"binary-files-{suffix}",
wait_ready=True,
api_token=api_token,
Expand Down
2 changes: 1 addition & 1 deletion examples/09_binary_files_async.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ async def main():
suffix = "".join(random.choices(string.ascii_lowercase + string.digits, k=8))
try:
sandbox = await AsyncSandbox.create(
image="koyeb/sandbox",
image="koyeb/sandbox:slim",
name=f"binary-files-{suffix}",
wait_ready=True,
api_token=api_token,
Expand Down
2 changes: 1 addition & 1 deletion examples/10_batch_operations.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ def main():
suffix = "".join(random.choices(string.ascii_lowercase + string.digits, k=8))
try:
sandbox = Sandbox.create(
image="koyeb/sandbox",
image="koyeb/sandbox:slim",
name=f"batch-ops-{suffix}",
wait_ready=True,
api_token=api_token,
Expand Down
2 changes: 1 addition & 1 deletion examples/10_batch_operations_async.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ async def main():
suffix = "".join(random.choices(string.ascii_lowercase + string.digits, k=8))
try:
sandbox = await AsyncSandbox.create(
image="koyeb/sandbox",
image="koyeb/sandbox:slim",
name=f"batch-ops-{suffix}",
wait_ready=True,
api_token=api_token,
Expand Down
2 changes: 1 addition & 1 deletion examples/11_upload_download.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ def main():
suffix = "".join(random.choices(string.ascii_lowercase + string.digits, k=8))
try:
sandbox = Sandbox.create(
image="koyeb/sandbox",
image="koyeb/sandbox:slim",
name=f"upload-download-{suffix}",
wait_ready=True,
api_token=api_token,
Expand Down
2 changes: 1 addition & 1 deletion examples/11_upload_download_async.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ async def main():
suffix = "".join(random.choices(string.ascii_lowercase + string.digits, k=8))
try:
sandbox = await AsyncSandbox.create(
image="koyeb/sandbox",
image="koyeb/sandbox:slim",
name=f"upload-download-{suffix}",
wait_ready=True,
api_token=api_token,
Expand Down
2 changes: 1 addition & 1 deletion examples/12_file_manipulation.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ def main():
suffix = "".join(random.choices(string.ascii_lowercase + string.digits, k=8))
try:
sandbox = Sandbox.create(
image="koyeb/sandbox",
image="koyeb/sandbox:slim",
name=f"file-manip-{suffix}",
wait_ready=True,
api_token=api_token,
Expand Down
2 changes: 1 addition & 1 deletion examples/12_file_manipulation_async.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ async def main():
suffix = "".join(random.choices(string.ascii_lowercase + string.digits, k=8))
try:
sandbox = await AsyncSandbox.create(
image="koyeb/sandbox",
image="koyeb/sandbox:slim",
name=f"file-manip-{suffix}",
wait_ready=True,
api_token=api_token,
Expand Down
2 changes: 1 addition & 1 deletion examples/13_background_processes.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ def main():
suffix = "".join(random.choices(string.ascii_lowercase + string.digits, k=8))
try:
sandbox = Sandbox.create(
image="koyeb/sandbox",
image="koyeb/sandbox:slim",
name=f"background-processes-{suffix}",
wait_ready=True,
api_token=api_token,
Expand Down
2 changes: 1 addition & 1 deletion examples/13_background_processes_async.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ async def main():
suffix = "".join(random.choices(string.ascii_lowercase + string.digits, k=8))
try:
sandbox = await AsyncSandbox.create(
image="koyeb/sandbox",
image="koyeb/sandbox:slim",
name=f"background-processes-{suffix}",
wait_ready=True,
api_token=api_token,
Expand Down
2 changes: 1 addition & 1 deletion examples/14_expose_port.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ def main():
suffix = "".join(random.choices(string.ascii_lowercase + string.digits, k=8))
try:
sandbox = Sandbox.create(
image="koyeb/sandbox",
image="koyeb/sandbox:slim",
name=f"expose-port-{suffix}",
wait_ready=True,
api_token=api_token,
Expand Down
2 changes: 1 addition & 1 deletion examples/14_expose_port_async.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ async def main():
suffix = "".join(random.choices(string.ascii_lowercase + string.digits, k=8))
try:
sandbox = await AsyncSandbox.create(
image="koyeb/sandbox",
image="koyeb/sandbox:slim",
name=f"expose-port-{suffix}",
wait_ready=True,
api_token=api_token,
Expand Down
2 changes: 1 addition & 1 deletion examples/15_get_sandbox.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ def main():
# Step 1: Create a new sandbox
print("Creating a new sandbox...")
original_sandbox = Sandbox.create(
image="koyeb/sandbox",
image="koyeb/sandbox:slim",
name="example-sandbox",
wait_ready=True,
api_token=api_token,
Expand Down
2 changes: 1 addition & 1 deletion examples/15_get_sandbox_async.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ async def main():
# Step 1: Create a new sandbox
print("Creating a new sandbox...")
original_sandbox = await AsyncSandbox.create(
image="koyeb/sandbox",
image="koyeb/sandbox:slim",
name="example-sandbox",
wait_ready=True,
api_token=api_token,
Expand Down
2 changes: 1 addition & 1 deletion examples/16_create_sandbox_with_auto_delete_simple.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ def main():

create_start = time.time()
sandbox = Sandbox.create(
image="koyeb/sandbox",
image="koyeb/sandbox:slim",
name=f"auto-delete-test-simple-{suffix}",
wait_ready=True,
api_token=api_token,
Expand Down
4 changes: 2 additions & 2 deletions examples/17_create_sandbox_with_auto_delete.py
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ def main():

create_start = time.time()
sandbox1 = Sandbox.create(
image="koyeb/sandbox",
image="koyeb/sandbox:slim",
name="auto-delete-test-1",
wait_ready=True,
api_token=api_token,
Expand Down Expand Up @@ -179,7 +179,7 @@ def main():

create_start = time.time()
sandbox2 = Sandbox.create(
image="koyeb/sandbox",
image="koyeb/sandbox:slim",
name=f"auto-delete-test-2-{suffix}",
wait_ready=True,
api_token=api_token,
Expand Down
2 changes: 1 addition & 1 deletion examples/18_create_sandbox_with_existing_app.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ def main():

print(f" Creating sandbox in app: {app_id}")
sandbox = Sandbox.create(
image="koyeb/sandbox",
image="koyeb/sandbox:slim",
name=f"sandbox-in-existing-app-{suffix}",
wait_ready=True,
api_token=api_token,
Expand Down
2 changes: 1 addition & 1 deletion examples/20_config_files.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ def main():

# Create sandbox with config files referencing the secret and using interpolation
sandbox = Sandbox.create(
image="koyeb/sandbox",
image="koyeb/sandbox:slim",
name=f"config-files-{suffix}",
wait_ready=True,
api_token=api_token,
Expand Down
2 changes: 1 addition & 1 deletion examples/20_config_files_async.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ async def main():

# Create sandbox with config files referencing the secret and using interpolation
sandbox = await AsyncSandbox.create(
image="koyeb/sandbox",
image="koyeb/sandbox:slim",
name=f"config-files-{suffix}",
wait_ready=True,
api_token=api_token,
Expand Down
2 changes: 1 addition & 1 deletion examples/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ from koyeb import Sandbox

# Create a sandbox
sandbox = await Sandbox.create(
image="koyeb/sandbox",
image="koyeb/sandbox:slim",
name="my-sandbox",
wait_ready=True,
api_token=api_token,
Expand Down
Loading