A direct interface with Amalgam compiled DLL 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.8, 3.9, 3.10, and 3.11
Operating Systems
OS | x86_64 | arm64 |
---|---|---|
Windows | Yes | No |
Linux | Yes | Yes |
MacOS | Yes | 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")
License
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
Built Distributions
Hashes for amalgam_lang-6.0.0-py3-none-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7ec1fc6aa5c5a8f72a4b6ba4ab1f430a51c0c688581276276b4c993efba41842 |
|
MD5 | 4385dab3006048e333e1b0cb35cef436 |
|
BLAKE2b-256 | 55634975c330c964376f214b311f3f2e138010f34bd74e452850b430e6b5e9d9 |
Hashes for amalgam_lang-6.0.0-py3-none-manylinux_2_29_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 59fe94e18dafaab677de4c206337b76f736bcd494e69b2c9757d8b7b4662ff1e |
|
MD5 | b52ebb5a775b1ee0d232cfce80bd618e |
|
BLAKE2b-256 | 7005767544f6799395f59b91f03664c76359f455c6a9df2c05adf8457c8dfd9e |
Hashes for amalgam_lang-6.0.0-py3-none-manylinux_2_29_aarch64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4a1a62aafeb02e7b81443ac09a80e332df20e74084010c966bdafc8f713cf9e6 |
|
MD5 | 6c3a6739b5eab46d97e9ba57228c0beb |
|
BLAKE2b-256 | 5a8bce7cc0711dd429255f329492cce3bafaa2a65e67bf676a40f57cd2a236c9 |
Hashes for amalgam_lang-6.0.0-py3-none-macosx_12_0_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | a10b29faf78d4fb3f349741474b7b6d0ec126852cd6558f63791c8f2021c344f |
|
MD5 | 58a85b2383a160c0d718f12f85fe9375 |
|
BLAKE2b-256 | d5994430d7f68333d4113fb8142f4a855d14b1cfc7a1d0a4d91b3d2f214cb79a |
Hashes for amalgam_lang-6.0.0-py3-none-macosx_12_0_arm64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 496326c652d8cfda577eb45c0e0201bfff7574203105e47f668a4451c2348a63 |
|
MD5 | c24310513a85f50ae2a39d2098365b91 |
|
BLAKE2b-256 | ffb0d96ddf946b00b886f86617d997219791603944be28247c34688337a8a4f5 |
Hashes for amalgam_lang-6.0.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 93c53ebbc3df48a060cc614dd42505ec3e04ec9c3b8bde9dc9c09b297e615f89 |
|
MD5 | c75d1fc55af11993734da913e98e9fdf |
|
BLAKE2b-256 | 5fc46b94368fdd08e5b7778254539b58363fc9b25855746a379902c37a556861 |