Skip to main content

A direct interface with Amalgam compiled DLL, dylib, or so.

Project description

Amalgam™

Amalgam™ is a domain specific language (DSL) developed primarily for genetic programming and instance based machine learning, but also for simulation, agent based modeling, data storage and retrieval, the mathematics of probability theory and information theory, and game content and AI. The language format is somewhat LISP-like in that it uses parenthesized list format with prefix notation and is geared toward functional programming, where there is a one-to-one mapping between the code and the corresponding parse tree. The Howso Engine is an example of a program written in Amalgam.

Resources

General Overview

Coding in Amalgam can be done natively as demonstrated in the Amalgam User Guide or through this Amalgam™ Python wrapper. The Python wrapper handles the binaries for the user so the user just needs to worry about the code.

Supported Platforms

Compatible with Python versions: 3.10, 3.11, 3.12, and 3.13.

Operating Systems

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

Install

To install the current release:

pip install amalgam-lang

Usage

This wrapper allows the user to write and execute Amalgam™ code in Python, just like any other Python program. Once the wrapper is imported, the code handles like native Python code as shown below:

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 wrapper handles the Amalgam language binary (so/dll/dylib) automatically for the user, however the default binary can be overridden using the library_path parameter.

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

Testing

There is a Pytest unit test suite located in amalgam/test. The tests in test_standalone.py will only execute if an Amalgam binary is located in the default expected path of amalgam/lib/{os}/{architecture}.

To specify whether test_standalone.py should use single-threaded or multi-threaded Amalgam (assuming the appropriate binary is in the above path), set the AMALGAM_LIBRARY_POSTFIX environment variable to the desired postfix, e.g., -st or -mt.

License

License

Contributing

Contributing

Project details


Release history Release notifications | RSS feed

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-30.1.1.tar.gz (79.5 MB view details)

Uploaded Source

Built Distributions

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

amalgam_lang-30.1.1-py3-none-win_amd64.whl (5.5 MB view details)

Uploaded Python 3Windows x86-64

amalgam_lang-30.1.1-py3-none-manylinux_2_29_x86_64.whl (63.8 MB view details)

Uploaded Python 3manylinux: glibc 2.29+ x86-64

amalgam_lang-30.1.1-py3-none-manylinux_2_29_aarch64.whl (6.7 MB view details)

Uploaded Python 3manylinux: glibc 2.29+ ARM64

amalgam_lang-30.1.1-py3-none-manylinux_2_28_x86_64.whl (63.9 MB view details)

Uploaded Python 3manylinux: glibc 2.28+ x86-64

amalgam_lang-30.1.1-py3-none-macosx_12_0_arm64.whl (4.0 MB view details)

Uploaded Python 3macOS 12.0+ ARM64

amalgam_lang-30.1.1-py3-none-any.whl (79.9 MB view details)

Uploaded Python 3

File details

Details for the file amalgam_lang-30.1.1.tar.gz.

File metadata

  • Download URL: amalgam_lang-30.1.1.tar.gz
  • Upload date:
  • Size: 79.5 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for amalgam_lang-30.1.1.tar.gz
Algorithm Hash digest
SHA256 1ba0b3c588cc7ff9e679c80f92b3fb858cc8573dd5069267d7498a857a862a77
MD5 309ef3989cf33c5b9c36924a159d2576
BLAKE2b-256 89f6fb22d90c0f1afaa8a3bd343a37422fc5dfe97e14f2e99da8ba2571c71e37

See more details on using hashes here.

File details

Details for the file amalgam_lang-30.1.1-py3-none-win_amd64.whl.

File metadata

File hashes

Hashes for amalgam_lang-30.1.1-py3-none-win_amd64.whl
Algorithm Hash digest
SHA256 82b00ca6eececb6837accc5b74fe6221cfffca687c084b3f1eb8124b2dc3e446
MD5 493bab9bf29081ab677f1582e47ad7f1
BLAKE2b-256 f009c2af71cb880ab0c02a3740e3288d21953947d1f359089ca5426de9ae5b43

See more details on using hashes here.

File details

Details for the file amalgam_lang-30.1.1-py3-none-manylinux_2_29_x86_64.whl.

File metadata

File hashes

Hashes for amalgam_lang-30.1.1-py3-none-manylinux_2_29_x86_64.whl
Algorithm Hash digest
SHA256 5fc373ac6bcc9bf3f038e8d7f4bec9c6956b3f8d9ac686690b7165b4deebfbbd
MD5 b7e595ba5b1f3ec2c7f142c97cd63600
BLAKE2b-256 0d7306f4c1abfa61784b049abdb0dda1196fa29c75818d3716ac8c8ad7e5edc5

See more details on using hashes here.

File details

Details for the file amalgam_lang-30.1.1-py3-none-manylinux_2_29_aarch64.whl.

File metadata

File hashes

Hashes for amalgam_lang-30.1.1-py3-none-manylinux_2_29_aarch64.whl
Algorithm Hash digest
SHA256 85493f0b24eca18a6e856e0976eabd57925b0a1f31c54069b6ad83576182ded7
MD5 986d6b1fa7afcabc659b1d48298d7418
BLAKE2b-256 d1caee9802513b2edb1ac02ba3723ebfb027655bdc4f02934a149bd2bea45581

See more details on using hashes here.

File details

Details for the file amalgam_lang-30.1.1-py3-none-manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for amalgam_lang-30.1.1-py3-none-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 980fb9a51c9179fbe932bd70a01bce8413722398a0693dfd821e16951e63ec2c
MD5 e1176c3ffaf5d50051283f8f7594ee78
BLAKE2b-256 d6ed6b2cab23e8090c07ed74e689783ecbcc9f3ea84a235b047f0b3ac3bc00b1

See more details on using hashes here.

File details

Details for the file amalgam_lang-30.1.1-py3-none-macosx_12_0_arm64.whl.

File metadata

File hashes

Hashes for amalgam_lang-30.1.1-py3-none-macosx_12_0_arm64.whl
Algorithm Hash digest
SHA256 ffeb64e49cf343f5fa8c0f68f876880ddde8f95ce36a5f391aa5e3cbf0b919ec
MD5 5cd5372b6c1d86bee30ca69a61362530
BLAKE2b-256 a39e9f280a53e6f3c4340d0c7bbda597baf1f9d0bd707ddd1ef97ebdba0d4e95

See more details on using hashes here.

File details

Details for the file amalgam_lang-30.1.1-py3-none-any.whl.

File metadata

  • Download URL: amalgam_lang-30.1.1-py3-none-any.whl
  • Upload date:
  • Size: 79.9 MB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for amalgam_lang-30.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 8f09a3b754cd8425dcddf8d0e464bf6a8e04de4006f19f340c2c8a4bca9d8498
MD5 148066f94c404b89c3a901e3e42aea8c
BLAKE2b-256 bf920e4664998f3002979c05193345010995c889352914fceb3dd3f848985b94

See more details on using hashes here.

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