Command Line Interface

Elliot Hirsch edited this page Jun 10, 2015 · 1 revision

There is a shell script cli and companion python file in the root project directory that can be used for accessing Sefaria code from the interactive python interpreter. It sets the appropriate environment variables, and starts up a python interpreter with sefaria.model loaded into the global namespace. It lives in the Sefaria-Project root, and should be called from there. Calling it from elsewhere is likely to not work.

For users of iPython, you can load open a session in iPython with ./cli -i.

An example of its usage:

$ ./cli
>>> p = LinkSet(Ref("Genesis 13"))
>>> p.count()