mavsec.project.Project
- class mavsec.project.Project(info: ~mavsec.project.ProjectInfo, properties: list[~mavsec.properties.Property] = <factory>)
Bases:
SchemaA project.
- __init__(info: ~mavsec.project.ProjectInfo, properties: list[~mavsec.properties.Property] = <factory>) None
Methods
__init__(info[, properties])check()Check the project for security or implementation issues.
from_dict(data)Get a Project object from a dictionary.
from_file(path)Get a cls object from a file.
from_json(path)Get a cls object from a JSON file.
from_toml(path)Get a cls object from a TOML file.
from_yaml(path)Get a cls object from a YAML file.
to_dict()Convert the object to a dictionary.
to_file([filename])Write the object to a file.
to_json(path)Write the object to a JSON file.
to_tcl(filename)Write the object to a file.
to_toml(path)Write the object to a TOML file.
to_yaml(path)Write the object to a YAML file.
Attributes
Information about the project.
properties- check() ProjectCheckResult
Check the project for security or implementation issues.
- classmethod from_dict(data: dict) Project
Get a Project object from a dictionary.
- Parameters:
data (dict) – The dictionary to convert to a Project object.
- Returns:
The Project object.
- Return type:
- classmethod from_file(path: str | Path) SchemaT
Get a cls object from a file.
- Parameters:
path (str) – The path to the file.
- Returns:
The cls object.
- Return type:
cls
- classmethod from_json(path: str | Path) SchemaT
Get a cls object from a JSON file.
- Parameters:
path (str) – The path to the JSON file.
- Returns:
The cls object.
- Return type:
cls
- classmethod from_toml(path: str | Path) SchemaT
Get a cls object from a TOML file.
- Parameters:
path (str) – The path to the TOML file.
- Returns:
The cls object.
- Return type:
cls
- classmethod from_yaml(path: str | Path) SchemaT
Get a cls object from a YAML file.
- Parameters:
path (str) – The path to the YAML file.
- Returns:
The cls object.
- Return type:
cls
- info: ProjectInfo
Information about the project.
- to_dict() dict
Convert the object to a dictionary.
- Returns:
The dictionary.
- Return type:
dict
- to_file(filename: str | Path | None = None) None
Write the object to a file.
- to_json(path: str | Path) None
Write the object to a JSON file.
- Parameters:
path (str) – The path to the JSON file.
- to_tcl(filename: str | Path) None
Write the object to a file.
- to_toml(path: str | Path) None
Write the object to a TOML file.
- Parameters:
path (str) – The path to the TOML file.
- to_yaml(path: str | Path) None
Write the object to a YAML file.
- Parameters:
path (str) – The path to the YAML file.