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-27.2.0.tar.gz (68.8 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-27.2.0-py3-none-win_amd64.whl (5.0 MB view details)

Uploaded Python 3Windows x86-64

amalgam_lang-27.2.0-py3-none-manylinux_2_29_x86_64.whl (54.6 MB view details)

Uploaded Python 3manylinux: glibc 2.29+ x86-64

amalgam_lang-27.2.0-py3-none-manylinux_2_29_aarch64.whl (6.1 MB view details)

Uploaded Python 3manylinux: glibc 2.29+ ARM64

amalgam_lang-27.2.0-py3-none-manylinux_2_28_x86_64.whl (54.6 MB view details)

Uploaded Python 3manylinux: glibc 2.28+ x86-64

amalgam_lang-27.2.0-py3-none-macosx_12_0_arm64.whl (3.6 MB view details)

Uploaded Python 3macOS 12.0+ ARM64

amalgam_lang-27.2.0-py3-none-any.whl (69.1 MB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for amalgam_lang-27.2.0.tar.gz
Algorithm Hash digest
SHA256 21c44c09108daa5d3067bc3acc98e6925af48f22636ffa646c2409b97c21827f
MD5 8bb05ca89b1cf21f23352c914f49da98
BLAKE2b-256 5d3aa3b3ad1a361ac4c24720c0c3bb30967248196965f1d7d3e3d645bf3c8b9d

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for amalgam_lang-27.2.0-py3-none-win_amd64.whl
Algorithm Hash digest
SHA256 6ba66687ce0527668996d52b971130f3a793adf3d0246105a8c328d30b762422
MD5 0d2aafa3802b2109038f03f8679abea2
BLAKE2b-256 d22c00222499804db5e89e58ed04fc3a38ec158e56f34f7706ebb7d6a1ba47bd

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for amalgam_lang-27.2.0-py3-none-manylinux_2_29_x86_64.whl
Algorithm Hash digest
SHA256 0deff5dd254ccfddbab7af134946d6a22a8aa1e627c1606783d1454dd4a3dc97
MD5 bc954e0a5b10bc1f4369e9e92717bfdf
BLAKE2b-256 e100a84e3e5f99063694c0e9f9a80fbfe5a286f29cce663b7d3557c4c9306102

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for amalgam_lang-27.2.0-py3-none-manylinux_2_29_aarch64.whl
Algorithm Hash digest
SHA256 b5093ef6b04a09e14ed8b0ba4613dbe457eac42383bb88dfbc23591b3f41bf1b
MD5 21887c00a0b70a25839cda00ffdc7fed
BLAKE2b-256 693eb8920d0cafdbc0db0799341a70179e7d447b7599c4310833cc8eb7919a09

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for amalgam_lang-27.2.0-py3-none-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 a61ae69e3ed673a43339199826d3ff09af9ff94af34bece9f01b9004d0e44ac0
MD5 e6e3f283011ff8e2ae29013105d99c9a
BLAKE2b-256 14c47327afbe3fb862cd3a9ad57f714c3809ba073971436c9fd5883a31d52382

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for amalgam_lang-27.2.0-py3-none-macosx_12_0_arm64.whl
Algorithm Hash digest
SHA256 7eb52ddde030e26f9d5c2e22f42e4c5397add4b22aa5d1c22a37b81422ad6baa
MD5 2738389a33a78e49f78fe4eda30f38e1
BLAKE2b-256 4674b5916db9b7f1e36eeec3ee84487f7e5b83da9fafade8c840e5736b5f8271

See more details on using hashes here.

File details

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

File metadata

  • Download URL: amalgam_lang-27.2.0-py3-none-any.whl
  • Upload date:
  • Size: 69.1 MB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for amalgam_lang-27.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 814a863ffa109ac8628811a3040f15a3191ba3a8cdb0247651c9285bc0311013
MD5 b0f7cd82c26f167181ded82bdb2b6432
BLAKE2b-256 e5ac87978f1eb0deb296239a8b5e5405cbdd6fd99fd0e155fea61aecc2737a2f

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