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-8.0.0-py3-none-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | eed58be38bf02bd609a7551cba8b74ad444a872fac1198f830246615c489a616 |
|
MD5 | 9933fa101cac4c6446effda70d48ee15 |
|
BLAKE2b-256 | 4775eaabb8117004452007b544e1efaf694b906d789943f16ed2822206f67918 |
Hashes for amalgam_lang-8.0.0-py3-none-manylinux_2_29_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6d099c49e49a91fae9093f5e47f7cef17282a61048edb53679fd0f79ad0ff564 |
|
MD5 | c14ccb13b07a91ea5e0e407f5757303f |
|
BLAKE2b-256 | 6a000d197586a0e4798a518af30f8304b26701b98fda344c9e5f598dc49de4c9 |
Hashes for amalgam_lang-8.0.0-py3-none-manylinux_2_29_aarch64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | b443ed80daa341558ab24305a13049877258d9b76210d4e49c3edf0900915834 |
|
MD5 | 16857719af14738d632a09e02948dfc5 |
|
BLAKE2b-256 | b5c48ac0d2862f347b7fdfd4ed04a7830cd50aed13a4e28fbdfaf90b5a11d0f4 |
Hashes for amalgam_lang-8.0.0-py3-none-macosx_12_0_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 10cfd8022ac2f8d1a1fd492ba0b88ab84291f1d5aaaa57230e47fc6daaefce6a |
|
MD5 | 9c5055c70698ae8c28c3cc2208a5d28d |
|
BLAKE2b-256 | 181e51ed47cf19ba032a822273736f2a54acc51392bdb238d7e669c6f0b6c1f5 |
Hashes for amalgam_lang-8.0.0-py3-none-macosx_12_0_arm64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | e7c6c12b8524fc6940033d34fec821d511377286b39db8f42356ea9b89e0433d |
|
MD5 | b1be19744237778082a90875209fe6fc |
|
BLAKE2b-256 | 9444c6e89622a2f332bafdc87e9ad6992df8a72db2188dd397347eb01f3a833f |
Hashes for amalgam_lang-8.0.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 860c103930d5782a37eee3c72b8c472b24c62af4ce7aaa8a6ee1766d4a6117a6 |
|
MD5 | c7f3c227786e5996b9f0207790a22a67 |
|
BLAKE2b-256 | 137fa6e15e4a0c42d57eb4eaa6e0ef6a0f52bd430cf26440ed3304f33a4aec3e |