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

Uploaded Python 3Windows x86-64

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

Uploaded Python 3manylinux: glibc 2.29+ ARM64

amalgam_lang-34.1.2-py3-none-manylinux_2_28_x86_64.whl (66.2 MB view details)

Uploaded Python 3manylinux: glibc 2.28+ x86-64

amalgam_lang-34.1.2-py3-none-macosx_12_0_arm64.whl (4.1 MB view details)

Uploaded Python 3macOS 12.0+ ARM64

amalgam_lang-34.1.2-py3-none-any.whl (82.8 MB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: amalgam_lang-34.1.2.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.2.tar.gz
Algorithm Hash digest
SHA256 7addd8cf424ff99b9434d013fbf9157c353c5afae0f7770e62a0624e863c303d
MD5 041e5a4c13de904f830ce4f9dcbcb12c
BLAKE2b-256 243147242bdb231245eca243207dd204d99867e628fbac53251692384830156d

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for amalgam_lang-34.1.2-py3-none-win_amd64.whl
Algorithm Hash digest
SHA256 c49b1353d1210bd583c7978076d1d1d20b77ba1b506fa0a3e08bf5142d0d5aa3
MD5 e42d99ede4d01cf4a6d4c2a0cd4c397a
BLAKE2b-256 c71f36b8bd05d9fef023f5bde2fde71caa215010af887fce1716bb12900393f1

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for amalgam_lang-34.1.2-py3-none-manylinux_2_29_x86_64.whl
Algorithm Hash digest
SHA256 31f260a1ac7fff9782d7ad4e6a482e1d4cd79040b8c937189d4241c68df5f3cc
MD5 daa32fe7102d85d5c2da228fa43860e5
BLAKE2b-256 b7c7f9cabfec1a840a6f49cfd82f0dabf2421378d555c2690044b16996723cee

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for amalgam_lang-34.1.2-py3-none-manylinux_2_29_aarch64.whl
Algorithm Hash digest
SHA256 c748dc96e2835476d98cb0d8614068c0382c187f58bc2fa08cf5c44878921203
MD5 760abf6986bf65f2614f40a8bc1086b1
BLAKE2b-256 e5c0602deaaaaa69c75998a02bfa9b16b1d7590e31502c37a5711fa60279d52c

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for amalgam_lang-34.1.2-py3-none-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 360b12a709cd83dcde8afe0b7942ef3c99b4ea78b33d42428638ff2e18368b1d
MD5 a8867feed8c16177e26436b22a4f9a72
BLAKE2b-256 3e9cd22e29050365a71da655dd7ef281b1b9c5948084c666124643f29b55228e

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for amalgam_lang-34.1.2-py3-none-macosx_12_0_arm64.whl
Algorithm Hash digest
SHA256 13986e86e730150de01765eb35282b84bf4b0c40c56eb43c3b74ac4f9d749262
MD5 9bad07bf5d2bae8687c434d94416bc94
BLAKE2b-256 1460f7815c0e0b6257a7b128688a2000d9ebdbe22e4674ac40342c2d0d081273

See more details on using hashes here.

File details

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

File metadata

  • Download URL: amalgam_lang-34.1.2-py3-none-any.whl
  • Upload date:
  • Size: 82.8 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.2-py3-none-any.whl
Algorithm Hash digest
SHA256 2d9966601b45643871da82fc75a1f89f8d0b5af68e37db49da3e65ab796cbc53
MD5 01d1fb48a38c46c670b398f2d9f0802a
BLAKE2b-256 0ec7ce11d2b20ad53e20233008889a161c874a79ea201244ba15657f64c0bf07

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