Python Scrcpy Client
Introduction to pyscrcpy: A Python Library for scrcpy
Introduction
pyscrcpy is an innovative Python library designed to simplify and streamline the integration of scrcpy into your Python projects. Scrcpy, a versatile screen mirroring tool for Android devices, gains a new level of accessibility through the seamless capabilities provided by pyscrcpy.
Key Features
- Easy Integration: With pyscrcpy, incorporating scrcpy functionality into your Python scripts becomes a straightforward process. The library abstracts away the complexities, allowing you to focus on leveraging scrcpy's powerful features without the need for intricate setup.
- Enhanced Control: pyscrcpy empowers developers to exert precise control over Android devices from within their Python applications. Whether it's automating UI interactions, conducting tests, or creating custom applications, pyscrcpy provides a convenient interface for managing scrcpy commands.
- Customization Options: Tailor scrcpy behavior to suit your project's requirements using the customizable options provided by pyscrcpy. Fine-tune parameters such as display size, bit rate, and more, all while maintaining the simplicity of Python scripting.
Demo
import cv2 as cv
from pyscrcpy import Client # import scrcpy client
def on_frame(client, frame):
client.control.text("123")
cv.imshow('Video', frame)
cv.waitKey(1)
if __name__ == '__main__':
client = Client(max_fps=1, max_size=900)
client.on_frame(on_frame)
client.start()
import cv2 as cv
from pyscrcpy import Client
def on_frame(client, frame):
cv.imshow('Video', frame)
cv.waitKey(1)
if __name__ == '__main__':
client = Client(max_fps=20)
client.start(threaded=True) # create a new thread for scrcpy
while 1:
if client.last_frame is None:
continue
on_frame(client, client.last_frame)
Reference & Appreciation
- Fork: S1M0N38/scrcpy (don't support python3.11)
- Fork: py-scrcpy-client
- Core: scrcpy
- Idea: py-android-viewer (many bugs)
- CI: index.py
Metadata
Release files for pyscrcpy 1.0.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| pyscrcpy-1.0.1.tar.gz | 49.8 kB | Without provenance | Details for pyscrcpy-1.0.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| pyscrcpy-1.0.1-py3-none-any.whl | Python 3 | none | any | Details for pyscrcpy-1.0.1-py3-none-any.whl |
Total release size: 98.8 kB
Release files / pyscrcpy-1.0.1.tar.gz
| Download URL | pyscrcpy-1.0.1.tar.gz |
|---|---|
| Size | 49.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
b4a9f09cd740d575020b248456c1dededd7152978a2671bf435b9c117c265289
|
|
BLAKE2b-256 checksum How to use checksums |
c71816471191edda4031ccbd8e2b6022c2d53823dd4f04b5243e8037cb035a69
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.11.4
|
Release files / pyscrcpy-1.0.1-py3-none-any.whl
| Download URL | pyscrcpy-1.0.1-py3-none-any.whl |
|---|---|
| Size | 49.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
d221e88d608872b78edb486cf1dcc4438e0c3dab39cc942ad03866229bc8d89a
|
|
BLAKE2b-256 checksum How to use checksums |
e8954cd21e033f2105eef0d5b3102bbb4b0c76726dcd683df01effd50cdb37dd
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.11.4
|
Security for pyscrcpy 1.0.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.