typing and refactoring on the way
diff --git a/wally/sensors_rpc_plugin.pyi b/wally/sensors_rpc_plugin.pyi
new file mode 100644
index 0000000..c4b387b
--- /dev/null
+++ b/wally/sensors_rpc_plugin.pyi
@@ -0,0 +1,24 @@
+import os
+from typing import NamedTuple, TypeVar, Callable, Any, Optional, List, Iterable, Dict, Tuple
+
+SensorInfo = NamedTuple("SensorInfo", [('value', int), ('is_accumulated', bool)])
+Pid = TypeVar('Pid', str)
+AnyFunc = TypeVar('AnyFunc', Callable[..., Any])
+PrefixList = Optional[List[str]]
+SensorDict = Dict[str, SensorInfo]
+
+def provides(name: str) -> Callable[[AnyFunc], AnyFunc]: ...
+def is_dev_accepted(name, disallowed_prefixes: PrefixList, allowed_prefixes: PrefixList) -> bool: ...
+def get_pid_name(pid: Pid) -> str: ...
+def delta(func, only_upd: bool = True) -> Iterable[Optional[str], Optional[Dict[str, str]]]: ...
+def get_latency(stat1: SensorDict, stat2: SensorDict) -> SensorDict: ...
+def pid_stat(pid: Pid) -> float: ...
+def get_mem_stats(pid : Pid) -> Tuple[int, int]: ...
+def get_ram_size() -> str: ...
+
+def io_stat(disallowed_prefixes: PrefixList, allowed_prefixes: PrefixList) -> SensorDict: ...
+def net_stat(disallowed_prefixes: PrefixList, allowed_prefixes: PrefixList) -> SensorDict: ...
+def pscpu_stat(disallowed_prefixes: PrefixList, allowed_prefixes: PrefixList) -> SensorDict: ...
+def psram_stat(disallowed_prefixes: PrefixList, allowed_prefixes: PrefixList) -> SensorDict: ...
+def syscpu_stat(disallowed_prefixes: PrefixList, allowed_prefixes: PrefixList) -> SensorDict: ...
+def sysram_stat(disallowed_prefixes: PrefixList, allowed_prefixes: PrefixList) -> SensorDict: ...