Welcome | Get started | Dive | Contribute | Topics | Reference | Changes | More
API¶
We are migrating documentation of the core Lino modules from docstrings (in
lino.core
) to prosa format (in this section).
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:
The lino.api.ad module (application design) 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, _
The lino.api.core
is a pseudo module used to simplify things for
application developers.
The remaining part of this document has been automatically generated from the source code.
The lino
package¶
The lino
package is the main plugin used by all Lino applications,
and the root for the subpackages that define core functionalites.
As a plugin it is added automatically to your INSTALLED_APPS
. It
defines no models, some template files, a series of django-admin commands, the core translation messages and the core
help_texts.py
file.
Contains Lino's core functionalities. |
|
If you want to see which version of Lino you have, you can say "hello" to Lino: |
|
Documentation is being migrated to prosa style in API. |
|
|
|
This package contains model mixins, some of which are heavily used by applications and the Lino Extensions Library. |
|
Most of this package has been moved to lino_book. |
|
The standard model library included with Lino. |
|
Some extensions for Sphinx. |
|
- lino.startup(settings_module=None)¶
Start up Django and Lino.
TODO: move this to doctest (and adapt all tested docs).
Optional settings_module is the name of a Django settings module. If this is specified, set the
DJANGO_SETTINGS_MODULE
environment variable.This is called automatically when a process is invoked by a django-admin command.
This is usually called in the initialization code snippet of a tested document.
If your doctest reports a failure of the following type:
Failed example: startup('lino_amici.projects.amici1.settings') Expected nothing Got: Started /usr/lib/python3.10/doctest.py ... docs/specs/overview.rst (using lino_amici.projects.amici1.settings.demo) --> PID 217238
then it’s because your project directory contains a
log
directory.
- class lino.AppConfig(app_name, app_module)¶
Bases:
AppConfig
This is the only
django.apps.AppConfig
object used by Lino. Lino applications instead use thelino.core.plugins.Plugin
class to define plugins. See More about plugins.
The lino_xl
package¶
This package contains the code of the Lino Extensions Library.
See Plugins API for the list of plugins.
These are the plugins included with Lino XL. |
The lino_react
package¶
A user interface for Lino applications that uses FaceBooks React JS framework. |
The lino_book
package¶
This is the code repository that contains (1) the Sphinx source files of the
Lino Developer Guide, (2) the lino_book
Python package and (3) a test suite
with doctest-based tests for the Lino framework.
The Lino Developer Guide is the technical documentation tree of the Lino framework. It is visible on https://dev.lino-framework.org.
The lino_book
Python package is a collection of small example Lino
applications used for educational and testing purposes.
The code repositories for the lino
and lino_xl
Python packages have no
documentation tree on their own and almost no unit tests, they are tested and
documented here.
Code repository: https://gitlab.com/lino-framework/book
Test results: https://gitlab.com/lino-framework/book/-/pipelines
Feedback: https://community.lino-framework.org
Maintainer: https://www.saffre-rumma.net/
The lino_book
package contains a set of example projects
used both for testing and explaining Lino framework.
It is not published on PyPI because that would make no sense. You use it by
cloning the repository from GitLab (which is done automatically by
getlino configure
with –devtools).
This package contains example applications included with the Lino book. |
- lino_book.DEMO_DATA = PosixPath('/home/luc/work/book/demo_data')¶
The root directory for our demo data collection, which is used by other projects as well.
This is a
Path
instance.
Lino applications covered by the book¶
The following Lino applications have their developer specs and API in the Lino book and form an integral part of the Lino core because they also serve for testing purposes.
Lino Noi¶
This is the main module of Lino Noi.
Extended and specific plugins for Lino Noi. |
Lino Così¶
Plugins |
|
This is a real-world example of how the application developer can provide automatic data migrations for Python dumps. |
Lino Avanti¶
This is the main module of Lino Avanti.
Plugins for Lino Avanti. |
Lino Vilma¶
This is the main module of Lino Vilma.
Extended and specific plugins for Lino Noi. |
Lino Care¶
This is the main module of Lino Care.
Extended and specific plugins for Lino Care. |
Lino Tera¶
This is the main module of Lino Tera.
Plugins specific to Lino Psico. |
Lino Voga¶
The main module of Lino Voga.
This package contains apps which are specific to Lino Voga. |
Lino CMS¶
This is the main module of Lino Cms.
Plugins for Lino Cms. |