# pyadb_client
Python library to communicate with ADB devices. Built on top of Rust `adb_client` library.
## Installation
```bash
pip install pyadb_client
```
## Examples
### Use ADB server
```python
from pyadb_client import PyADBServer
server = PyADBServer("127.0.0.1:5037")
for i, device in enumerate(server.devices()):
print(i, device.identifier, device.state)
# Get only connected device
device = server.get_device()
print(device, device.identifier)
```
### Push a file on device
```python
from pyadb_client import PyADBUSBDevice
usb_device = PyADBUSBDevice.autodetect()
usb_device.push("file.txt", "/data/local/tmp/file.txt")
```
## Local development
```bash
# Create Python virtual environment
cd pyadb_client
python3 -m venv .venv
source .venv/bin/activate
# Install needed build dependencies
pip install maturin
# Build development package
maturin develop
# Build stub file (.pyi)
cargo run --bin stub_gen
# Build release Python package
maturin build --release -m pyadb_client/Cargo.toml
```
Raw data
{
"_id": null,
"home_page": "https://github.com/cocool97/adb_client",
"name": "pyadb-client",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.7",
"maintainer_email": null,
"keywords": "adb, android, tcp, usb",
"author": "Corentin LIAUD",
"author_email": null,
"download_url": "https://files.pythonhosted.org/packages/35/66/0fb342740f5fc67e8241875f09b2a3cc1e889a634e814a6054cc6149f522/pyadb_client-2.1.7.tar.gz",
"platform": null,
"description": "# pyadb_client\n\nPython library to communicate with ADB devices. Built on top of Rust `adb_client` library.\n\n## Installation\n\n```bash\npip install pyadb_client\n```\n\n## Examples\n\n### Use ADB server\n\n```python\nfrom pyadb_client import PyADBServer\n\nserver = PyADBServer(\"127.0.0.1:5037\")\nfor i, device in enumerate(server.devices()):\n print(i, device.identifier, device.state)\n\n# Get only connected device\ndevice = server.get_device()\nprint(device, device.identifier)\n```\n\n### Push a file on device\n\n```python\nfrom pyadb_client import PyADBUSBDevice\n\nusb_device = PyADBUSBDevice.autodetect()\nusb_device.push(\"file.txt\", \"/data/local/tmp/file.txt\")\n```\n\n## Local development\n\n```bash\n# Create Python virtual environment\ncd pyadb_client\npython3 -m venv .venv\nsource .venv/bin/activate\n\n# Install needed build dependencies\npip install maturin\n\n# Build development package\nmaturin develop\n\n# Build stub file (.pyi)\ncargo run --bin stub_gen\n\n# Build release Python package\nmaturin build --release -m pyadb_client/Cargo.toml\n```\n\n",
"bugtrack_url": null,
"license": "MIT",
"summary": "Python wrapper for adb_client library",
"version": "2.1.7",
"project_urls": {
"Homepage": "https://github.com/cocool97/adb_client",
"Source Code": "https://github.com/cocool97/adb_client"
},
"split_keywords": [
"adb",
" android",
" tcp",
" usb"
],
"urls": [
{
"comment_text": null,
"digests": {
"blake2b_256": "093ec17557e69162a2c178b222cbf00cd08e14e6124455cc99cdbf8ad7caf967",
"md5": "3c9387065b2bcc048950e5d3c8f2d19e",
"sha256": "454b29482a9c7222e2352cee81ab14050ca50faf655e97d5a60e3c2eaaa34284"
},
"downloads": -1,
"filename": "pyadb_client-2.1.7-cp37-abi3-manylinux_2_39_x86_64.whl",
"has_sig": false,
"md5_digest": "3c9387065b2bcc048950e5d3c8f2d19e",
"packagetype": "bdist_wheel",
"python_version": "cp37",
"requires_python": ">=3.7",
"size": 942710,
"upload_time": "2025-02-11T13:45:30",
"upload_time_iso_8601": "2025-02-11T13:45:30.816396Z",
"url": "https://files.pythonhosted.org/packages/09/3e/c17557e69162a2c178b222cbf00cd08e14e6124455cc99cdbf8ad7caf967/pyadb_client-2.1.7-cp37-abi3-manylinux_2_39_x86_64.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": null,
"digests": {
"blake2b_256": "35660fb342740f5fc67e8241875f09b2a3cc1e889a634e814a6054cc6149f522",
"md5": "24452905f9db50d10e525b6629eb2499",
"sha256": "2d72afc8fda970d64df08870e00f7fe0cd403fe5e3e6d16fd12cddc36e1e86dd"
},
"downloads": -1,
"filename": "pyadb_client-2.1.7.tar.gz",
"has_sig": false,
"md5_digest": "24452905f9db50d10e525b6629eb2499",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.7",
"size": 62151,
"upload_time": "2025-02-11T13:45:32",
"upload_time_iso_8601": "2025-02-11T13:45:32.244987Z",
"url": "https://files.pythonhosted.org/packages/35/66/0fb342740f5fc67e8241875f09b2a3cc1e889a634e814a6054cc6149f522/pyadb_client-2.1.7.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2025-02-11 13:45:32",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "cocool97",
"github_project": "adb_client",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"lcname": "pyadb-client"
}