libpython-clj 2.025

Python bindings for Clojure.

Topics

Namespaces

libpython-clj2.codegen

Generate a namespace on disk for a python module or instances

Public variables and functions:

libpython-clj2.embedded

Tools for embedding clojure into a python host process. See jbridge.py for python details. This namespace relies on the classpath having nrepl and cider-nrepl on it. For example:

Public variables and functions:

libpython-clj2.java-api

A java api is exposed for libpython-clj2. The methods below are statically callable without the leading '-'. Note that returned python objects implement the respective java interfaces so a python dict will implement java.util.Map, etc. There is some startup time as Clojure dynamically compiles the source code but this binding should have great runtime characteristics in comparison to any other java python engine.

libpython-clj2.python

Python bindings for Clojure. This library dynamically finds the installed python, loads the shared library and allows Clojure users to use Python modules as if they were Clojure namespaces.

libpython-clj2.python.class

Namespace to help create a new python class from Clojure. Used as a core implementation technique for bridging JVM objects into python.

libpython-clj2.python.np-array

Bindings for deeper intergration of numpy into the tech.v3.datatype system. This allows seamless usage of numpy arrays in datatype and tensor functionality such as enabling the tech.v3.tensor/ensure-tensor call to work with numpy arrays -- using zero copying when possible.

libpython-clj2.require

Namespace implementing requiring python modules as Clojure namespaces. This works via scanning the module for metadata and dynamically building the Clojure namespace.

Public variables and functions: