Commit Graph

4231 Commits

Author SHA1 Message Date
Jakub Novak 0c8674abc5 Update min supported version of python to 3.9 2024-10-15 08:06:43 -07:00
Jakub Novak 3752a49586 Ignore .DS_Store files 2024-10-15 08:06:43 -07:00
github-actions[bot] 47a559b729 [skip ci] Release new versions 2024-10-15 14:40:37 +00:00
Jakub Novak 02bb4b22c7 Install dependencies 2024-10-15 07:35:11 -07:00
Jakub Novak 38db22d573 Fix issue with poetry 2024-10-15 07:30:24 -07:00
Jakub Novak 9ef205c2eb Merge pipelines 2024-10-15 07:24:51 -07:00
github-actions[bot] 9b8c1ea700 [skip ci] Release new SDK API reference doc versions 2024-10-15 14:05:26 +00:00
Jakub Novak e500af6eb3 Bump version 2024-10-15 07:03:58 -07:00
Vasek Mlejnsky 0234323fc8 Update docs 2024-10-15 01:18:16 -07:00
Vasek Mlejnsky 77741a5e78 Merge branch 'beta' of https://github.com/e2b-dev/E2B into beta 2024-10-15 01:16:40 -07:00
Vasek Mlejnsky 0ab63b3688 Update docs 2024-10-15 01:16:32 -07:00
github-actions[bot] adc2b3079d [skip ci] Release new SDK API reference doc versions 2024-10-15 06:13:00 +00:00
Jakub Novak bcea20f7bc Start tests with python 2024-10-14 23:11:51 -07:00
github-actions[bot] 7e77475c89 [skip ci] Release new SDK API reference doc versions 2024-10-15 06:06:43 +00:00
Jakub Novak 3844442bf1 Bump version 2024-10-14 23:05:33 -07:00
Jakub Novak c390352c58 Install dependencies for python tests 2024-10-14 23:00:26 -07:00
Jakub Novak c8b5d029f2 Fix browser test 2024-10-14 22:53:20 -07:00
Jakub Novak 483f429dc6 Install playwright for tests 2024-10-14 22:45:19 -07:00
Jakub Novak b758bb6d06 Merge remote-tracking branch 'origin/main' into beta 2024-10-14 22:26:47 -07:00
Tereza Tizkova ab0ba2d072 Update README 2024-10-14 21:46:51 -07:00
Jakub Novak 0f292860b1 Remove protobuf runtime checks 2024-10-14 21:38:14 -07:00
Vasek Mlejnsky 27e5993529 Update docs 2024-10-14 20:51:39 -07:00
Vasek Mlejnsky dcf0c63dc6 Update docs 2024-10-14 20:51:17 -07:00
Vasek Mlejnsky 01800b9116 Update docs 2024-10-14 20:28:24 -07:00
Vasek Mlejnsky 4636869c66 Merge branch 'beta' of https://github.com/e2b-dev/E2B into beta 2024-10-14 20:27:37 -07:00
Vasek Mlejnsky 91eee6b258 Update docs 2024-10-14 20:27:32 -07:00
Jakub Novak 23ea4adfb1 Rename rpc methods for watcher 2024-10-14 19:51:05 -07:00
Vasek Mlejnsky ec106392b8 Update docs 2024-10-14 19:37:16 -07:00
Vasek Mlejnsky 7a66987f7f Update docs 2024-10-14 19:33:57 -07:00
Vasek Mlejnsky cf8541c662 Update docs 2024-10-14 19:31:29 -07:00
Vasek Mlejnsky 629710f542 Update docs 2024-10-14 18:47:18 -07:00
Vasek Mlejnsky 67fb0170ab Merge branch 'beta' of https://github.com/e2b-dev/E2B into beta 2024-10-14 18:46:28 -07:00
Vasek Mlejnsky 30116bfac7 Update docs 2024-10-14 18:46:24 -07:00
James Murdza aa00abb36c First draft of migration guide 2024-10-14 18:08:35 -07:00
Vasek Mlejnsky 62e66a50e1 Merge branch 'beta' of https://github.com/e2b-dev/E2B into beta 2024-10-14 17:19:47 -07:00
Vasek Mlejnsky 69d4f9fffb Add anchor links to h3 elements 2024-10-14 17:19:39 -07:00
Tomas Valenta ad2391482d Fix readme grammar 2024-10-14 16:59:29 -07:00
Tomas Valenta c824c3da09 Merge branch 'beta' of https://github.com/e2b-dev/E2B into beta 2024-10-14 16:56:35 -07:00
Tomas Valenta fb919b1ab9 Update CLI readme 2024-10-14 16:56:29 -07:00
Vasek Mlejnsky b14cb5ea21 Update routes 2024-10-14 16:49:24 -07:00
Vasek Mlejnsky 4b063a2567 Update navbar title 2024-10-14 16:45:59 -07:00
Vasek Mlejnsky b9893cd0c9 Merge branch 'beta' of https://github.com/e2b-dev/E2B into beta 2024-10-14 16:43:12 -07:00
Vasek Mlejnsky fe9a6b8538 Update docs 2024-10-14 16:43:07 -07:00
Tomas Valenta 71ec17530e Fix CLI code snippets 2024-10-14 16:28:29 -07:00
github-actions[bot] 9092886866 [skip ci] Release new SDK API reference doc versions 2024-10-14 21:12:06 +00:00
Tereza Tizkova a668b3978a Merge branch 'beta' of https://github.com/e2b-dev/E2B into beta 2024-10-14 14:10:20 -07:00
Tereza Tizkova b5a6f4958e Update readme 2024-10-14 14:10:13 -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