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

Uploaded Python 3Windows x86-64

amalgam_lang-29.0.1-py3-none-manylinux_2_29_x86_64.whl (63.1 MB view details)

Uploaded Python 3manylinux: glibc 2.29+ x86-64

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

Uploaded Python 3manylinux: glibc 2.29+ ARM64

amalgam_lang-29.0.1-py3-none-manylinux_2_28_x86_64.whl (63.3 MB view details)

Uploaded Python 3manylinux: glibc 2.28+ x86-64

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

Uploaded Python 3macOS 12.0+ ARM64

amalgam_lang-29.0.1-py3-none-any.whl (79.1 MB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for amalgam_lang-29.0.1.tar.gz
Algorithm Hash digest
SHA256 f5f8aa254a3c47a0e9017993edbcef37e31acc5c40040930a384c1e07ad12743
MD5 e6740e2496801d1a7d6731b1548dcf27
BLAKE2b-256 42b80c6bce1f176fab104c78607b63d794e9fed9cacf0abfad2c857b314a2b99

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for amalgam_lang-29.0.1-py3-none-win_amd64.whl
Algorithm Hash digest
SHA256 164b65b00d682fcbbd51405d5e5494c0db0237fc01d5624eb18d44090bedf769
MD5 f0f589420753e2575f61f93552f33b1b
BLAKE2b-256 3844636a54b1dad6f9740f32f4180b217bd01b9c5f603a3bd3e5005d395ee263

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for amalgam_lang-29.0.1-py3-none-manylinux_2_29_x86_64.whl
Algorithm Hash digest
SHA256 28e3910111434b457f17e4f467a88bd310ccdff4a84e2a356466b44b043057fe
MD5 399a03e737e8eeddefc62bc51bf5b055
BLAKE2b-256 d5ac092d485f1bd4952974cdae5e86fd5a690d3bd60ddc0d9256edf5ce9f815c

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for amalgam_lang-29.0.1-py3-none-manylinux_2_29_aarch64.whl
Algorithm Hash digest
SHA256 a75f0ba75195e22673fdb21f0eb31fcc89ef003932b851469c31c1438a2ecf97
MD5 cdc21ef3de5f931f0d51b0c40362c0d7
BLAKE2b-256 ac5d3022e1b68cdbb560453bf95420233f906c9cabf83310cbfc9b15ec16b0c2

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for amalgam_lang-29.0.1-py3-none-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 ac91f0e846a967c9a6dced42d4124b93ce1f0a69e94e3fb9d9c5a78bab05720a
MD5 568487fb18b1d1ed402c3206b65cf66e
BLAKE2b-256 0fbff882f932d867740cf652743eccd4ba4f1c76ac665ae387758c364a952821

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for amalgam_lang-29.0.1-py3-none-macosx_12_0_arm64.whl
Algorithm Hash digest
SHA256 198dd2931842504dbd50bec0af896cfd852723f9abf96477427159de8c266f7c
MD5 935c274a62d520af3ef31f6cd18377ba
BLAKE2b-256 29c9a6397286ce77545e2e25e20877358703ecb7efc520519e3b95dcf7b9d451

See more details on using hashes here.

File details

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

File metadata

  • Download URL: amalgam_lang-29.0.1-py3-none-any.whl
  • Upload date:
  • Size: 79.1 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-29.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 0788e49e7af601bac7adfe829394859dded108c6dc5275147481e605de506aac
MD5 2c9d1c996aa4ee334f08d59ae35be1b2
BLAKE2b-256 396643c949e7f6f9d24ccc26ce4045f03a8ba5a47dc488bd6e5776b372af47d9

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