Developer Guides¶
Information about ezdxf internals.
Source Code Formatting¶
Reformat code by Black with the default setting of 88 characters per line:
C:\> black <python-file>
Type Annotations¶
The use of type annotations is encouraged. New modules should pass mypy
without errors in non-strict mode. Using # type: ignore
is fine in tricky
situations - type annotations should be helpful in understanding the code
and not be a burden.
The following global options are required to pass mypy without error messages:
[mypy]
python_version = 3.7
ignore_missing_imports = True
Read this to learn where mypy searches for config files.
Use the mypy command line option --ignore-missing-imports
and -p
to
check the whole package from any location in the file system:
PS D:\Source\ezdxf.git> mypy --ignore-missing-imports -p ezdxf
Success: no issues found in 255 source files
Design¶
The Package Design for Developers section shows the structure of the ezdxf package for developers with more experience, which want to have more insight into the package an maybe want to develop add-ons or want contribute to the ezdxf package.
Internal Data Structures¶
- Entity Database
- Entity Space
- DXF Types
- DXFTag Factory Functions
- DXFTag
- DXFBinaryTag
- DXFVertex
- NONE_TAG
- Tags
Tags
Tags.from_text()
Tags.dxftype()
Tags.get_handle()
Tags.replace_handle()
Tags.has_tag()
Tags.has_embedded_objects()
Tags.get_first_tag()
Tags.get_first_value()
Tags.find_all()
Tags.filter()
Tags.collect_consecutive_tags()
Tags.tag_index()
Tags.update()
Tags.set_first()
Tags.remove_tags()
Tags.remove_tags_except()
Tags.pop_tags()
Tags.strip()
group_tags()
ExtendedTags
ExtendedTags.appdata
ExtendedTags.subclasses
ExtendedTags.xdata
ExtendedTags.embedded_objects
ExtendedTags.noclass
ExtendedTags.get_handle()
ExtendedTags.dxftype()
ExtendedTags.replace_handle()
ExtendedTags.legacy_repair()
ExtendedTags.clone()
ExtendedTags.flatten_subclasses()
ExtendedTags.get_subclass()
ExtendedTags.has_xdata()
ExtendedTags.get_xdata()
ExtendedTags.set_xdata()
ExtendedTags.new_xdata()
ExtendedTags.has_app_data()
ExtendedTags.get_app_data()
ExtendedTags.get_app_data_content()
ExtendedTags.set_app_data_content()
ExtendedTags.new_app_data()
ExtendedTags.from_text()
- Packed DXF Tags
- XData
- Application-Defined Data (AppData)
- Reactors