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.1.tar.gz (15.7 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.1-py3-none-any.whl (15.8 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for mumuipc_py-0.0.1.tar.gz
Algorithm Hash digest
SHA256 df1000f9857f8dd96960a7b407acac9a0e3490e4c252cbf0810e7625e1ec8077
MD5 e1ace2c436f56b336756f131fceee5ac
BLAKE2b-256 4b4ec7ded36d9e4456f86d922687055357e0c90115ab8ea3097fdeda76127088

See more details on using hashes here.

Provenance

The following attestation bundles were made for mumuipc_py-0.0.1.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.1-py3-none-any.whl.

File metadata

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

File hashes

Hashes for mumuipc_py-0.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 a22e151211e526670de540ff3c600132dfaa33b0325e7c785154c68dc154082f
MD5 25638a9243ed43ed64a9976a408dca50
BLAKE2b-256 a2ba882bbd5e8a215a79f568d2a060d8e629af83cd764223b058c6ba5c1bb1ae

See more details on using hashes here.

Provenance

The following attestation bundles were made for mumuipc_py-0.0.1-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