Skip to main content

adb and scrcpy, Android screen monitor and control. Compatible with latest python

Project description

Python Scrcpy Client

scrcpy-badge 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

  1. 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.
  2. 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.
  3. 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

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pyscrcpy-1.0.1.tar.gz (49.8 kB view details)

Uploaded Source

Built Distribution

pyscrcpy-1.0.1-py3-none-any.whl (49.0 kB view details)

Uploaded Python 3

File details

Details for the file pyscrcpy-1.0.1.tar.gz.

File metadata

  • Download URL: pyscrcpy-1.0.1.tar.gz
  • Upload date:
  • Size: 49.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.4

File hashes

Hashes for pyscrcpy-1.0.1.tar.gz
Algorithm Hash digest
SHA256 b4a9f09cd740d575020b248456c1dededd7152978a2671bf435b9c117c265289
MD5 308cc500b8af1460aa80ceca571e90f3
BLAKE2b-256 c71816471191edda4031ccbd8e2b6022c2d53823dd4f04b5243e8037cb035a69

See more details on using hashes here.

File details

Details for the file pyscrcpy-1.0.1-py3-none-any.whl.

File metadata

  • Download URL: pyscrcpy-1.0.1-py3-none-any.whl
  • Upload date:
  • Size: 49.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.4

File hashes

Hashes for pyscrcpy-1.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 d221e88d608872b78edb486cf1dcc4438e0c3dab39cc942ad03866229bc8d89a
MD5 9515a8ddfe72ccf773f5ac48e1011318
BLAKE2b-256 e8954cd21e033f2105eef0d5b3102bbb4b0c76726dcd683df01effd50cdb37dd

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page