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

Uploaded Python 3Windows x86-64

amalgam_lang-28.0.0-py3-none-manylinux_2_29_x86_64.whl (64.5 MB view details)

Uploaded Python 3manylinux: glibc 2.29+ x86-64

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

Uploaded Python 3manylinux: glibc 2.29+ ARM64

amalgam_lang-28.0.0-py3-none-manylinux_2_28_x86_64.whl (64.6 MB view details)

Uploaded Python 3manylinux: glibc 2.28+ x86-64

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

Uploaded Python 3macOS 12.0+ ARM64

amalgam_lang-28.0.0-py3-none-any.whl (80.6 MB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for amalgam_lang-28.0.0.tar.gz
Algorithm Hash digest
SHA256 a18c9d8ac2a1124ffe45f5d15b81cfac68ef44f9fbf2ce8033f46a396d1c2d0b
MD5 03357750c0b94d752fb79310f4d24ef8
BLAKE2b-256 41fea289e7fa2c9dc0ad4b85d0dd8e1b76e8983fc20274fab66a1089c060faf0

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for amalgam_lang-28.0.0-py3-none-win_amd64.whl
Algorithm Hash digest
SHA256 0746218018bc92efb95321765c60fc12b6c9ad204db5b79ddc8631ac68074337
MD5 96d513cfcfc93b8bfd54a92d652cb2e3
BLAKE2b-256 6133d2cd9c157077558b8e3c33b37df7157765c89001f7b2a16c4d01c51d44a2

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for amalgam_lang-28.0.0-py3-none-manylinux_2_29_x86_64.whl
Algorithm Hash digest
SHA256 bb5520c5c47886dfa9181e8709c46ac2c2008dfe92fac9fe5bbd1b885f90b368
MD5 8abee113d5fb1dc4318e150da5f409fa
BLAKE2b-256 a9a5b57f75b2fcd1e8d5475afefda5d465f7612cb15fe750110282d17ea31aa8

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for amalgam_lang-28.0.0-py3-none-manylinux_2_29_aarch64.whl
Algorithm Hash digest
SHA256 453e3280315c5417aa6ee78eb0d92806850c1d6a8003af1658ffc3713ed571ff
MD5 4d24042f7a67855a062b4d3f84ca1bf5
BLAKE2b-256 c5cf5bbab7cbdfa1af4e1656470a37f4522392975c9573a3f1358cbf9c4f7dc4

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for amalgam_lang-28.0.0-py3-none-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 556e9b0a0992ffd7f4c35520d33da278d63b605a46725c4ac9709f4dc18e7b3a
MD5 cb81490548c518625d2db5e3295a714e
BLAKE2b-256 2a92748a526ee029fd6f70af920cfe651f8143578f688597c1012282b91494a4

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for amalgam_lang-28.0.0-py3-none-macosx_12_0_arm64.whl
Algorithm Hash digest
SHA256 3d86c8e819d5b0e1159d9500c5ff2bacb246d2720af8538616dbca7032e1c561
MD5 629e86b8ee80dd9aaef3c4f79cc00c20
BLAKE2b-256 f478910a9f19cda4eb74ff821544d0af8036de08e2a09e759a0de2c617cf1094

See more details on using hashes here.

File details

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

File metadata

  • Download URL: amalgam_lang-28.0.0-py3-none-any.whl
  • Upload date:
  • Size: 80.6 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-28.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 27bef01e797d66714372b7407eced11a9ecab97be1d573a84affee961b53181d
MD5 cc2c25d0c6359408560bb59545da5045
BLAKE2b-256 1595c959882fc4e2d6903f49c04a37ac922af7289d99d27c7f044551e41ff3bf

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