export
Tools for exporting data from the EleanorAI Framework
Classes
ExportCLI
Bases: BaseCLI
CLI tool to export JSON schemas for Pydantic models.
CLI base class
Warning
An odd behavior with Fire has been observed where subclasses of BaseCLI
take override __init__
and take parameters caus Fire to incorrectly
identify self
as a required CLI argument.
Parameters:
-
config
(str
, default:None
) –Path to configuration file
Attributes
IGNORED_PATHS
class-attribute
instance-attribute
Functions
json_schema
Generate and export JSON schemas for internal Pydantic types.
This command scans through Python packages recursively and looks for Pydantic models. When found, the model’s JSON schema will be exported and saved. Exported schemas are intended to be as human-readable as possible with proper indenting.
Parameters:
-
base_dir
(str
) –The base directory where exported JSON schemas will be saved.
The output naming convention is:
base_dir/version/eleanor/settings/module_path/pydantic_class_name.json
,
where version
is the current version of the eleanor
package.
If the destination folder base_dir/version
exists, it will be deleted along
with its contents.