You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Jun 22, 2025. It is now read-only.
In order to start developing with Eel you'll need to checkout the code, set up a development and testing environment, and check that everything is in order.
It's recommended that you use virtual environments for this project. Your process for setting up a virutal environment will vary depending on OS and tool of choice, but might look something like this:
14
+
15
+
```bash
16
+
python3 -m venv venv
17
+
source venv/bin/activate
18
+
```
19
+
20
+
**Note**: `venv` is listed in the `.gitignore` file so it's the recommended virtual environment name
pip3 install -r requirements-test.txt # pytest and selenium
28
+
pip3 install -r requirements-meta.txt # tox
29
+
```
30
+
31
+
### (Recommended) Run Automated Tests
32
+
Tox is configured to run tests against each major version we support (3.6+). In order to run Tox as configured, you will need to install multiple versions of Python. See the pinned minor versions in `.python-version` for recommendations.
33
+
34
+
#### Tox Setup
35
+
Our Tox configuration requires [Chrome](https://www.google.com/chrome) and [ChromeDriver](https://chromedriver.chromium.org/home). See each of those respective project pages for more information on setting each up.
36
+
37
+
**Note**: Pay attention to the version of Chrome that is installed on your OS because you need to select the compatible ChromeDriver version.
38
+
39
+
#### Running Tests
40
+
41
+
To test Eel against a specific version of Python you have installed, e.g. Python 3.6 in this case, run:
42
+
43
+
```bash
44
+
tox -e py36
45
+
```
46
+
47
+
To test Eel against all supported versions, run the following:
Copy file name to clipboardExpand all lines: README.md
+4-4Lines changed: 4 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -116,8 +116,8 @@ As of Eel v0.12.0, the following options are available to `start()`:
116
116
-**position**, a tuple of ints specifying the (left, top) of the main window in pixels *Default: `None`*
117
117
-**geometry**, a dictionary specifying the size and position for all windows. The keys should be the relative path of the page, and the values should be a dictionary of the form `{'size': (200, 100), 'position': (300, 50)}`. *Default: {}*
118
118
-**close_callback**, a lambda or function that is called when a websocket to a window closes (i.e. when the user closes the window). It should take two arguments; a string which is the relative path of the page that just closed, and a list of other websockets that are still open. *Default: `None`*
119
-
-**app**, an instance of Bottle which will be used rather than creating a fresh one. This can be used to install middleware on the
120
-
instance before starting eel, e.g. for session management, authentication, etc.
119
+
-**app**, an instance of Bottle which will be used rather than creating a fresh one. This can be used to install middleware on the instance before starting eel, e.g. for session management, authentication, etc. If your `app` is not a Bottle instance, you will need to call `eel.register_eel_routes(app)` on your custom app instance.
120
+
-**shutdown_delay**, timer configurable for Eel's shutdown detection mechanism, whereby when any websocket closes, it waits `shutdown_delay` seconds, and then checks if there are now any websocket connections. If not, then Eel closes. In case the user has closed the browser and wants to exit the program. By default, the value of **shutdown_delay** is `1.0` second
121
121
122
122
123
123
@@ -251,7 +251,7 @@ the JavaScript side, which defaults to 10000 milliseconds (10 seconds). This can
251
251
252
252
#### Callbacks
253
253
254
-
When you call an exposed function, you can immediately pass a callback function afterwards. This callback will automatically be called asynchrounously with the return value when the function has finished executing on the other side.
254
+
When you call an exposed function, you can immediately pass a callback function afterwards. This callback will automatically be called asynchronously with the return value when the function has finished executing on the other side.
255
255
256
256
For example, if we have the following function defined and exposed in Javascript:
257
257
@@ -288,7 +288,7 @@ n = eel.js_random()() # This immediately returns the value
288
288
print('Got this from Javascript:', n)
289
289
```
290
290
291
-
You can only perform synchronous returns after the browser window has started (after calling `eel.start()`), otherwise obviously the call with hang.
291
+
You can only perform synchronous returns after the browser window has started (after calling `eel.start()`), otherwise obviously the call will hang.
292
292
293
293
In Javascript, the language doesn't allow us to block while we wait for a callback, except by using `await` from inside an `async` function. So the equivalent code from the Javascript side would be:
0 commit comments