Python bindings for Clojure.
Topics
- LibPython-CLJ Usage
- Embedding Clojure In Python
- Python Environments
- So Many Parenthesis!
- Scopes And Garbage Collection
- Slicing And Slices
Namespaces
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:
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.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.