ladybug.ddy module

class ladybug.ddy.DDY(location, design_days)[source]

Bases: object

A DDY object containing all of the data of a .ddy file.

Parameters
  • location – A Ladybug location object

  • design_days – A list of the design days in the ddy file.

Properties:
  • file_path

  • location

  • design_days

ToString()[source]

Overwrite .NET ToString.

duplicate()[source]

Get a copy of this object.

filter_by_keyword(keyword)[source]

Return a list of ddys that have a certain keyword in their name.

This is useful for selecting out design days from a ddy file that are for a specific type of condition (for example, .4% cooling design days)

classmethod from_ddy_file(file_path)[source]

Initialize from a ddy file object from an existing ddy file.

Parameters

file_path – A string representing a complete path to the .ddy file.

classmethod from_design_day(design_day)[source]

Initialize from a ddy file object from a ladybug design day object.

Parameters

design_day – A Ladybug DesignDay object.

classmethod from_dict(data)[source]

Create a DDY from a dictionary.

Parameters

data – A python dictionary in the following format

{
"type": "DDY",
"location": {},  # ladybug Location schema
"design_days": []  # list of ladybug DesignDay schemas
}
save(file_path)[source]

Write DDY object as a file.

Parameters

file_path – Text for the full path to where the file will be written.

to_dict()[source]

Convert the Design Day to a dictionary.

to_file_string()[source]

Get a text string for the entirety of the DDY file contents.

write(file_path)[source]

Write DDY object as a .ddy file and return the file path.

Parameters

file_path – Text for the full path to where the .ddy file will be written.

property design_days

Get or set the design_days.

property file_path

Get the original .ddy file path.

Will be None if the DDY did not originate from a file.

property location

Get or set the location.