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.2.1.tar.gz (84.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-34.2.1-py3-none-win_amd64.whl (5.9 MB view details)

Uploaded Python 3Windows x86-64

amalgam_lang-34.2.1-py3-none-manylinux_2_29_x86_64.whl (67.9 MB view details)

Uploaded Python 3manylinux: glibc 2.29+ x86-64

amalgam_lang-34.2.1-py3-none-manylinux_2_29_aarch64.whl (7.2 MB view details)

Uploaded Python 3manylinux: glibc 2.29+ ARM64

amalgam_lang-34.2.1-py3-none-manylinux_2_28_x86_64.whl (68.0 MB view details)

Uploaded Python 3manylinux: glibc 2.28+ x86-64

amalgam_lang-34.2.1-py3-none-macosx_12_0_arm64.whl (4.2 MB view details)

Uploaded Python 3macOS 12.0+ ARM64

amalgam_lang-34.2.1-py3-none-any.whl (85.2 MB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for amalgam_lang-34.2.1.tar.gz
Algorithm Hash digest
SHA256 601227c1ba5355b2f21efe280183418824a09e6b66b3667a3bc4afccbfe48f90
MD5 4f7000cf1fdfe49befc9c71fc140d9be
BLAKE2b-256 4e496e150f5907ccf253a876dcf1b37cd34c09635025692a8c3307fd575f18ef

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for amalgam_lang-34.2.1-py3-none-win_amd64.whl
Algorithm Hash digest
SHA256 1b214391f79803b107578c7d5e72b51fa7ce06a02837a0b826922fca473954d8
MD5 036a6a3384b661ffe35c408c6876d75b
BLAKE2b-256 96e372d2ca39a68651797afbb4124d4afa695453e7d071983ea2bd6cd2cf539d

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for amalgam_lang-34.2.1-py3-none-manylinux_2_29_x86_64.whl
Algorithm Hash digest
SHA256 9f729a1bd26659846b4d79aaf74aa1676df21a57d9548f90fa636de066d1031b
MD5 42d336899ced3b8b5f2d46407fcdcb78
BLAKE2b-256 2936ed710ebc3bffe415dbb6dbdd01cf1136d42f628dbb322cc88b3eb3d9eb5f

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for amalgam_lang-34.2.1-py3-none-manylinux_2_29_aarch64.whl
Algorithm Hash digest
SHA256 370d5f9758b64ea3d27a3aa54d4d783fca07b01125bdf510de006dae57b40743
MD5 48ddbae4ec5994f4d06d2a448ceab4b9
BLAKE2b-256 656573eeb949efbf6dd04f2646cd487d5a4220ec27851ecca533e3f5ee438483

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for amalgam_lang-34.2.1-py3-none-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 b737f0c9a2010daab2d2355afbb06026b3253add168e2916a2c35546747211ec
MD5 eea572f05f75e82e3cd80ebb2a487284
BLAKE2b-256 786779d304a71a3dd8bc1e435f125a612c193a3ed4287b0a42f10ddd4d603d1f

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for amalgam_lang-34.2.1-py3-none-macosx_12_0_arm64.whl
Algorithm Hash digest
SHA256 49d409012bcc0dfebce6ca5aa090586685744ba6ec5888dfe0f90021a8184f3a
MD5 cae3c6d8a8c937cbd7bbba98aecce3a5
BLAKE2b-256 ad079da569b1175f6e81cfb86cc83590388d1a8eae88f119c4df37b38d6183ca

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for amalgam_lang-34.2.1-py3-none-any.whl
Algorithm Hash digest
SHA256 f32513143e8d03166eaff98941a727cf2b990932545010165917628241fb103f
MD5 69c24940e80d1284e9f9643801c87cac
BLAKE2b-256 2e2cff97d8705e42910d31245dd2c58024f06e26beaf9a84499735866bd00214

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