Skip to content

Commit

Permalink
17437 readme (#8)
Browse files Browse the repository at this point in the history
Readme update
  • Loading branch information
jackx111 authored Sep 12, 2023
1 parent 42f6d06 commit 2fff784
Showing 1 changed file with 18 additions and 10 deletions.
28 changes: 18 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,15 @@
# Amalgam™ Wrapper - Python
# Amalgam™


Amalgam™ is a domain specific language ([DSL](https://en.wikipedia.org/wiki/Domain-specific_language)) developed primarily for [genetic programming](https://en.wikipedia.org/wiki/Generic_programming) and [instance based machine learning](https://en.wikipedia.org/wiki/Instance-based_learning), but also for simulation, agent based modeling, data storage and retrieval, the mathematics of probability theory and information theory, and game content and AI. The language format is somewhat LISP-like in that it uses parenthesized list format with prefix notation and is geared toward functional programming, where there is a one-to-one mapping between the code and the corresponding parse tree. The [Howso Engine](https://github.com/howsoai/howso-engine/tree/main) is an example of a program written in Amalgam.


## Resources
- [Amalgam](https://github.com/howsoai/amalgam)

## General Overview
Coding in [Amalgam](https://github.com/howsoai/amalgam) can be done natively as demonstrated in the [Amalgam User Guide](https://github.com/howsoai/amalgam/blob/main/AMALGAM-BEGINNER-GUIDE.md) or through this Amalgam™ Python wrapper. The Python wrapper handles the binaries for the user so the user just needs to worry about the code.

This Python module allows running programs written in the [Amalgam language](https://github.com/howsoai/amalgam) through the Amalgam dynamic library.

## Supported Platforms

Expand All @@ -14,13 +23,17 @@ Compatible with Python versions: 3.8, 3.9, 3.10, and 3.11
| Linux | Yes | Yes |
| MacOS | Yes | Yes |

## Installing

## Install

To install the current release:
```bash
pip install amalgam-lang
```

## Getting Started
## 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:

```python
from amalgam.api import Amalgam
Expand All @@ -34,17 +47,12 @@ response = amlg.execute_entity_json("handle_name", "label_name", json.dumps({ "a
result = json.loads(response)
```

The path to the Amalgam language binary (so/dll/dylib) can be overridden using the `library_path` parameter.
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.

```python
amlg = Amalgam(library_path="/path/to/amalgam-mt.so")
```

## Development

1. Install development dependencies `pip install -r requirements-dev.in`
2. Run tests: `python -m pytest amalgam`

## License

[License](LICENSE.txt)
Expand Down

0 comments on commit 2fff784

Please sign in to comment.