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

Uploaded Python 3Windows x86-64

amalgam_lang-33.0.1-py3-none-manylinux_2_29_x86_64.whl (64.6 MB view details)

Uploaded Python 3manylinux: glibc 2.29+ x86-64

amalgam_lang-33.0.1-py3-none-manylinux_2_29_aarch64.whl (6.9 MB view details)

Uploaded Python 3manylinux: glibc 2.29+ ARM64

amalgam_lang-33.0.1-py3-none-manylinux_2_28_x86_64.whl (64.8 MB view details)

Uploaded Python 3manylinux: glibc 2.28+ x86-64

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

Uploaded Python 3macOS 12.0+ ARM64

amalgam_lang-33.0.1-py3-none-any.whl (81.1 MB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: amalgam_lang-33.0.1.tar.gz
  • Upload date:
  • Size: 80.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.1.tar.gz
Algorithm Hash digest
SHA256 4f72d4b0042a1036c9e6ccfe94d4a56a76ef595d5da632190f86416fe41a6986
MD5 cdb7542322118e67c6a1294bb9098137
BLAKE2b-256 5610775dc2e1d76402c734add0213d2e9d6ef033bec153f19a60be99be394357

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for amalgam_lang-33.0.1-py3-none-win_amd64.whl
Algorithm Hash digest
SHA256 d15b703b2054f9495cf59d6f51e9710aaf7e0f4d9a320fbdd1b555d07966f4d3
MD5 2abe5f7cd66fb5ad189d50b17cbdbf6c
BLAKE2b-256 dec3ce7eb0bdd6dbc52925f8dfc3d54ccd63d010cb6dbe8fd666c889021a0f37

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for amalgam_lang-33.0.1-py3-none-manylinux_2_29_x86_64.whl
Algorithm Hash digest
SHA256 a3eff49033057991f82c9047ca8b9a0c93d17558a6aa7f4b68d8e399a5e379ea
MD5 eed64a5dc9e3b533a9b5d2c29dfce608
BLAKE2b-256 eba5d2b38bb05c1336c5b5d2ce55c074b18a510b53b5e2587abb051869240a6b

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for amalgam_lang-33.0.1-py3-none-manylinux_2_29_aarch64.whl
Algorithm Hash digest
SHA256 7af9275663a80b51ccc228cde4e2adcad79394fab829a19f2d0059565ce1f7c9
MD5 7328f740a44b2f921c3d758cddef4839
BLAKE2b-256 689d26887ea25c54bd33830f650ab1dbbb8a6f18e2a856033633e9347686230b

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for amalgam_lang-33.0.1-py3-none-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 541a38b49738c37e166498c5ffa7d1396fbc0176f92adcca1a9bb0170ab2e5a7
MD5 f0ad3fb0be3bfea6884840252e2e1103
BLAKE2b-256 023b5d1301e87fa119f366ef6f0bde35d6e161bc7ad2e8c7f38639dd75c45f66

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for amalgam_lang-33.0.1-py3-none-macosx_12_0_arm64.whl
Algorithm Hash digest
SHA256 bb74379e37df6ca16b51fee9c2537c01c4828a35c31c9e0ba8ea6651a8664530
MD5 6278dd31b522135bf5400aec39daa087
BLAKE2b-256 9654e2ad321ae78b6e73423142c17cfac5dd7897161a282cc5eb8c2d0de83cfc

See more details on using hashes here.

File details

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

File metadata

  • Download URL: amalgam_lang-33.0.1-py3-none-any.whl
  • Upload date:
  • Size: 81.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.1-py3-none-any.whl
Algorithm Hash digest
SHA256 28d34c6133b55a009f6c9bb675e1bacaa3c0e9b410b13f6c5fc4a7c8c24ff342
MD5 a4e96d7b933b6f7f4a49b10b6361da4f
BLAKE2b-256 e1a09d80ba58ed0061fef4c2fb834948166c38b1d1ebcb81177439f55417dcc8

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