This is an example of how to write a python library in OCaml, using pyml and pythonlib.
$ cd ocaml $ pyml_bindgen val_specs.txt adder Adder --caml-module Adder > lib.ml
this operation with generate lib.ml in ocaml
$ make
$ cd test $ python test.py
An example that demonstrates how to write Python libraries in OCaml using pyml and pythonlib.
Jupyter Notebook