Skip to content

Commit 9cb4155

Browse files
committed
Documentation
1 parent cf067a1 commit 9cb4155

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

docs/gettingstarted.rst

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -120,8 +120,16 @@ Given a Basilisp entrypoint function ``main`` (taking no arguments) in the ``pro
120120
If you were to place this in a module such as ``myproject.main``, you could easily configure a `setuptools entry point <https://setuptools.pypa.io/en/latest/userguide/entry_point.html>`_ (or any analog with another build tool) to point to that script directly, effectively launching you directly to Basilisp code.
121121

122122
For more sophisticated projects which may not have a direct or wrappable entrypoint, you can initialize the Basilisp runtime directly by calling :py:func:`basilisp.main.init` with no arguments.
123-
This may be a better fit for a project using something like Django, where the entrypoint is dictated by Django.
124-
In that case, you could use a hook such as Django's ``AppConfig.ready()``.
123+
A natural placement for this function call would be in the root ``__init__.py`` for a package, where you can freely import and initialize Basilisp.
124+
125+
.. code-block:: python
126+
127+
import basilisp.main
128+
129+
basilisp.main.init()
130+
131+
You could also initialize Basilisp in a framework such as Django, where the entrypoint is dictated by the framework.
132+
For example, you could use a hook such as Django's ``AppConfig.ready()``.
125133

126134
.. code-block:: python
127135

0 commit comments

Comments
 (0)