droidline 0.1.2__tar.gz

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,6 @@
1
+ __pycache__/
2
+ .pytest_cache/
3
+ .mypy_cache/
4
+ build/
5
+ dist/
6
+ *.egg-info/
@@ -0,0 +1,59 @@
1
+ Metadata-Version: 2.5
2
+ Name: droidline
3
+ Version: 0.1.2
4
+ Summary: Control Android phones from Python without ADB or root: find elements, tap, type, take screenshots and read notifications.
5
+ Project-URL: Homepage, https://droidline.dev
6
+ Project-URL: Documentation, https://droidline.dev/docs
7
+ Project-URL: Repository, https://github.com/KnifeLemon/Droidline
8
+ Project-URL: Issues, https://github.com/KnifeLemon/Droidline/issues
9
+ Project-URL: Changelog, https://github.com/KnifeLemon/Droidline/blob/main/CHANGELOG.md
10
+ Author: Droidline contributors
11
+ License-Expression: MIT
12
+ Keywords: accessibility,adb,android,android-automation,appium,device-farm,droidline,mcp,mobile-automation,pytest,rpa,test-automation,testing,ui-automation,uiautomator
13
+ Classifier: Development Status :: 3 - Alpha
14
+ Classifier: Framework :: Pytest
15
+ Classifier: Intended Audience :: Developers
16
+ Classifier: Operating System :: OS Independent
17
+ Classifier: Programming Language :: Python :: 3
18
+ Classifier: Programming Language :: Python :: 3 :: Only
19
+ Classifier: Topic :: Software Development :: Libraries :: Python Modules
20
+ Classifier: Topic :: Software Development :: Testing
21
+ Classifier: Topic :: Software Development :: Testing :: Acceptance
22
+ Classifier: Typing :: Typed
23
+ Requires-Python: >=3.9
24
+ Description-Content-Type: text/markdown
25
+
26
+ # droidline
27
+
28
+ Python SDK for [Droidline](https://droidline.dev). Control Android phones from your code with one-line commands, without ADB.
29
+
30
+ The SDK talks to the Droidline server on your PC (`droidline serve`, port 8780). The server and the phone do the waiting, retries and fallbacks; this package sends commands and turns errors into exceptions. Python 3.9+, no dependencies.
31
+
32
+ ## Install
33
+
34
+ ```sh
35
+ pip install droidline
36
+ ```
37
+
38
+ ## Example
39
+
40
+ ```python
41
+ from droidline import connect
42
+
43
+ d = connect()
44
+ d.launch("com.kakao.talk")
45
+ d.dump("screen.json")
46
+ d.touchById("com.kakao.talk:id/login")
47
+ d.input("id", "com.kakao.talk:id/email", "knife")
48
+ d.sendkey("enter")
49
+ if d.exists("text", "광고 닫기"):
50
+ d.touch("text", "광고 닫기")
51
+ d.intent("android.settings.WIFI_SETTINGS") # open a Settings page by its intent action
52
+ d.wait_idle()
53
+ ```
54
+
55
+ `connect()` uses the only online phone. With several, pass an ID or name: `connect("shelf-01")`, or use `Droidline().device("shelf-01")` for each. `DROIDLINE_HOST`, `DROIDLINE_PORT`, `DROIDLINE_TOKEN` and `DROIDLINE_DEVICE` set the defaults.
56
+
57
+ A failed command raises a subclass of `DroidlineError`, such as `NotFoundError`, with `code`, `retryable` and the server's extra fields in `data`.
58
+
59
+ Docs: https://droidline.dev/docs
@@ -0,0 +1,34 @@
1
+ # droidline
2
+
3
+ Python SDK for [Droidline](https://droidline.dev). Control Android phones from your code with one-line commands, without ADB.
4
+
5
+ The SDK talks to the Droidline server on your PC (`droidline serve`, port 8780). The server and the phone do the waiting, retries and fallbacks; this package sends commands and turns errors into exceptions. Python 3.9+, no dependencies.
6
+
7
+ ## Install
8
+
9
+ ```sh
10
+ pip install droidline
11
+ ```
12
+
13
+ ## Example
14
+
15
+ ```python
16
+ from droidline import connect
17
+
18
+ d = connect()
19
+ d.launch("com.kakao.talk")
20
+ d.dump("screen.json")
21
+ d.touchById("com.kakao.talk:id/login")
22
+ d.input("id", "com.kakao.talk:id/email", "knife")
23
+ d.sendkey("enter")
24
+ if d.exists("text", "광고 닫기"):
25
+ d.touch("text", "광고 닫기")
26
+ d.intent("android.settings.WIFI_SETTINGS") # open a Settings page by its intent action
27
+ d.wait_idle()
28
+ ```
29
+
30
+ `connect()` uses the only online phone. With several, pass an ID or name: `connect("shelf-01")`, or use `Droidline().device("shelf-01")` for each. `DROIDLINE_HOST`, `DROIDLINE_PORT`, `DROIDLINE_TOKEN` and `DROIDLINE_DEVICE` set the defaults.
31
+
32
+ A failed command raises a subclass of `DroidlineError`, such as `NotFoundError`, with `code`, `retryable` and the server's extra fields in `data`.
33
+
34
+ Docs: https://droidline.dev/docs
@@ -0,0 +1,43 @@
1
+ [build-system]
2
+ requires = ["hatchling>=1.26"]
3
+ build-backend = "hatchling.build"
4
+
5
+ [project]
6
+ name = "droidline"
7
+ version = "0.1.2"
8
+ description = "Control Android phones from Python without ADB or root: find elements, tap, type, take screenshots and read notifications."
9
+ readme = "README.md"
10
+ requires-python = ">=3.9"
11
+ license = "MIT"
12
+ authors = [{ name = "Droidline contributors" }]
13
+ keywords = [
14
+ "android", "android-automation", "mobile-automation", "ui-automation", "test-automation", "testing",
15
+ "appium", "uiautomator", "adb", "accessibility", "rpa", "device-farm", "mcp", "pytest", "droidline",
16
+ ]
17
+ classifiers = [
18
+ "Development Status :: 3 - Alpha",
19
+ "Intended Audience :: Developers",
20
+ "Operating System :: OS Independent",
21
+ "Framework :: Pytest",
22
+ "Programming Language :: Python :: 3",
23
+ "Programming Language :: Python :: 3 :: Only",
24
+ "Topic :: Software Development :: Testing",
25
+ "Topic :: Software Development :: Testing :: Acceptance",
26
+ "Topic :: Software Development :: Libraries :: Python Modules",
27
+ "Typing :: Typed",
28
+ ]
29
+ dependencies = []
30
+
31
+ [project.urls]
32
+ Homepage = "https://droidline.dev"
33
+ Documentation = "https://droidline.dev/docs"
34
+ Repository = "https://github.com/KnifeLemon/Droidline"
35
+ Issues = "https://github.com/KnifeLemon/Droidline/issues"
36
+ Changelog = "https://github.com/KnifeLemon/Droidline/blob/main/CHANGELOG.md"
37
+
38
+ [tool.hatch.build.targets.wheel]
39
+ packages = ["src/droidline"]
40
+
41
+ [tool.pytest.ini_options]
42
+ pythonpath = ["src", "tests"]
43
+ testpaths = ["tests"]
@@ -0,0 +1,30 @@
1
+ """Control Android phones through a local Droidline server, without ADB.
2
+
3
+ from droidline import connect
4
+
5
+ d = connect()
6
+ d.touch("id", "com.kakao.talk:id/login")
7
+
8
+ Docs: https://droidline.dev/docs
9
+ """
10
+
11
+ from . import _generated
12
+ from ._client import Device, Droidline, LeasedDevice, connect, lease
13
+ from ._element import Element
14
+ from ._errors import ConnectionLostError, DroidlineError, ServerNotRunningError
15
+ from ._generated import * # noqa: F401,F403
16
+
17
+ __version__ = "0.1.2"
18
+
19
+ __all__ = [
20
+ "connect",
21
+ "lease",
22
+ "Droidline",
23
+ "Device",
24
+ "LeasedDevice",
25
+ "Element",
26
+ "DroidlineError",
27
+ "ServerNotRunningError",
28
+ "ConnectionLostError",
29
+ ]
30
+ __all__ += _generated.__all__