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

Uploaded Python 3Windows x86-64

amalgam_lang-33.0.0-py3-none-manylinux_2_29_x86_64.whl (63.8 MB view details)

Uploaded Python 3manylinux: glibc 2.29+ x86-64

amalgam_lang-33.0.0-py3-none-manylinux_2_29_aarch64.whl (6.7 MB view details)

Uploaded Python 3manylinux: glibc 2.29+ ARM64

amalgam_lang-33.0.0-py3-none-manylinux_2_28_x86_64.whl (64.0 MB view details)

Uploaded Python 3manylinux: glibc 2.28+ x86-64

amalgam_lang-33.0.0-py3-none-macosx_12_0_arm64.whl (4.0 MB view details)

Uploaded Python 3macOS 12.0+ ARM64

amalgam_lang-33.0.0-py3-none-any.whl (80.1 MB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: amalgam_lang-33.0.0.tar.gz
  • Upload date:
  • Size: 79.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-33.0.0.tar.gz
Algorithm Hash digest
SHA256 be8846ac429c058886c8128a4e4ccdc2ae82f4b8f7c991269e78e5ead00e7fc1
MD5 53ff49704421f3a12a56bde4e51b4654
BLAKE2b-256 8fcde58bbbad20b7a40216370a7ae196512f181d47f9228a4708f48a2c488ae8

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for amalgam_lang-33.0.0-py3-none-win_amd64.whl
Algorithm Hash digest
SHA256 a129e9b2b9661306249fc780b41ae49baaaf09ba5f06b02a8d945f272a275347
MD5 a09824152036b29428b9b099128f6939
BLAKE2b-256 fb0c54cffab76fea957b4d169c9d26f08d82851d3cdeb9372067575ec05ba50b

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for amalgam_lang-33.0.0-py3-none-manylinux_2_29_x86_64.whl
Algorithm Hash digest
SHA256 cd59ca7d902d654c2bd8a4e70fabe67dfbd396e4d1579c57d686c566b0d59e2e
MD5 c6693c26a0fb3b52b2dbea7ad457f9f5
BLAKE2b-256 e89850850ce353e17fd5e066162a5a8864fee75716aeb1d4b7ed6e7eab4c0fed

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for amalgam_lang-33.0.0-py3-none-manylinux_2_29_aarch64.whl
Algorithm Hash digest
SHA256 6dcb285752a9bd91a978fff448290fb254f40c31998f6604eb202209bfa173f9
MD5 298b9b879c37350f31cb847533715abd
BLAKE2b-256 cfe1ea3b82471294261bbdb433afa95f4e44aa3336aa158af88df470b210141a

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for amalgam_lang-33.0.0-py3-none-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 50beeec29eaa6af8e0e236c88813ec3bd28bf77e4f43a019ac80194c57d7c505
MD5 70444e8eacc99b39b3e7e86c779efc5a
BLAKE2b-256 adffc834ae4d6e2267c2c88fcfaea13f790bd375d77e3f2acab6e874f60b08e0

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for amalgam_lang-33.0.0-py3-none-macosx_12_0_arm64.whl
Algorithm Hash digest
SHA256 5e035c8c3278e6bbae4ea8f3796b2b1c57b00222eb885604dc7368f71be54c61
MD5 e4669305cfd2c52f763251dc79f7e06b
BLAKE2b-256 6dc88d4c8944eb3834c20d10e2b35f2afcc0c990118ea5a09a7d2598d0d56de1

See more details on using hashes here.

File details

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

File metadata

  • Download URL: amalgam_lang-33.0.0-py3-none-any.whl
  • Upload date:
  • Size: 80.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-33.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 411485944303c9251a1cddf2a46f30a790d375e754b932030c570c548088f3be
MD5 b3cb1b5ae5189b567d91b3d1f9eadaee
BLAKE2b-256 729c57312791c3d15d554867fb759970985e2b2af6a7b1a52884d9430a93138f

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