Skip to main content

Python package for unified MMCore access through pymmcore or ZMQ-MMCoreJ + associated utilities

Project description

License PyPI

mmpycorex

This package contains modules for downloading and installing MM through python, and for accessing the Java core of a running micro-manager instance, creating a headless java core object for access through python, or creating and instance of the python wrapper of the core (pymmcore)

Installation

pip install mmpycorex

Programatically installing Micro-Manager

  • Python utility functions for downloading and installing Micro-Manager
from mmpycorex import download_and_install_mm, find_existing_mm_install

# this automatically installs the latest nightly build
# specify destination="your/custom/path", otherwise it will default to 'C:/Program files/Micro-Manager/'
# on windows or the home directory on mac
installed_path = download_and_install_mm()

Accessing the Java core through python

### Java Core example
from mmpycorex import create_core_instance, terminate_core_instances, get_default_install_location

# If micro-manager is alread running, you can get access to the core directly
# (just make sure the "run server" in the tools options dialog is checked)

# Otherwise you must create an instance of the Core in headless mode
mm_location = get_default_install_location() # 'C:/Program files/Micro-Manager/'
config_file = 'MMConfig_demo.cfg'
create_core_instance(mm_location, config_file, python_backend=False) # Create a remote MMCoreJ object

# Now that a core is running (either through the MM App or headless mode), create an object to access it
core = Core()

#### use the core

terminate_core_instances() 

Accessing the python core (pymmcore)

### pymmcore example
from mmpycorex import create_core_instance, terminate_core_instances

# Otherwise you must create an instance of the Core in headless mode
mm_location = get_default_install_location() # 'C:/Program files/Micro-Manager/'
config_file = 'MMConfig_demo.cfg'
create_core_instance(mm_location, config_file, python_backend=True) # Create pymmcore instance

# Now that a core is running (either through the MM App or headless mode), create an object to access it
core = Core()

#### use the core

terminate_core_instances() 

Install issues on M1 Macs

https://github.com/conda-forge/miniforge/issues/165#issuecomment-860233092

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

mmpycorex-0.3.14.tar.gz (9.6 kB view details)

Uploaded Source

Built Distribution

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

mmpycorex-0.3.14-py2.py3-none-any.whl (10.3 kB view details)

Uploaded Python 2Python 3

File details

Details for the file mmpycorex-0.3.14.tar.gz.

File metadata

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

File hashes

Hashes for mmpycorex-0.3.14.tar.gz
Algorithm Hash digest
SHA256 8830b462c19e9e2a59f2629c67988a3f9b9d14455be1d600f34752f4062b8c96
MD5 ad84412d80e770ed132288362c584717
BLAKE2b-256 c27295ea0d5ab0c9ab9aed9d5dd5eac1fb956435e5bb3184a27554b3e5b67ad9

See more details on using hashes here.

Provenance

The following attestation bundles were made for mmpycorex-0.3.14.tar.gz:

Publisher: publish_pypi.yaml on micro-manager/mmpycorex

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

File details

Details for the file mmpycorex-0.3.14-py2.py3-none-any.whl.

File metadata

  • Download URL: mmpycorex-0.3.14-py2.py3-none-any.whl
  • Upload date:
  • Size: 10.3 kB
  • Tags: Python 2, Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for mmpycorex-0.3.14-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 8c59c4b8692430fe9095180505c5c4e74f44fb53a9b3578166f862d016329773
MD5 cd0296e7b49f064e30b99adc02b1e9e4
BLAKE2b-256 e15ea462d79e0bfb8f9a7ebf7c8ca1ff635ece070eb751d82877ddbfac286417

See more details on using hashes here.

Provenance

The following attestation bundles were made for mmpycorex-0.3.14-py2.py3-none-any.whl:

Publisher: publish_pypi.yaml on micro-manager/mmpycorex

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