dora-keyboard 0.3.7__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,11 @@
1
+ import os
2
+
3
+ # Define the path to the README file relative to the package directory
4
+ readme_path = os.path.join(os.path.dirname(os.path.dirname(__file__)), "README.md")
5
+
6
+ # Read the content of the README file
7
+ try:
8
+ with open(readme_path, "r", encoding="utf-8") as f:
9
+ __doc__ = f.read()
10
+ except FileNotFoundError:
11
+ __doc__ = "README file not found."
dora_keyboard/main.py ADDED
@@ -0,0 +1,19 @@
1
+ from pynput import keyboard
2
+ from pynput.keyboard import Events
3
+ import pyarrow as pa
4
+ from dora import Node
5
+
6
+
7
+ def main():
8
+ node = Node()
9
+ with keyboard.Events() as events:
10
+ while True:
11
+ event = events.get(1.0)
12
+ if event is not None and isinstance(event, Events.Press):
13
+ if hasattr(event.key, "char"):
14
+ if event.key.char is not None:
15
+ node.send_output("char", pa.array([event.key.char]))
16
+
17
+
18
+ if __name__ == "__main__":
19
+ main()
@@ -0,0 +1,29 @@
1
+ Metadata-Version: 2.1
2
+ Name: dora-keyboard
3
+ Version: 0.3.7
4
+ Summary: Dora dora-keyboard
5
+ Home-page: https://github.com/dora-rs/dora.git
6
+ License: MIT
7
+ Author: Haixuan Xavier Tao
8
+ Author-email: tao.xavier@outlook.com
9
+ Requires-Python: >=3.7,<4.0
10
+ Classifier: License :: OSI Approved :: MIT License
11
+ Classifier: Programming Language :: Python :: 3
12
+ Classifier: Programming Language :: Python :: 3.7
13
+ Classifier: Programming Language :: Python :: 3.8
14
+ Classifier: Programming Language :: Python :: 3.9
15
+ Classifier: Programming Language :: Python :: 3.10
16
+ Classifier: Programming Language :: Python :: 3.11
17
+ Classifier: Programming Language :: Python :: 3.12
18
+ Classifier: Programming Language :: Python :: 3.13
19
+ Requires-Dist: dora-rs (>=0.3.6,<0.4.0)
20
+ Requires-Dist: numpy (<2.0.0)
21
+ Requires-Dist: pyarrow (>=5.0.0)
22
+ Requires-Dist: pynput (>=1.6.0,<2.0.0)
23
+ Project-URL: Documentation, https://github.com/dora-rs/dora/blob/main/node-hub/dora-keyboard/README.md
24
+ Description-Content-Type: text/markdown
25
+
26
+ # Dora Node for listening to keyboard input.
27
+
28
+ Send char only in the `char` output stream, as string, on press.
29
+
@@ -0,0 +1,6 @@
1
+ dora_keyboard/__init__.py,sha256=Gy4qL4vCeTyA5HR1Yp3ioL4-ClJyW8oi_38CzMuMsBM,358
2
+ dora_keyboard/main.py,sha256=PssIJy1r-IcR4NlcaCfGc7i4Q1hDaGUwwyxnRPWl__Q,517
3
+ dora_keyboard-0.3.7.dist-info/METADATA,sha256=W8ymxrS6ErGdXrGwOhjEXD0uMpHpr6YReGQL_se0YME,1088
4
+ dora_keyboard-0.3.7.dist-info/WHEEL,sha256=Nq82e9rUAnEjt98J6MlVmMCZb-t9cYE2Ir1kpBmnWfs,88
5
+ dora_keyboard-0.3.7.dist-info/entry_points.txt,sha256=Ocfp-Q2hGS1St7E8cJ9RJ3X8zg7exZYLuhlJXG5Lrpc,57
6
+ dora_keyboard-0.3.7.dist-info/RECORD,,
@@ -0,0 +1,4 @@
1
+ Wheel-Version: 1.0
2
+ Generator: poetry-core 1.9.1
3
+ Root-Is-Purelib: true
4
+ Tag: py3-none-any
@@ -0,0 +1,3 @@
1
+ [console_scripts]
2
+ dora-keyboard=dora_keyboard.main:main
3
+