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.1.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.1-py3-none-win_amd64.whl (5.7 MB view details)

Uploaded Python 3Windows x86-64

amalgam_lang-34.1.1-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.1-py3-none-manylinux_2_29_aarch64.whl (7.0 MB view details)

Uploaded Python 3manylinux: glibc 2.29+ ARM64

amalgam_lang-34.1.1-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.1-py3-none-macosx_12_0_arm64.whl (4.1 MB view details)

Uploaded Python 3macOS 12.0+ ARM64

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

Uploaded Python 3

File details

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

File metadata

  • Download URL: amalgam_lang-34.1.1.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.1.tar.gz
Algorithm Hash digest
SHA256 ee81c577fc45bb193097cedba0ecd62005a251f1f97d73214a3a16d2cda4bb2d
MD5 af51464d52005890ca725bb75172b9e9
BLAKE2b-256 b43dc8463a33a784a865fafefa779a3861d9d0176e6c3a2cbcf552efb89e2a5b

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for amalgam_lang-34.1.1-py3-none-win_amd64.whl
Algorithm Hash digest
SHA256 3e0c85b86b4942de864e7d2d70a8043dd8a56281123ae0bfd996f186f528ff16
MD5 a8f2b3d094032a9c0c5e79859fc4b7ad
BLAKE2b-256 4e6c77fa3f8b71bd2f00e26a05ac9b32c3d93364f83ca5533c1a800e116b0b9b

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for amalgam_lang-34.1.1-py3-none-manylinux_2_29_x86_64.whl
Algorithm Hash digest
SHA256 980c4c374c9282cde1fe71968ba51857986fb85ec2bc08b4dca1122e9b6d7be1
MD5 4bcb8aeb34525d4c9377c50a1e8a0291
BLAKE2b-256 bad31df6a65faa94988a5b279fca9d0dba66bcef2309045f9975fa49309f873a

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for amalgam_lang-34.1.1-py3-none-manylinux_2_29_aarch64.whl
Algorithm Hash digest
SHA256 3d3ce8459e55b339704b844d36e4a35c9d89e8fbd89d1c073fbb420de91ff911
MD5 6c6fbcf6c94ce9c6dddb61d5692f9b7b
BLAKE2b-256 d2119c44bc008c8ecce8186e2e962d403b72ad2b7b451c576683715776b80b7a

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for amalgam_lang-34.1.1-py3-none-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 6d2786328693792d7cd9f51d50e11939239384fa5b785d9e5264321fff646f8f
MD5 373766e0e3cf3ad68b77be03634c3798
BLAKE2b-256 802cb51562cd960ac2dc64da0df60f8993739d128383616e7eeb4a05038f0625

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for amalgam_lang-34.1.1-py3-none-macosx_12_0_arm64.whl
Algorithm Hash digest
SHA256 cffff63f9d5a3e1ff3288c437da3f0fa2de871c7786aa838b4346dd5217c692e
MD5 3c17ff0a1847f907f41690542197c962
BLAKE2b-256 93ed6a5ca7119db32627ce0b0d3d2c1a4a7a5d0f5ebbb07b9167c529585e0cd5

See more details on using hashes here.

File details

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

File metadata

  • Download URL: amalgam_lang-34.1.1-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.1-py3-none-any.whl
Algorithm Hash digest
SHA256 146440ee447e7694092d40045273d8190ac9a98cccb90c9725b1890d101d5d0e
MD5 2402295981d97abd2431e16dfe6bf7b5
BLAKE2b-256 be2c0d59c0c5b796c507bd6f04ad312125e9a42b0591dc94e1e1c9c23ffbb14b

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