lektor-website/content/docs/api/project/make-env/contents.lr

26 lines
530 B
Plaintext
Raw Normal View History

2015-12-19 14:52:17 +01:00
title: make_env
---
type: method
---
signature: load_plugins=True
---
summary: Creates an environment from a project.
---
body:
Once a project is loaded this method can be used to create a
[Environment :ref](../../environment/) object to work with. This is the
preferred way to construct such a thing.
By default plugins will be loaded and initialized but this can be disabled
by passing `load_plugins=False`.
## Example
```python
from lektor.project import Project
project = Project.discover()
env = project.make_env()
```