Commit Graph

338 Commits

Author SHA1 Message Date
Mish Ushakov d4f4352aa3 Add getInfo/get_info methods to the SDKs (#625)
- Rebased version of #517
2025-03-24 14:26:18 +01:00
Jiri Sveceny 85c4505b9f Change default domain in sdks from e2b.dev to e2b.app (#635) 2025-03-24 12:40:22 +01:00
Jakub Novák 5c4d07536f Add filtering option for listing sandboxes (#532)
# Description

Allow users to filter out sandbox based on metadata

---------

Co-authored-by: Mish Ushakov <10400064+mishushakov@users.noreply.github.com>
2025-03-21 15:57:48 +01:00
0div a8e88de846 fix merge conflict with main 2025-03-18 09:09:13 -07:00
Jakub Novák fe7ed15c61 Process time out returns incorrect exception in pythonsdk e2b 1476 (#550)
Handle the exception properly
2025-01-28 11:45:39 -08:00
Jakub Novak 359d17d0c4 Fix versions to match updated envd version 2025-01-28 11:28:35 -08:00
Jakub Dobrý ec9288a48b Add recursive watch envd version check python SDK, js SDK check 2025-01-28 11:28:18 -08:00
Jakub Dobrý 76b4ac02ad Regenerated python stubs with version 5.28.3
- Removed code runtime version check to prevent issues until further investigation
2025-01-28 11:26:32 -08:00
Jakub Dobrý 4adcfd83e9 Add python generated stubs 2025-01-28 11:26:30 -08:00
Jakub Dobrý 25c4539de6 Add watch dir recursive option (missing python client regeneration) 2025-01-28 11:25:42 -08:00
Jakub Novak fd45f0ef52 Handle exception when iterating over process output 2025-01-23 21:17:48 -08:00
Jakub Novak 61d147906e Add missing backticks 2025-01-23 15:24:00 -08:00
Jakub Novak 9282976628 Add envd version 2025-01-22 20:50:48 -08:00
Jakub Novak 4b5d17e8a4 Add missing files 2025-01-17 14:28:42 -08:00
Jakub Novak 594bb174d2 Generate only relevant api routes for the client in SDKs 2025-01-17 11:01:40 -08:00
0div 724fbc63cc remove WriteData type in python-sdk 2024-12-12 17:13:09 -08:00
0div 4ca24147f6 fixed typing syntax and watch tests 2024-12-12 15:18:06 -08:00
0div 97d0cc1ef5 merge main 2024-12-12 14:54:24 -08:00
0div bff11dc02e add the same fixes to python async 2024-12-11 17:29:46 -08:00
0div 3c525220d9 make stdout and stderr decode handle errors by replacing with unicode replacement char; add tests 2024-12-11 17:07:36 -08:00
Jakub Novak ba78ba09d5 Improve READMEs and links to get access token / api key 2024-11-04 10:53:40 -08:00
Jakub Novak f49a2ea38b Improve texting 2024-10-22 21:57:08 -07:00
Jakub Novak 80f2159cc7 Add rate limit error 2024-10-22 21:41:08 -07:00
Tomas Valenta aa302edc96 Change exception descriptions; Add TODO comment 2024-10-21 10:35:54 -07:00
Tomas Valenta 193b727dc9 Update example in docstrings 2024-10-16 02:21:03 -07:00
Tomas Valenta c688b267b4 Update sync Python docstrings 2024-10-16 01:31:03 -07:00
Tomas Valenta 95baca5d1b Update async Python docstrings 2024-10-16 00:52:13 -07:00
Jakub Novak 0f292860b1 Remove protobuf runtime checks 2024-10-14 21:38:14 -07:00
Jakub Novak 23ea4adfb1 Rename rpc methods for watcher 2024-10-14 19:51:05 -07:00
Jakub Novák e48574f69c Improve file watcher in Python Sync SDK (#457)
# Description

Current solution didn't work well with in sync Python. If you're unsure
whether a file has been created, you might end up waiting for a timeout
to exit the loop.

New implementation uses polling, you can ask for events whenever you
want and it will request envd to send all events (or only new ones).
This should make it much better for users with sync Python SDK

Example of a problematic usage before and after:
## Before
```python
sbx = Sandbox()
watcher = sbx.files.watch("/home/user")
sbx.files.make_dir("test")
for event in watcher:
    print(event)
     # !!! if you don't exit, you would be stuck for the rest of the timeout (default 60 seconds)
    break
watcher.close()
```
## After
```python
sbx = Sandbox()
watcher = sbx.files.watch("/home/user")
sbx.files.make_dir("test")
events = watcher.get_new_events()
watcher.stop()
for event in events:
    print(event)
```

Even worse case was if you don't know if anything will happen:
## Before
```python
sbx = Sandbox()
watcher = sbx.files.watch("/home/user")
if random.random() > 0.5:
    sbx.files.make_dir("test")
# There's 50% chance you will get stuck. The only workaround is to run in in separate thread and you kill it after a while (you aren't really sure when it's safe)
for event in watcher:
    print(event)
    #  !!! if you don't exit, you would be stuck for the rest of the timeout (default 60 seconds)
    break
watcher.close()
```
## After
```python
sbx = Sandbox()
watcher = sbx.files.watch("/home/user")
if random.random() > 0.5:
    sbx.files.make_dir("test")
events = watcher.get_new_events()
watcher.stop()
for event in events:
    print(event)
```
2024-10-14 23:09:53 +02:00
Jakub Novak bfc4bb51d8 Rename watch to watch dir 2024-10-14 14:01:34 -07:00
Jakub Novak 6e926ecb13 Remove timeout from sync watch dir 2024-10-14 13:40:08 -07:00
Jakub Novak bc42ba1e66 Refactor watch dir 2024-10-14 13:01:59 -07:00
Jakub Novak 5c31902cc4 Change close to stop for watch dir 2024-10-14 12:10:17 -07:00
Jakub Novak 5de5385533 Update the python sdk to match the new spec 2024-10-14 12:10:04 -07:00
Jakub Novak f9978611f3 Regenerate rpc client 2024-10-14 11:30:02 -07:00
Jakub Novak 81db2b1466 Add sync watch handler 2024-10-11 11:54:00 +02:00
0div 86262f1bc6 docstring for dataclass 2024-10-10 13:52:53 +02:00
0div 2956a6e7b9 better error messages in python-sdk 2024-10-10 12:04:42 +02:00
0div 834f84c8bb merge beta 2024-10-10 09:29:37 +02:00
0div 87e314ada5 Merge branch 'beta' of https://github.com/e2b-dev/E2B into generate-api-refs-workflow 2024-10-10 09:22:23 +02:00
Jakub Novak 5d027aa899 Improve the process exception message 2024-10-09 17:12:43 +02:00
Jakub Novak 7356efc2bb Fix write operation description 2024-10-09 16:35:30 +02:00
0div f5cd1c0767 add multifile upload to sanbox_async 2024-10-09 14:07:14 +02:00
0div 6a2203daf3 merge beta 2024-10-08 19:39:21 +02:00
0div fbc4af4908 allow passing empty array of files in python-sdk 2024-10-08 18:23:46 +02:00
0div 68ac0383df merge beta 2024-10-08 16:00:56 +02:00
Jakub Novak 506f70c7b8 Add docstrings to SDKs 2024-10-08 13:04:39 +02:00
0div 608ef45fa5 Use @overload 2024-10-08 12:32:33 +02:00
0div a379a587f0 Add multi-file write support for python-sdk sync 2024-10-07 21:10:28 +02:00