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

Uploaded Python 3Windows x86-64

amalgam_lang-34.2.2-py3-none-manylinux_2_29_x86_64.whl (68.3 MB view details)

Uploaded Python 3manylinux: glibc 2.29+ x86-64

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

Uploaded Python 3manylinux: glibc 2.29+ ARM64

amalgam_lang-34.2.2-py3-none-manylinux_2_28_x86_64.whl (68.4 MB view details)

Uploaded Python 3manylinux: glibc 2.28+ x86-64

amalgam_lang-34.2.2-py3-none-macosx_12_0_arm64.whl (4.3 MB view details)

Uploaded Python 3macOS 12.0+ ARM64

amalgam_lang-34.2.2-py3-none-any.whl (85.7 MB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for amalgam_lang-34.2.2.tar.gz
Algorithm Hash digest
SHA256 6e735b53a0bd1888a2b3c8bfec4b523929f64bd9a139841ee55ed8ea3b5cc216
MD5 df18d26335477612a37542379c8122df
BLAKE2b-256 14927b5a68ba3f1f8571a47762cd8a89865f812b5847e798451757e793b2e05a

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for amalgam_lang-34.2.2-py3-none-win_amd64.whl
Algorithm Hash digest
SHA256 936c5544c9124a8696c3fc0fc7839d8d8646b30ee20a989fe78f38a9cfcd4802
MD5 b7807d16d7081bd14d301ea1ccb6bf75
BLAKE2b-256 0a1d66c52bca8a6a618c565307c1b03a52487ee220e9095eb5a120b698d5530a

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for amalgam_lang-34.2.2-py3-none-manylinux_2_29_x86_64.whl
Algorithm Hash digest
SHA256 ceadbe20992d6e790fe3bc4df9ccb4c75bbd23dce0b4c3ec9f43add5ff23c720
MD5 afbfea9507a5856899b949d2218878fe
BLAKE2b-256 db4a484d30786265cf873b073e8f55f91871ebe210b539e2629693328a5033ff

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for amalgam_lang-34.2.2-py3-none-manylinux_2_29_aarch64.whl
Algorithm Hash digest
SHA256 5d6b79577596c1072f6d43c31a59894e4b9d0381789812c378c5365134f1c3b9
MD5 8c4e5d13fa69fdac7321ef50dd18bf5c
BLAKE2b-256 62b3e3513e94fd6a1da202efd59066dcab49ff946f7f76cc0b60ad2ee9df2607

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for amalgam_lang-34.2.2-py3-none-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 92f107d2c19e86abc469e4f0bdcdbaf67c87e5ad9d55f911b32b0374f98e0614
MD5 565e70b2ba5fce176aceb98e48118b89
BLAKE2b-256 0d543eceaece2909a50038c4b6040fd02fcc11929b57beb443ef61af019e60b5

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for amalgam_lang-34.2.2-py3-none-macosx_12_0_arm64.whl
Algorithm Hash digest
SHA256 f32996027193dff01534b0c6a7e4c203616a79102e28c02075275c490cf4dc8f
MD5 9144992e3beceef3f8a6961969471bcb
BLAKE2b-256 3f20b293bc6cdd7869878f30c355a0eb9ee6b59104f891e3c2f3e407af2d3e15

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for amalgam_lang-34.2.2-py3-none-any.whl
Algorithm Hash digest
SHA256 4037fcf11fa426a4ff035c99f800bc08594cf53e278f4b3322eda4deac00738d
MD5 06f649ecd1461bc70be9a6f063d2c1fe
BLAKE2b-256 3823936c7afdc930d568943a2d3807d7db05617f9471bcf5d9c4184c971f39a2

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