Skip to main content

Python SDK for MumuPlayer IPC.

Project description

mumuipc.py

Python SDK for MumuPlayer IPC.

GitHub Actions Workflow Status Python PyPI version Coverage Status License

Usage

Install the package using pip: pip install mumuipc.py

from pathlib import Path

from PIL import Image
from mumuipc import MuMuPlayer

# Assuming the path and index of the simulator
emu_path = Path(r"C:\Program Files\Netease\MuMuPlayer-12.0")
emu_index = 0

# Create an instance of MuMuPlayer
player = MuMuPlayer(emu_path, emu_index)

# capture screenshots
screenshot = player.ipc_capture_display(0)

if screenshot is not None:
    screenshot_image = Image.fromarray(
        screenshot.reshape(player.resolution[1], player.resolution[0], 4), "RGBA"
    )
    screenshot_image.save("screenshot.png")
    print("Screenshot has been saved as screenshot.png")
else:
    print("Unable to capture screenshots")

# Disconnect the connection from the simulator
player.ipc_disconnect()

Platform

Only Windows is supported?

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

mumuipc_py-0.0.3.tar.gz (18.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

mumuipc_py-0.0.3-py3-none-any.whl (15.9 kB view details)

Uploaded Python 3

File details

Details for the file mumuipc_py-0.0.3.tar.gz.

File metadata

  • Download URL: mumuipc_py-0.0.3.tar.gz
  • Upload date:
  • Size: 18.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for mumuipc_py-0.0.3.tar.gz
Algorithm Hash digest
SHA256 72407499d9d720ccebfd0fed982149d1138db1154bd5d2d3239cd48dab7b3d53
MD5 e9d491634387c094fac77e8d1861b627
BLAKE2b-256 c2a17733a194d2611650829a7b7fa8a28edce3917f5baf3151af12062803f05a

See more details on using hashes here.

Provenance

The following attestation bundles were made for mumuipc_py-0.0.3.tar.gz:

Publisher: package.yml on EvATive7/mumuipc.py

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file mumuipc_py-0.0.3-py3-none-any.whl.

File metadata

  • Download URL: mumuipc_py-0.0.3-py3-none-any.whl
  • Upload date:
  • Size: 15.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for mumuipc_py-0.0.3-py3-none-any.whl
Algorithm Hash digest
SHA256 9cd1137a2786a43cabe85db561c76f50f8873671f2c310ba76e3c5faad720356
MD5 398e4d96c1bfa203ed637cba842cfde3
BLAKE2b-256 b67541c9f1da90457534251d1fb802ea9af8b64a8c5d795e87a2d9655049aaa7

See more details on using hashes here.

Provenance

The following attestation bundles were made for mumuipc_py-0.0.3-py3-none-any.whl:

Publisher: package.yml on EvATive7/mumuipc.py

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

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