Commit Graph

4408 Commits

Author SHA1 Message Date
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
Vasek Mlejnsky c4dce0c849 Update docs 2024-10-14 13:33:11 -07:00
Vasek Mlejnsky d220d4da7a Update docs 2024-10-14 13:31:31 -07:00
Jakub Novak bc42ba1e66 Refactor watch dir 2024-10-14 13:01:59 -07:00
Vasek Mlejnsky 22044ba13c Update text size 2024-10-14 12:22:42 -07:00
Vasek Mlejnsky 7fc0a0f81b Add quickstart page about installing custom packages 2024-10-14 12:15:20 -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
Vasek Mlejnsky 024d30ed45 Fix docs build 2024-10-14 11:35:58 -07:00
Jakub Novak f9978611f3 Regenerate rpc client 2024-10-14 11:30:02 -07:00
Jakub Novak c5aa13ea86 Fix command for generating from rpc spec 2024-10-14 11:29:20 -07:00
Vasek Mlejnsky 23c4d75494 remove unused prop 2024-10-14 11:19:30 -07:00
Vasek Mlejnsky 03d427bdd2 Disable search 2024-10-14 11:11:32 -07:00
Vasek Mlejnsky e2ef68b6dd Update code snippets 2024-10-14 11:10:53 -07:00
Vasek Mlejnsky 375bddb7d4 Remove import 2024-10-14 09:53:01 -07:00
Vasek Mlejnsky 33eea6adcc Resolve merge conflicts 2024-10-14 09:50:56 -07:00
Vasek Mlejnsky 7159c01bcf Add guides 2024-10-14 09:48:52 -07:00
0div 81c598cff9 update pnpm lock 2024-10-14 10:11:51 +02:00
0div 26022c1c1e fix relative paths in README 2024-10-14 10:08:36 +02:00
0div 6e8edaf60a fix relative paths in README 2024-10-14 10:07:47 +02:00
0div 18b742a843 Merge branch 'beta' of https://github.com/e2b-dev/E2B into beta 2024-10-14 10:01:20 +02:00
0div 6f904804cf update webapp README to explain the auto-generated api ref sdk workflow 2024-10-14 10:00:22 +02:00
Vasek Mlejnsky 085a6cbf4f Automatically expand navigation subgroups based on URL 2024-10-13 20:36:33 -07:00
Vasek Mlejnsky 6a5505738a Update navigation; create first quickstart page 2024-10-13 20:04:47 -07:00