forked from python-eel/Eel
-
Notifications
You must be signed in to change notification settings - Fork 0
/
__init__.pyi
149 lines (93 loc) · 3.06 KB
/
__init__.pyi
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
from typing import Any, Dict, List, Set, Dict, Optional, Callable
from builtins import range
import traceback
from io import open
from gevent.threading import Timer
import gevent as gvt
import json as jsn
import bottle as btl
import bottle.ext.websocket as wbs
import re as rgx
import os
import eel.browsers as brw
import pyparsing as pp
import random as rnd
import sys
import pkg_resources as pkg
import socket
import mimetypes
_eel_js_file: str = ...
_eel_js: str = ...
_websockets: List[Any] = ...
_call_return_values: Dict[Any, Any] = ...
_call_return_callbacks: Dict[Any, Any] = ...
_call_number: int = ...
_exposed_functions: Dict[Any, Any] = ...
_js_functions: List[Any] = ...
_mock_queue: List[Any] = ...
_mock_queue_done: Set[Any] = ...
_shutdown: Optional[bool] = ...
# The maximum time (in milliseconds) that Python will try to retrieve a return value for functions executing in JS
# Can be overridden through `eel.init` with the kwarg `js_result_timeout` (default: 10000)
_js_result_timeout: int = ...
# All start() options must provide a default value and explanation here
_start_args: dict[str, Any] = ...
# == Temporary (suppressable) error message to inform users of breaking API change for v1.0.0 ===
api_error_message: str = ...
# ===============================================================================================
# Public functions
def expose(name_or_function: Optional[Callable[..., Any]] = ...) -> Callable[..., Any]:
# Deal with '@eel.expose()' - treat as '@eel.expose'
...
# PyParsing grammar for parsing exposed functions in JavaScript code
# Examples: `eel.expose(w, "func_name")`, `eel.expose(func_name)`, `eel.expose((function (e){}), "func_name")`
EXPOSED_JS_FUNCTIONS: object = ...
def init(path: str, allowed_extensions: List[str] = ..., js_result_timeout: int = ...) -> None:
...
def start(*start_urls: List[str], **kwargs: Any) -> None:
...
def show(*start_urls: List[str]) -> None:
...
def sleep(seconds: int) -> None:
...
def spawn(function: Callable[..., Any], *args: Any, **kwargs: Any):
...
# Bottle Routes
def _eel() -> str:
...
def _root() -> str:
return _static(_start_args['default_path'])
def _static(path: str) -> str:
...
def _websocket(ws: Any) -> None:
...
BOTTLE_ROUTES: Dict[str, Tuple[Callable[..., Any], dict[Any, Any]]] = ...
# Private functions
def _safe_json(obj: object) -> str:
...
def _repeated_send(ws: Any, msg: str) -> None:
...
def _process_message(message: str, ws: Any) -> None:
...
def _get_real_path(path: str) -> str:
...
def _mock_js_function(f: str) -> None:
...
def _import_js_function(f: str) -> None:
...
def _call_object(name: str, args: Any) -> Any:
...
def _mock_call(name: str, args: Any) -> Any:
...
def _js_call(name: str, args: Any) -> Any:
...
def _call_return(call: Any) -> Any:
...
def _expose(name: str, function: Callable[..., Any]) -> None:
...
def _detect_shutdown() -> None:
...
def _websocket_close(page: str) -> None:
...
def _set_response_headers(response: str) -> None:
...