Skip to main content

A direct interface with Amalgam compiled DLL or so.

Project description

Amalgam™ Wrapper - Python

This Python module allows running programs written in the Amalgam language through the Amalgam dynamic library.

Supported Platforms

Compatible with Python versions: 3.8, 3.9, 3.10, and 3.11

Operating Systems

OS x86_64 arm64
Windows Yes No
Linux Yes Yes
MacOS Yes Yes

Installing

pip install amalgam-lang

Getting Started

from amalgam.api import Amalgam
import json

amlg = Amalgam()
# Load entity .amlg or .caml file
amlg.load_entity("handle_name", "/path/to/file.amlg")
# Execute a label in the loaded entity, passing parameters as JSON
response = amlg.execute_entity_json("handle_name", "label_name", json.dumps({ "abc": 123 }))
result = json.loads(response)

The path to the Amalgam language binary (so/dll/dylib) can be overridden using the library_path parameter.

amlg = Amalgam(library_path="/path/to/amalgam-mt.so")

Development

  1. Install development dependencies pip install -r requirements-dev.in
  2. Run tests: python -m pytest amalgam

License

License

Contributing

Contributing

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

amalgam-lang-2.4.0.tar.gz (27.0 MB view hashes)

Uploaded Source

Built Distributions

amalgam_lang-2.4.0-py3-none-win_amd64.whl (5.4 MB view hashes)

Uploaded Python 3 Windows x86-64

amalgam_lang-2.4.0-py3-none-manylinux_2_29_x86_64.whl (6.2 MB view hashes)

Uploaded Python 3 manylinux: glibc 2.29+ x86-64

amalgam_lang-2.4.0-py3-none-manylinux_2_29_aarch64.whl (6.7 MB view hashes)

Uploaded Python 3 manylinux: glibc 2.29+ ARM64

amalgam_lang-2.4.0-py3-none-macosx_11_0_x86_64.whl (5.2 MB view hashes)

Uploaded Python 3 macOS 11.0+ x86-64

amalgam_lang-2.4.0-py3-none-macosx_11_0_arm64.whl (3.6 MB view hashes)

Uploaded Python 3 macOS 11.0+ ARM64

amalgam_lang-2.4.0-py3-none-any.whl (27.1 MB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page