# pyadb_client
Python library to communicate with ADB devices. Built on top of Rust `adb_client` library.
## Examples
### Use ADB server
```python
server = pyadb_client.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
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 dependencies
pip install -e .
# Build development package
maturin develop
# Build release Python package
maturin build --release
# Publish Python package
```
Raw data
{
"_id": null,
"home_page": "https://github.com/cocool97/adb_client",
"name": "pyadb-client",
"maintainer": null,
"docs_url": null,
"requires_python": null,
"maintainer_email": null,
"keywords": "adb, android, tcp, usb",
"author": "Corentin LIAUD",
"author_email": null,
"download_url": null,
"platform": null,
"description": "# pyadb_client\n\nPython library to communicate with ADB devices. Built on top of Rust `adb_client` library.\n\n## Examples\n\n### Use ADB server\n\n```python\nserver = pyadb_client.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\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 dependencies\npip install -e .\n\n# Build development package\nmaturin develop\n\n# Build release Python package\nmaturin build --release\n\n# Publish Python package\n```\n",
"bugtrack_url": null,
"license": "MIT",
"summary": "Python wrapper for adb_client library",
"version": "2.1.2",
"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": "7395967c18f3717e3cde25f031702f57f407c2f0b5844a78199acc62f2fd51ac",
"md5": "5d3028eb788acf64959526ca2b113adc",
"sha256": "544f91435eb812ee32dbefc30a004ff0b731c85a978d897c29400ee9b4d0339e"
},
"downloads": -1,
"filename": "pyadb_client-2.1.2-cp312-cp312-manylinux_2_39_x86_64.whl",
"has_sig": false,
"md5_digest": "5d3028eb788acf64959526ca2b113adc",
"packagetype": "bdist_wheel",
"python_version": "cp312",
"requires_python": null,
"size": 911697,
"upload_time": "2025-01-22T14:59:48",
"upload_time_iso_8601": "2025-01-22T14:59:48.633999Z",
"url": "https://files.pythonhosted.org/packages/73/95/967c18f3717e3cde25f031702f57f407c2f0b5844a78199acc62f2fd51ac/pyadb_client-2.1.2-cp312-cp312-manylinux_2_39_x86_64.whl",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2025-01-22 14:59:48",
"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"
}