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

Uploaded Python 3Windows x86-64

amalgam_lang-34.2.3-py3-none-manylinux_2_29_x86_64.whl (68.2 MB view details)

Uploaded Python 3manylinux: glibc 2.29+ x86-64

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

Uploaded Python 3manylinux: glibc 2.29+ ARM64

amalgam_lang-34.2.3-py3-none-manylinux_2_28_x86_64.whl (68.2 MB view details)

Uploaded Python 3manylinux: glibc 2.28+ x86-64

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

Uploaded Python 3macOS 12.0+ ARM64

amalgam_lang-34.2.3-py3-none-any.whl (85.5 MB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: amalgam_lang-34.2.3.tar.gz
  • Upload date:
  • Size: 85.1 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.3.tar.gz
Algorithm Hash digest
SHA256 44fcf622464cd4343e82606892a7498ede9824f8532653d21550c48de72926ef
MD5 90f991ac0c70081bdabcaa3d45b049a7
BLAKE2b-256 2b1d7d75c0e28178a691aea1e5f4f9052a539e27ee10adc981d935595cc395a4

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for amalgam_lang-34.2.3-py3-none-win_amd64.whl
Algorithm Hash digest
SHA256 2e11c283e67f679d6d54d97d4a052c1aba7ed66b8d65e01865225ee144cd6ec4
MD5 c34b8bad72fdc691c0ada65f6a9311cc
BLAKE2b-256 b07ba3acc5ed97ff69812ce5841766cf909ccd81672fbdec0dfb87fb115e0206

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for amalgam_lang-34.2.3-py3-none-manylinux_2_29_x86_64.whl
Algorithm Hash digest
SHA256 4d82b9bb4a74e857c8143aabed23be4ecca7e363e1f6e3946ce13fc289b97831
MD5 d0aa985ce167a635ca7368a2d02cdf31
BLAKE2b-256 39f9b953ed90750099e6693092726b34066adc86f51d9b9ef3df9544efaddd86

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for amalgam_lang-34.2.3-py3-none-manylinux_2_29_aarch64.whl
Algorithm Hash digest
SHA256 3a9be166ca4394d75286b485cae76e79e1a150ff08006a5e59cbb24dbc337285
MD5 90990b81a1e333ff473ce8848e422938
BLAKE2b-256 f9e5f064cbde41c21daf544a1825ac315e302b6b21e526bdadc8d2d167db20e6

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for amalgam_lang-34.2.3-py3-none-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 2a63a0200fe2b9f7c1afb6a69d3cb93fa4b50978c6d9b2f698ca0be030456f0f
MD5 15416421e61db2eda9993c895321d4a1
BLAKE2b-256 f2d231aa51320ec889a657ba824bea20c2e000a2956f86b67afb665aa0ae05e7

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for amalgam_lang-34.2.3-py3-none-macosx_12_0_arm64.whl
Algorithm Hash digest
SHA256 f05e5a8635453db0978fb51028fd6b64aaf7fb3c26777f8d919ea59d4cbeef88
MD5 ebaf646ae9c9d0a4642b076def1f812b
BLAKE2b-256 a3aa0668c28f3aec85fa6702f7893f66cec394832ecd4c12a18fbcd6b27a93a5

See more details on using hashes here.

File details

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

File metadata

  • Download URL: amalgam_lang-34.2.3-py3-none-any.whl
  • Upload date:
  • Size: 85.5 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.3-py3-none-any.whl
Algorithm Hash digest
SHA256 cade27ef592d361963a5d0e3ce97032a4f176b75890319ef8f86a3a49bfe0abb
MD5 a5e14d014a83f3221127540597234198
BLAKE2b-256 e970cb495b6790b8b09e16d67fe086ccb572ecd2cd0051053a5bd93814ef56c5

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