cva-quickref-libpython

Reference libpython-clj for Python interop in Clojure.

Updated Aug 27, 2026
One-click install
npx skills add https://github.com/joaopelegrino/hello-word-closure --skill cva-quickref-libpython
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: cva-quickref-libpython
Source: https://github.com/joaopelegrino/hello-word-closure/tree/main/.claude-plugin/clojure-vertex-adk/skills/cva-quickref-libpython
Command: npx skills add https://github.com/joaopelegrino/hello-word-closure --skill cva-quickref-libpython

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires numpy, pandas, transformers.

What problem does it solve?

Integrating Python's vast machine learning and data science ecosystem with Clojure applications can be complex. This Skill provides a quick reference for libpython-clj, enabling seamless interoperability, automatic data conversion, and direct access to Python libraries like NumPy, Pandas, and HuggingFace from Clojure.

Core Features & Use Cases

  • Seamless Integration: Import Python modules as Clojure namespaces and call Python functions with idiomatic Clojure syntax.
  • Automatic Data Conversion: Effortlessly pass Clojure data structures to Python functions and receive results back in Clojure format.
  • ML Library Access: Directly utilize powerful Python libraries like NumPy for numerical operations, Pandas for data manipulation, and HuggingFace Transformers for AI models.
  • Use Case: A Clojure agent needs to perform sentiment analysis using a pre-trained HuggingFace model. This Skill guides the setup of libpython-clj, importing the transformers library, and calling the sentiment pipeline directly from Clojure.

Quick Start

Initialize libpython-clj in your Clojure project. Import the 'numpy' module as 'np'. Create a NumPy array from a Clojure vector: (np/array [1 2 3]).

Frequently Asked Questions about cva-quickref-libpython

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I call Python functions from Clojure?

Use libpython-clj to import Python modules as Clojure namespaces and invoke functions with idiomatic Clojure syntax. Initialize the library, import your target module (e.g., `numpy` or `transformers`), and call functions directly—libpython-clj handles automatic data conversion between Clojure and Python types.

Can I use NumPy, Pandas, and HuggingFace Transformers from Clojure?

Yes. libpython-clj enables seamless access to Python libraries including NumPy for numerical operations, Pandas for data manipulation, and HuggingFace Transformers for machine learning models. Import each library as a Clojure namespace and use them directly within your Clojure application.

How do I convert between Clojure and Python data structures?

libpython-clj performs automatic data conversion transparently. Pass Clojure vectors, maps, and collections to Python functions—they're converted to NumPy arrays, dictionaries, or other Python types automatically. Results returned from Python are converted back to Clojure structures without manual intervention.

What's the best way to set up Python interoperability in a Clojure project?

Initialize libpython-clj in your Clojure project, then import Python modules using either Clojure-style or Python-style import syntax. Start with straightforward function calls, validate in the REPL, and reference the quick cheatsheet for attribute access and troubleshooting common interop patterns.

What are the limitations of using libpython-clj for Python interop?

libpython-clj handles most standard Python module imports and function calls, but complex object-oriented patterns, certain C-extension edge cases, or specialized library features may require additional workarounds. Test library interactions in the REPL early to identify constraints specific to your dependencies.