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

Uploaded Python 3Windows x86-64

amalgam_lang-30.0.0-py3-none-manylinux_2_29_x86_64.whl (63.3 MB view details)

Uploaded Python 3manylinux: glibc 2.29+ x86-64

amalgam_lang-30.0.0-py3-none-manylinux_2_29_aarch64.whl (6.6 MB view details)

Uploaded Python 3manylinux: glibc 2.29+ ARM64

amalgam_lang-30.0.0-py3-none-manylinux_2_28_x86_64.whl (63.5 MB view details)

Uploaded Python 3manylinux: glibc 2.28+ x86-64

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

Uploaded Python 3macOS 12.0+ ARM64

amalgam_lang-30.0.0-py3-none-any.whl (79.3 MB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: amalgam_lang-30.0.0.tar.gz
  • Upload date:
  • Size: 78.9 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.0.0.tar.gz
Algorithm Hash digest
SHA256 b23f2f8fc6752cc675d0e2dd787667d343a5cf00469bac06e626dc1834f43c5f
MD5 37577a5fb2e4f869e14f08cc17365c37
BLAKE2b-256 f9e6048013120e6c7392f6a36074e2fff4309f5deb5299a5ade8833194a0e73c

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for amalgam_lang-30.0.0-py3-none-win_amd64.whl
Algorithm Hash digest
SHA256 d6382919762b86df54fafe7f4c0c26c47441eafbbd293e9d41bd8e1f66d5cfb6
MD5 e813e047d92732248768dab0cf5d78f5
BLAKE2b-256 a7ac4e2578c6455cc030ffa7836ec6f43d4669dd54dda40d97dc2f01b93e56d8

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for amalgam_lang-30.0.0-py3-none-manylinux_2_29_x86_64.whl
Algorithm Hash digest
SHA256 ce34e0987f9c7b4081de2c0c481c7cd5f51af804e6619992aebe12cc0fd5d54f
MD5 742cb2526f8e91e00157940357daa14b
BLAKE2b-256 0bf26c47ab5bf044f055b6f14fc3e61a6c07a6fee94752f099ebb7bed91e10d1

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for amalgam_lang-30.0.0-py3-none-manylinux_2_29_aarch64.whl
Algorithm Hash digest
SHA256 6cfd74316b28a15ad67db1af29beb37332e0127f23d9ffc2acc183bc4f752766
MD5 1565bdd20a3d3aef1790edfaf73bf522
BLAKE2b-256 251020c661afb08c2074684c48753c62053db74630a6d9557c6389ee3247872e

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for amalgam_lang-30.0.0-py3-none-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 dd8c33bf4f5f89ff53042929cdd935f50b95b8c5c56720cbed8514396149f8ce
MD5 eb6f18abd20cdc379d907734c02bbe0e
BLAKE2b-256 539b2b3ec34e195fda4fafe804326f32d1aa276009c43baa7b4945a9b6b91ed2

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for amalgam_lang-30.0.0-py3-none-macosx_12_0_arm64.whl
Algorithm Hash digest
SHA256 6fff88450b8013aaec45bc8e05beeab886f91176063a3a9b554bd2b0437807b2
MD5 41b9ffe125d9551d63b10e1dceec9272
BLAKE2b-256 1820c4a247f17ffa26eeef7514cd5dad45d39ea88ba873a7b62d05cbc035462e

See more details on using hashes here.

File details

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

File metadata

  • Download URL: amalgam_lang-30.0.0-py3-none-any.whl
  • Upload date:
  • Size: 79.3 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.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 7fdc6c73f0fb67144e2068fbd51c0e1d59642155fccf4dca99e6b54396f13c6c
MD5 f2c58f11075e2757bc56980e76a003ff
BLAKE2b-256 6b273dadb70fda7b9b53c7e4fb844880f4fbfe5daae42c98603d45a1ace8d774

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