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

Uploaded Python 3Windows x86-64

amalgam_lang-30.1.0-py3-none-manylinux_2_29_x86_64.whl (63.6 MB view details)

Uploaded Python 3manylinux: glibc 2.29+ x86-64

amalgam_lang-30.1.0-py3-none-manylinux_2_29_aarch64.whl (6.7 MB view details)

Uploaded Python 3manylinux: glibc 2.29+ ARM64

amalgam_lang-30.1.0-py3-none-manylinux_2_28_x86_64.whl (63.8 MB view details)

Uploaded Python 3manylinux: glibc 2.28+ x86-64

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

Uploaded Python 3macOS 12.0+ ARM64

amalgam_lang-30.1.0-py3-none-any.whl (79.6 MB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: amalgam_lang-30.1.0.tar.gz
  • Upload date:
  • Size: 79.3 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.1.0.tar.gz
Algorithm Hash digest
SHA256 7c01a69bdeb160394aa44bd6ebd17321e6ab29e20ef6a93de630446cdd69a3a8
MD5 6aaf8effecbc336317ea029d314144cc
BLAKE2b-256 a2302daaf78079eac63eee839adb51868e37601b94aaebe1b5ff0e2343472207

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for amalgam_lang-30.1.0-py3-none-win_amd64.whl
Algorithm Hash digest
SHA256 0aa080382d24c7ddc0c2023fb61d9048c0e252f0cc814f426e90353ee21e0d52
MD5 528c35325a7c697f291203de3473ba85
BLAKE2b-256 83e1af66e41e22b1f6c37e8dbc67dac4aaf829ef58d83a27a0d0be170c0274d1

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for amalgam_lang-30.1.0-py3-none-manylinux_2_29_x86_64.whl
Algorithm Hash digest
SHA256 598dc4e1c670951c6c2729f4e4d17bfd107e7fe31db5233e1b9ae171708746aa
MD5 d18cd8a7022b56cbd6ebd71d823b8f81
BLAKE2b-256 8b70399c8dba77da2125ac7e78a25f18d105969676b18e89fa04c06aa4b782d7

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for amalgam_lang-30.1.0-py3-none-manylinux_2_29_aarch64.whl
Algorithm Hash digest
SHA256 4558ebd6a3257aacc5977696f30f13922ebc8aaf95199ca459d9ec02f02b1d67
MD5 7c67d4b4d9281b19dae837539d8ad421
BLAKE2b-256 8a75b3d512555bc83e28733de23e78a9d67c2be6776e54655dab039e4b8015e8

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for amalgam_lang-30.1.0-py3-none-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 2f52b24b10d90a031acf706a8a5260fb9976bc1ac7cd79be482263c9db432a94
MD5 5d062ef1019c48ec7e0aa51d1e2fb81d
BLAKE2b-256 04282d29f996e2aa3ab08aee99aa0a94fecf9d0ebd18e28ecc45d3605c507a3d

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for amalgam_lang-30.1.0-py3-none-macosx_12_0_arm64.whl
Algorithm Hash digest
SHA256 da9bd2c240826770e4f9c3295d0296c0706ce38a3ca5096c5e4f2c739f605b77
MD5 cbe589dd6b23ac44e85adcdd2d40a6f9
BLAKE2b-256 7e9465beab2e43031997cb2de3fd54d02e583c238191b9c1714630e480f56889

See more details on using hashes here.

File details

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

File metadata

  • Download URL: amalgam_lang-30.1.0-py3-none-any.whl
  • Upload date:
  • Size: 79.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-30.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 1c3f298512379930f2b008151b8560304819be829a6740af4d99e658e02538eb
MD5 79cf9b589a0c2d599f603bca1b5c3ef9
BLAKE2b-256 2a281380d76678a32c4c3ef201c3bcdec9ae15719e8254b0f943f965fa91174b

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