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

Uploaded Python 3

File details

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

File metadata

  • Download URL: mumuipc_py-0.0.2.tar.gz
  • Upload date:
  • Size: 15.8 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.2.tar.gz
Algorithm Hash digest
SHA256 449b1807870223d655719f08815aa2b40ef8b9dcc2b0d1c0cdab76676e57951d
MD5 bf27e0e89ebe8e8f377ac245db0662de
BLAKE2b-256 b66b270df655e8b4a70a3fad9d151e568f560da3f32ce3e1539f6a07e7849486

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: mumuipc_py-0.0.2-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.12.9

File hashes

Hashes for mumuipc_py-0.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 91f624c32407572a5a4ede2f1d49b8424be29dbd6660d69937c82de85325dec2
MD5 56f2cb5868dc3599e130e1b46297114b
BLAKE2b-256 a5ae15c259173eeea5d50681196c5ddeb524563ccda93f64039e34e8a612b606

See more details on using hashes here.

Provenance

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