Skip to main content

emodeconnection

Python interface for EMode, a photonics simulation platform for waveguide mode solving, propagation, and analysis.

Requirements

Installation

pip install emodeconnection

Quick Start

import emodeconnection as emc

# Open the EMode login window (only required on first use)
emc.EModeLogin()

## Connect and initialize EMode
em = emc.EMode(save = False)

## Draw shapes
em.shape(name = 'BOX', material = 'SiO2', height = 800)
em.shape(name = 'core', material = 'Si', width = 600, height = 400)

## Run FDM, display results, and close
em.FDM()
em.report()
em.close()

Features

  • Simple Python API for EMode simulation sessions
  • Automatic login and license management
  • Cross-platform: Windows, macOS, Linux
  • Command-line installer via emode-install

Installing EMode

The emodeconnection package includes a command-line tool to download and install the EMode executable:

emode-install

Options

emode-install                            # Install latest version
emode-install --help                     # Show all options
emode-install --list-versions            # Show available versions
emode-install --update                   # Update to the latest version
emode-install --update --version 0.2.5   # Switch to a specific version
emode-install --version 0.2.5            # Install a specific version
emode-install --install-dir /opt/bin     # Custom install directory
emode-install --uninstall                # Remove EMode
emode-install --uninstall --install-dir /opt/bin  # Remove from custom location

Environment variables

Variable Description
EMODE_EULA_ACCEPTED=1 Accept the EULA non-interactively (CI/headless)
EMODE_EMAIL Pre-fill login email
EMODE_PASSWORD Pre-fill password (use with caution)
EMODE_INTERACTIVE=1 Use interactive installer GUI
UNINSTALL_EMODE=y Accept the uninstallation non-interactively

Wire protocol

emodeconnection talks to the EMode executable over a local socket. Each message is a 4-byte big-endian length followed by that many bytes of UTF-8 JSON. A NumPy array travels as {"__ndarray__": <base64>, "dtype", "shape"}, and a result object (such as SMatrix) carries its class name in __data_type__.

Every dictionary reply from EMode is stamped with the protocol version, "__version__": 1. A reply without the stamp is a plain value (a number, a string, a list, an array or None) and is returned unchanged. A reply stamped with any version other than 1 comes from a newer protocol than this client reads, and raises an EModeError asking you to upgrade emodeconnection.

Documentation

Full documentation is available at docs.emodephotonix.com.

License

See LICENSE for details.

Metadata

Release files for emodeconnection 1.1.24

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for emodeconnection 1.1.24
File Size Uploaded Provenance Actions
emodeconnection-1.1.24.tar.gz 126.4 kB With provenance Details for emodeconnection-1.1.24.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for emodeconnection 1.1.24
File Interpreter ABI Platform Actions
emodeconnection-1.1.24-py3-none-any.whl Python 3 none any Details for emodeconnection-1.1.24-py3-none-any.whl

Total release size: 198.1 kB

Release files / emodeconnection-1.1.24.tar.gz

Download URL emodeconnection-1.1.24.tar.gz
Size 126.4 kB
Tags Source
SHA-256 checksum
How to use checksums
5735a8906c6fe450abba31b6a7255d6235d7e81b37ae489a81c0c057cf0def75
BLAKE2b-256 checksum
How to use checksums
7a316bb27f797f387b1749af9b272c2603cdddc997a8153cc948bd45707a7e8c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 28, 2026.

Transparency log

Release files / emodeconnection-1.1.24-py3-none-any.whl

Download URL emodeconnection-1.1.24-py3-none-any.whl
Size 71.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
0c0fa753c8b328ca6b142decec293332c6e1934ec843f2171a5f0de67078a287
BLAKE2b-256 checksum
How to use checksums
cb078ca48e88632523583a881e85d7652f7b9f6450de304dd69c4e02e607f847
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 28, 2026.

Transparency log

Security for emodeconnection 1.1.24

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

All 2 files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for emodeconnection-1.1.24.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 28, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

1.1.24 This release

2 release files Full provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page