How do you write library wrappers?

I use import-vars for this kind of plumbing. I have seen projects that have a common facing api that want to pass through references to the dependent ns or coalesce stuff in a common api (like tech.v3.dataset.api using a similar mechanism via the export-symbols macro).

So one strategy might be to write something like:

(ns mycsv 
   (:require [clojure.data.csv] 
             [potemkin :as pot]))

(pot/import-vars 
   [clojure.data.csv
   read-csv
   write-csv])

(defn my-stuff [arg] 
  ;;use your imagination
  )

In another ns:

(ns blah 
   (:require [mycsv :as csv]))

;;public vars from mycsv should be exposed, including imports:

;;csv/my-stuff 
;;csv/read-csv   - should actually map to clojure.data.csv/read-csv e.g. if you look at the doc string
;;csv/write-csv  - same
3 Likes