semvec/pypi-packages huggingface dataset:
adb-shell 0.4.4
A Python implementation of ADB with shell and FileSync functionality.
Keywords: adb,android

adb\_shell
==========

.. image:: https://travis-ci.com/JeffLIrion/adb_shell.svg?branch=master
   :target: https://travis-ci.com/JeffLIrion/adb_shell

.. image:: https://coveralls.io/repos/github/JeffLIrion/adb_shell/badge.svg?branch=master
   :target: https://coveralls.io/github/JeffLIrion/adb_shell?branch=master

.. image:: https://pepy.tech/badge/adb-shell
   :target: https://pepy.tech/project/adb-shell


Documentation for this package can be found at https://adb-shell.readthedocs.io/.

Prebuilt wheel can be downloaded from `nightly.link <https://nightly.link/JeffLIrion/adb_shell/workflows/python-package/master/wheel.zip>`_.

This Python package implements ADB shell and FileSync functionality.  It originated from `python-adb <https://github.com/google/python-adb>`_.

Installation
------------

.. code-block::

   pip install adb-shell


Async
*****

To utilize the async version of this code, you must install into a Python 3.7+ environment via:

.. code-block::

   pip install adb-shell[async]


USB Support (Experimental)
**************************

To connect to a device via USB, install this package via:

.. code-block::

   pip install adb-shell[usb]


Example Usage
-------------

(Based on `androidtv/adb_manager.py <https://github.com/JeffLIrion/python-androidtv/blob/133063c8d6793a88259af405d6a69ceb301a0ca0/androidtv/adb_manager.py#L67>`_)

.. code-block:: python

   from adb_shell.adb_device import AdbDeviceTcp, AdbDeviceUsb
   from adb_shell.auth.sign_pythonrsa import PythonRSASigner

   # Load the public and private keys
   adbkey = 'path/to/adbkey'
   with open(adbkey) as f:
       priv = f.read()
   with open(adbkey + '.pub') as f:
        pub = f.read()
   signer = PythonRSASigner(pub, priv)

   # Connect
   device1 = AdbDeviceTcp('192.168.0.222', 5555, default_transport_timeout_s=9.)
   device1.connect(rsa_keys=[signer], auth_timeout_s=0.1)

   # Connect via USB (package must be installed via `pip install adb-shell[usb])`
   device2 = AdbDeviceUsb()
   device2.connect(rsa_keys=[signer], auth_timeout_s=0.1)

   # Send a shell command
   response1 = device1.shell('echo TEST1')
   response2 = device2.shell('echo TEST2')


Generate ADB Key Files
**********************

If you need to generate a key, you can do so as follows.

.. code-block:: python

  from adb_shell.auth.keygen import keygen

  keygen('path/to/adbkey')
persist-ext 2.0.0rc0
A JupyterWidget for persisting interactions in cell outputs
Requires Python: >=3.8
Keywords: interactive visualizations,provenance,widget

# persist-ext

[![PyPI - Version](https://img.shields.io/pypi/v/persist-ext.svg)](https://pypi.org/project/persist-ext)
[![PyPI - Python Version](https://img.shields.io/pypi/pyversions/persist-ext.svg)](https://pypi.org/project/persist-ext)

-----

**Table of Contents**

- [Installation](#installation)
- [License](#license)

## Installation

```console
pip install persist-ext
```

## License

`persist-ext` is distributed under the terms of the [MIT](https://spdx.org/licenses/MIT.html) license.
aidios-sdk 0.2
SDK for the Aidios API

######Aidios SDK for Python#######


This SDK for the AIDIOS API, provides an easy to use pyton interface. It allows you to retrieve and store data, get digest information, and confirm data transactions.

#Installation
Using Pip:
pip install aidios_sdk

#Dependencies
requests
json
(note json, and requests will be downloaded when you install aidios_sdk. 'requests' is only used in the example_usage.py


#Usage
#Importing the SDK
First, import the SDK in your Python script:

from aidios_sdk import AidiosAPI


##Initializing the API Client
You can initialize the API client as follows:

api = AidiosAPI()


###Retrieve Data
To retrieve data, use the retrieve method and pass in the data ID:

data_id = "some_data_id"
response = api.retrieve(data_id)
print("Retrieve Response:", response)

####Store Data
Use the store method and pass a file:


with open("path/to/file", "rb") as file:
    file_content = file.read()

data = {"file_content": file_content}
response = api.store(data)
print("Store Response:", response)


#####Get Digest
To get digest information, use the digest method:


data_id = "some_data_id"
response = api.digest(data_id)
print("Digest Response:", response)


######Get Confirmations
Check this number of transactions and associated stats for a given (root)txid:

transaction_id = "some_transaction_id"
response = api.confirmations(transaction_id)
print("Confirmations Response:", response)


#######Example Script
An example script demonstrating these functionalities is included in the examples/ directory.

To run the example:

python examples/example_usage.py

The test script will prompt you to perform each of the functions( store, retrieve, digest and confirmations.


Have fun with aidios!