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

Uploaded Python 3Windows x86-64

amalgam_lang-34.2.0-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.0-py3-none-manylinux_2_29_aarch64.whl (7.2 MB view details)

Uploaded Python 3manylinux: glibc 2.29+ ARM64

amalgam_lang-34.2.0-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.0-py3-none-macosx_12_0_arm64.whl (4.2 MB view details)

Uploaded Python 3macOS 12.0+ ARM64

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

Uploaded Python 3

File details

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

File metadata

  • Download URL: amalgam_lang-34.2.0.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.0.tar.gz
Algorithm Hash digest
SHA256 1b9a40733406c10931411c34e12d96e118359e428e9fe1a651c4034dd73a3103
MD5 7c4e33a6964cacba44c3e6e18c3b01e6
BLAKE2b-256 73603cd68ecafb79e0d5ecc12868732fbbb98549471cd9c7a23e45dca3e9094f

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for amalgam_lang-34.2.0-py3-none-win_amd64.whl
Algorithm Hash digest
SHA256 fa1aa3af205ef5ea29eae013e731185132cd157280d2aa84454012de6602c73e
MD5 4a0d27ef4d50a4fc69ec2f5b6d766cd6
BLAKE2b-256 de25963827b390c9e1f1d5729c2d689aa8010355d5c69932c71dd6d8714fdded

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for amalgam_lang-34.2.0-py3-none-manylinux_2_29_x86_64.whl
Algorithm Hash digest
SHA256 96a03fa1e5d51ddf9b4baffcc582c0b7c782327634662921ea5ab64e49446905
MD5 3834915448311464f008371b04e7b2c8
BLAKE2b-256 70dd2a20d8709b5e9218e1f2a44e5a26c2d816b123015c001470e9614259afe4

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for amalgam_lang-34.2.0-py3-none-manylinux_2_29_aarch64.whl
Algorithm Hash digest
SHA256 4c823d6082065a110907ae71b0fb0b41547ca8937ed640ab537d4ca4c4e6cbea
MD5 bd3b4df2fbcc63c9fa8e43cb0ffdb3dd
BLAKE2b-256 5ceaaa41400deb52bb1b245ff94455f92bab8dc82ecfee9e6f4a2ab42e7f8658

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for amalgam_lang-34.2.0-py3-none-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 b48433a8902bfaef8d310ce125529bff867f2e2e44fd76e82af8f4f35eb081fb
MD5 08e2e9b38b8311ace12d6db0078fa75c
BLAKE2b-256 82e2d20acf34f37754e3e5034c344169aca337dc58bb68cbc511d2773a823f7c

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for amalgam_lang-34.2.0-py3-none-macosx_12_0_arm64.whl
Algorithm Hash digest
SHA256 754bf128d9c454b48c53f2534791d8319c0d93f3a967472369fad03998007e6b
MD5 29261caaa643b0c9bb650d348db04ca7
BLAKE2b-256 ff47370fb31b1ee47442e7df4646fece8cb7f92d8754ed12e122f5123219db3f

See more details on using hashes here.

File details

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

File metadata

  • Download URL: amalgam_lang-34.2.0-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.0-py3-none-any.whl
Algorithm Hash digest
SHA256 6e18c2bdad365f8ed659846aec2f1118cc8b873e5928e0baf775c5d235b85cf6
MD5 db63c4c107c14e5f19cc91182cd5c580
BLAKE2b-256 710069d31bd838aa43ba7e7432b170709985f6e2900bcc8036711821dd12b3f8

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