Welcome | Get started | Dive | Contribute | Topics | Reference | Changes | More
lino.api
¶
The lino.api
package contains a series of modules that encapsulate Lino’s
core functionalities. They don’t define anything on their own but just import
things that are commonly used in different contexts. One module for each of the
three startup phases used when writing application code:
lino.api.ad contains classes and functions that are available already before your Lino application gets initialized. You use it to define your overall application structure (in your
settings.py
files and in the__init__.py
files of your plugins).The lino.api.dd module (database design) is for when you are describing your database schema in your
models.py
modules.The lino.api.rt module (runtime) contains functions and classes that are commonly used “at runtime”, i.e. when the Lino application has been initialized. You may import it at the global namespace of a
models.py
file, but you can use most of it only when thestartup()
function has been called.
Recommended usage is to import these modules as follows:
from lino.api import ad, dd, rt, _