2015-12-19 14:52:17 +01:00
|
|
|
title: from_file
|
|
|
|
---
|
|
|
|
type: method
|
|
|
|
---
|
|
|
|
signature: filename
|
|
|
|
---
|
|
|
|
summary: Loads a project from a project file.
|
|
|
|
---
|
|
|
|
body:
|
|
|
|
|
2016-02-11 01:13:37 +01:00
|
|
|
This is the most common way to create a project instance. It's a class
|
2015-12-19 14:52:17 +01:00
|
|
|
method that given the path to a project file will load the project. If
|
|
|
|
the file does not exist then `None` is returned.
|
|
|
|
|
|
|
|
## Example
|
|
|
|
|
|
|
|
```python
|
|
|
|
from lektor.project import Project
|
|
|
|
|
|
|
|
project = Project.from_file('/path/to/the/project.lektorproject')
|
|
|
|
```
|