Skip to main content

A direct interface with Amalgam compiled DLL, dylib, or so.

Project description

Amalgam®

Amalgam® is an LLM-ready, tree-structured language for safe, sandboxed code generation, manipulation, and advanced information-theoretic inference. Unlike traditional languages that prioritize developer shorthand, Amalgam focuses on code-data symmetry and semantic consistency. These properties give it unique strengths in a wide variety of domains, including genetic programming, instance-based machine learning, simulation, agent-based modeling, data storage and retrieval, the mathematics of probability theory and information theory, and game content and AI. This package supports directly calling the language via Python.

Coding in Amalgam can be done natively as demonstrated in the Amalgam User Guide or through this Python wrapper.

Supported Platforms

Compatible with Python versions: 3.11, 3.12, 3.13, and 3.14.

Operating Systems

Binaries are built for the following operating systems, though in theory they could be built for virtually any modern system.

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-34.1.0.tar.gz (82.4 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-34.1.0-py3-none-win_amd64.whl (5.7 MB view details)

Uploaded Python 3Windows x86-64

amalgam_lang-34.1.0-py3-none-manylinux_2_29_x86_64.whl (66.0 MB view details)

Uploaded Python 3manylinux: glibc 2.29+ x86-64

amalgam_lang-34.1.0-py3-none-manylinux_2_29_aarch64.whl (7.0 MB view details)

Uploaded Python 3manylinux: glibc 2.29+ ARM64

amalgam_lang-34.1.0-py3-none-manylinux_2_28_x86_64.whl (66.1 MB view details)

Uploaded Python 3manylinux: glibc 2.28+ x86-64

amalgam_lang-34.1.0-py3-none-macosx_12_0_arm64.whl (4.1 MB view details)

Uploaded Python 3macOS 12.0+ ARM64

amalgam_lang-34.1.0-py3-none-any.whl (82.7 MB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for amalgam_lang-34.1.0.tar.gz
Algorithm Hash digest
SHA256 2ab7fb21a6934f8386abd76d51d56089b20a16d39166efff0f070fb10167058d
MD5 d159470f896cfea2ce325c969ce33dc4
BLAKE2b-256 e0e9591e30ddf8ceeb8f9fc3a93d58010529062fea8373b0c4ac4012e1ac2cd4

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for amalgam_lang-34.1.0-py3-none-win_amd64.whl
Algorithm Hash digest
SHA256 ce659f1d0ec5d7c21eb0c4f68c2630ffa15b4e94212f4c515df1289216d025aa
MD5 6d74938189698e1b1378d5304568f676
BLAKE2b-256 9acdfe65a488183848e11fba29abf5e41b8d2912e30791dd1c026e14c8b56a60

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for amalgam_lang-34.1.0-py3-none-manylinux_2_29_x86_64.whl
Algorithm Hash digest
SHA256 00506e57412330d52f4b5ae9e881bc8f1988b8f92c35618ca44dc3850fb4ffc9
MD5 5c86da18c8a8d0b2ac6dd5147c37e5a8
BLAKE2b-256 69514b68b3ca3def1e24ac629657ec610bbc35e1971a2c53a1e39789a0263b8e

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for amalgam_lang-34.1.0-py3-none-manylinux_2_29_aarch64.whl
Algorithm Hash digest
SHA256 476ed6a35bf6a85b63193d3acef725c6034df6022dd5cbd914022a5496c88bcc
MD5 245173c82747030a99083229b03f6228
BLAKE2b-256 0ecb54be6bc23827f83a673dbd4db57098cc08f2a6a4265f7a777a95615ca99b

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for amalgam_lang-34.1.0-py3-none-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 6eea4e6d07e985fac263d6aa57238802c0dee27967a592d94b787671de91fb44
MD5 ceb7e6e1634fc65e15580092387c1d02
BLAKE2b-256 8b5b817f79f01ceeb010f11936a35d3287aa38233e9ff1690b0e1f569f055fc6

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for amalgam_lang-34.1.0-py3-none-macosx_12_0_arm64.whl
Algorithm Hash digest
SHA256 d715459630c19059e01b009c417593206de4537472bdd74ce1aeab86be727321
MD5 108a3bfad5566076454401d47c461595
BLAKE2b-256 d03fadae3155a3e91649c1648326db62078061313e84ef117cac8c987ad2673f

See more details on using hashes here.

File details

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

File metadata

  • Download URL: amalgam_lang-34.1.0-py3-none-any.whl
  • Upload date:
  • Size: 82.7 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-34.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 56faf33f99f9325840fd965427f1aa257f0c53a240ba981264351ec5374c96c6
MD5 fc43469c9f86a02a2b37f479de6f4bce
BLAKE2b-256 285204c026277938028082853347b0e53661fdb7e2106fc1075144e26f12622a

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