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-29.0.0.tar.gz (80.4 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-29.0.0-py3-none-win_amd64.whl (5.5 MB view details)

Uploaded Python 3Windows x86-64

amalgam_lang-29.0.0-py3-none-manylinux_2_29_x86_64.whl (64.7 MB view details)

Uploaded Python 3manylinux: glibc 2.29+ x86-64

amalgam_lang-29.0.0-py3-none-manylinux_2_29_aarch64.whl (6.8 MB view details)

Uploaded Python 3manylinux: glibc 2.29+ ARM64

amalgam_lang-29.0.0-py3-none-manylinux_2_28_x86_64.whl (64.9 MB view details)

Uploaded Python 3manylinux: glibc 2.28+ x86-64

amalgam_lang-29.0.0-py3-none-macosx_12_0_arm64.whl (3.9 MB view details)

Uploaded Python 3macOS 12.0+ ARM64

amalgam_lang-29.0.0-py3-none-any.whl (80.8 MB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for amalgam_lang-29.0.0.tar.gz
Algorithm Hash digest
SHA256 b814f2a64f0213f6e2bbdb0de72c0c219c8eb9b93a57f991a43dab712bdf29af
MD5 6ad175b8c2182fcb5a2bd4e80d1c6f97
BLAKE2b-256 4bb6252eed86e3365a3fdc025f5fcd60ef83f166aab6713b50911d139eb20b79

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for amalgam_lang-29.0.0-py3-none-win_amd64.whl
Algorithm Hash digest
SHA256 9d08c7927811b533d4309cc25e6bf07d9254cdc866357bc37a907bc1fb3a323e
MD5 7bc096f8a45891c7c461e3310ff6e712
BLAKE2b-256 895a4322ccac4dfc974f1dc95c99a68c43fdc10600701e88d36ff33504460b6b

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for amalgam_lang-29.0.0-py3-none-manylinux_2_29_x86_64.whl
Algorithm Hash digest
SHA256 84d85da9736a699ffa328411713ecd8ec1018dab403a9ace54bc69515e30cb82
MD5 d344c6dded6043f9e7ebd7ffb4da0cde
BLAKE2b-256 3a723fa73db8d3d969466e34dc0884d6cfe0aa46c3e58da038447ca45254b2c1

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for amalgam_lang-29.0.0-py3-none-manylinux_2_29_aarch64.whl
Algorithm Hash digest
SHA256 4b15271e315f707d5590a23130480c4c55d27bd404f02653c6f9a64d119d2395
MD5 30df61e655be67face0f2899a97972d1
BLAKE2b-256 e04de6a86fd5861600a6b51e6e55a6a2317fe18f34f2d85d713a8cf84263bdd0

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for amalgam_lang-29.0.0-py3-none-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 4eea58103e6934fae7517840291a18e6419a71bf93fe9e90cf7793b235bf8d7f
MD5 e2de27fe694cdf95ee0f85e103a99f97
BLAKE2b-256 44dc54e8966dc62fe4045bbb53505b327483b22b1322850774452976e1645fe0

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for amalgam_lang-29.0.0-py3-none-macosx_12_0_arm64.whl
Algorithm Hash digest
SHA256 eb677770a4bad40a88534a18598c93c3b064a82d071738f89da71e78a3307d3f
MD5 c864f3449f9b5663d3cd70e3ad0a1ba3
BLAKE2b-256 b3e14a8fe3db2ab59cda3758ba561acf979601f035a57cbed76441716528d9e4

See more details on using hashes here.

File details

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

File metadata

  • Download URL: amalgam_lang-29.0.0-py3-none-any.whl
  • Upload date:
  • Size: 80.8 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-29.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 96a3f59faa36f8de329f0c3b520f90a974e029e237dfeecae62d45d36b702110
MD5 13e6bfde63e26f4d84188b4c3dd9adb4
BLAKE2b-256 6651142e8cb355793b146367ba45eab064dd44b18f44ac56ef424952141fa5f3

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