Skip to main content

Type stubs for the 3DEqualizer4 Python module tde4.

Project description

types-tde4

types-tde4

License Version Related Python GitHub

This package contains stubs with Waterloo Docstrings for the tde4 module from 3DE4's Python API.

It is useful when writing 3DE4 scripts outside the embedded 3DE4 Python editor, for example in VS Code. After installation, language servers such as Pylance can use the stubs to provide function signatures, type information, auto-completion, and inline documentation for tde4 API calls.

The package does not provide a runtime implementation of tde4. Scripts still have to run inside 3DEqualizer4, or in an environment where 3DEqualizer4 provides the extension module.

Use Cases

Static Type Checking with mypy

Once the package is installed, type annotations can be validated with a static type checker. Consider the following correctly annotated test script:

from __future__ import annotations

import tde4

def create_ref_camera() -> tde4.CameraID_t:
    return tde4.createCamera("REF_FRAME")

def camera_type(camera_id: tde4.CameraID_t) -> tde4.CameraType_t:
    return tde4.getCameraType(camera_id)

def maybe_current_camera_type() -> tde4.CameraType_t | None:
    camera_id = tde4.getCurrentCamera()
    if camera_id is None:
        return None
    return camera_type(camera_id)

Without types-tde4 installed in the Python environment used by mypy, the check fails because mypy cannot find stubs for the extension module:

/.../test_types_tde4_simplified.py:3: error: Cannot find implementation or library stub for module named "tde4"  [import-not-found]
/.../test_types_tde4_simplified.py:3: note: See https://mypy.readthedocs.io/en/stable/running_mypy.html#missing-imports
Found 1 error in 1 file (checked 1 source file)

After installing types-tde4 into that same Python environment, mypy can resolve the tde4 stubs automatically:

Success: no issues found in 1 source file

VS Code / Pylance

With types-tde4 installed, Pylance in VS Code can find signatures and docstrings for functions in tde4. Tooltip rendering is not perfect because the Waterloo Docstring format is not yet supported by Pylance.

types-tde4

Installation

pip install types-tde4

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

types_tde4-0.1.12.tar.gz (126.8 kB view details)

Uploaded Source

Built Distribution

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

types_tde4-0.1.12-py3-none-any.whl (126.7 kB view details)

Uploaded Python 3

File details

Details for the file types_tde4-0.1.12.tar.gz.

File metadata

  • Download URL: types_tde4-0.1.12.tar.gz
  • Upload date:
  • Size: 126.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for types_tde4-0.1.12.tar.gz
Algorithm Hash digest
SHA256 87acb25f2a0227a033d4d0a98fd10c4fa1e81efb8ee84fd235b4b0f10a2b72c1
MD5 6b87c73bc0018837febd25b948169852
BLAKE2b-256 82c157a1d6f52e32a2235ed9b990794fe875fa5b33ce17a3db594d70a0a5836e

See more details on using hashes here.

Provenance

The following attestation bundles were made for types_tde4-0.1.12.tar.gz:

Publisher: publish_pypi.yaml on uwe-at-sdv/types-tde4

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

File details

Details for the file types_tde4-0.1.12-py3-none-any.whl.

File metadata

  • Download URL: types_tde4-0.1.12-py3-none-any.whl
  • Upload date:
  • Size: 126.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for types_tde4-0.1.12-py3-none-any.whl
Algorithm Hash digest
SHA256 8a82ec20cf60811eca7b71fbfe04dad906b22a76a4c1ae1d1d760694319e3cb9
MD5 83ffc2118e3084ea2fb8d0b6a2e48edc
BLAKE2b-256 20f710026dd2700a35e4f768f25cd834708c4bae43fbf10e677a89b5ae8710a7

See more details on using hashes here.

Provenance

The following attestation bundles were made for types_tde4-0.1.12-py3-none-any.whl:

Publisher: publish_pypi.yaml on uwe-at-sdv/types-tde4

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