diff --git a/README.md b/README.md index 286be7f..c17b647 100644 --- a/README.md +++ b/README.md @@ -16,6 +16,7 @@ czml3 aims to make the process of writing CZML files in Python easy by: - Cooercion of data to their required format - Forbidding unrecognised properties - Creating minimal CZML files +- Performant JSON serialisation ## Insallation You can install czml3 using pip: diff --git a/docs/index.rst b/docs/index.rst index d0a43c9..b9fb718 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -16,6 +16,7 @@ czml3 aims to make the process of writing CZML files in Python easy by: * Cooercion of data to their required format * Forbidding unrecognised properties * Creating minimal CZML files +* Performant JSON serialisation .. toctree:: :maxdepth: 2 diff --git a/docs/user/features.rst b/docs/user/features.rst index 565c114..0c18c32 100644 --- a/docs/user/features.rst +++ b/docs/user/features.rst @@ -1,24 +1,31 @@ Features ======== -The goal of czml3 is to make the process of writing CZML files in Python easy. This page details the features that allow czml3 to achieve this goal. +czml3 is built upon `pydantic `_ and leverages a lot of it's capabilities to achieve this goal. Type Checking ------------- -All classes enforces type checking on the inputs. This ensures that the data is in the correct format before it is written to the CZML file. +Inputs to classes are type checked, which ensures that the data is in the correct format before it is written to the CZML file. Cooercion of Data ----------------- -czml3 `coerces data to their right type `_. See Example 2 in :ref:`examples-label`. +Inputted data to classes that is not of the specified type is `coerced to their right type `_. See Example 2 in :ref:`examples-label`. Forbid Unrecognised Properties ------------------------------ -czml3 raises an error if a model (class) receives an unrecognised input. +Unrecognised inputs to classes are forbidden, which ensures the CZML document contains only recognised and valid fields. + +If a valid property of a czml3 class is missing then please `open an issue `_. Minimal CZML File Creation -------------------------- -czml3 will remove all fields that are not set (i.e. ``None``). This ensures that the CZML file is as small as possible. +czml3 will remove all fields that are not set (i.e. ``None``), which ensures that the CZML file is as small as possible. + +Performant JSON Serialisation +-------------------------- + +Pydantic is very fast at JSON serialisation. See `here `_ for a breakdown.