FDL
The FDL
class is meant to be an entry point and is a "merge" between a Header class and
container class. The Header
is created for you based on the arguments you provide at initialisation or
you can pass a Header
object as an attribute if you wish.
pyfdl.FDL(uuid_=None, version=None, fdl_creator=None, default_framing_intent=None, framing_intents=None, contexts=None, canvas_templates=None)
Bases: Base
header: Header
property
writable
Returns: |
|
---|
apply_defaults()
Applies default values defined in the defaults
attribute to attributes that are None
check_required()
Check that required attributes contain values. Checks linked attributes like: "effective_dimensions.effective_anchor_point" where "effective_anchor_point" is required if "effective_dimensions" is set
Returns: |
|
---|
validate()
Validate the current state of the FDL. ID's and relationships between items are checked and values are validated against the json schema.
Raises: |
|
---|
from_dict(raw)
classmethod
Create instances of classes from a provided dict.
Parameters: |
|
---|
Returns: |
|
---|
to_dict()
Produce a dictionary representation of the current object along with all sub objects.
Raises: |
|
---|
Returns: |
|
---|
load_schema()
Load a jsonschema based on the version in Header
or default to current version
set in base
Returns: |
|
---|
place_canvas_in_context(context_label, canvas)
Place a canvas in a context. If no context with the provided label exist, a new context will be created for you.
Parameters: |
|
---|