Python 2.7 has reached end of support
and will be
deprecated
on January 31, 2026. After deprecation, you won't be able to deploy Python 2.7
applications, even if your organization previously used an organization policy to
re-enable deployments of legacy runtimes. Your existing Python
2.7 applications will continue to run and receive traffic after their
deprecation date. We recommend that
you
migrate to the latest supported version of Python.
Stay organized with collections
Save and categorize content based on your preferences.
google.appengine.ext.bulkload.bulkloader_parser module
Summary
Bulkloader Config Parser and runner.
A library to read bulkloader yaml configs. Returns a BulkloaderEntry object
which describes the bulkloader.yaml in object form, including some additional
parsing of things like Python lambdas.
Contents
- class google.appengine.ext.bulkload.bulkloader_parser.BulkloaderEntry(**attributes)source
-
Bases: google.appengine.api.validation.Validated
Root of the bulkloader configuration.
- ATTRIBUTES = {'transformers': <google.appengine.api.validation.Repeated object>, 'python_preamble': <google.appengine.api.validation.Optional object>}
- class google.appengine.ext.bulkload.bulkloader_parser.ConnectorOptions(**attributes)source
-
Bases: google.appengine.api.validation.Validated
Connector options.
- ATTRIBUTES = {'xpath_to_nodes': <google.appengine.api.validation.Optional object>, 'template': <google.appengine.api.validation.Optional object>, 'encoding': <google.appengine.api.validation.Optional object>, 'skip_import_header_row': <google.appengine.api.validation.Optional object>, 'epilog': <google.appengine.api.validation.Optional object>, 'style': <google.appengine.api.validation.Optional object>, 'import_options': <google.appengine.api.validation.Optional object>, 'print_export_header_row': <google.appengine.api.validation.Optional object>, 'mode': <google.appengine.api.validation.Optional object>, 'column_list': <google.appengine.api.validation.Optional object>, 'export_options': <google.appengine.api.validation.Optional object>, 'columns': <google.appengine.api.validation.Optional object>, 'prolog': <google.appengine.api.validation.Optional object>}
- CheckInitialized()source
-
Post-loading ‘validation’. Really used to fix up yaml hackyness.
- class google.appengine.ext.bulkload.bulkloader_parser.ConnectorSubOptions(**attributes)source
-
Bases: google.appengine.api.validation.Validated
Connector options.
- ATTRIBUTES = {'dialect': <google.appengine.api.validation.Optional object>, 'delimiter': <google.appengine.api.validation.Optional object>}
- class google.appengine.ext.bulkload.bulkloader_parser.EvaluatedCallablesource
-
Bases: google.appengine.api.validation.Validator
Validates that a string evaluates to a Python callable.
Calls eval at validation time and stores the results as a ParsedMethod object.
The ParsedMethod object can be used as a string (original value) or callable
(parsed method). It also exposes supports_bulkload_state if the callable has
a kwarg called ‘bulkload_state’, which is used to determine how to call
the *_transform methods.
- class ParsedMethod(value, key)source
-
Bases: object
Wrap the string, the eval’d method, and supports_bulkload_state.
- ToValue(value)source
-
Returns the code string for this value.
- Validate(value, key)source
Validates that the string compiles as a Python callable.
ParametersReturnsValue wrapped in an object with properties ‘value’ and ‘fn’.
RaisesInvalidCodeInConfiguration when value does not compile.
- class google.appengine.ext.bulkload.bulkloader_parser.ExportEntry(**attributes)source
-
Bases: google.appengine.api.validation.Validated
Describes the optional export transform for a single property.
- ATTRIBUTES = {'external_name': <google.appengine.api.validation.Optional object>, 'export_transform': <google.appengine.api.validation.Optional object>}
- class google.appengine.ext.bulkload.bulkloader_parser.PropertyEntry(**attributes)source
-
Bases: google.appengine.api.validation.Validated
Describes the transform for a single property.
- ATTRIBUTES = {'default_value': <google.appengine.api.validation.Optional object>, 'export': <google.appengine.api.validation.Optional object>, 'import_template': <google.appengine.api.validation.Optional object>, 'external_name': <google.appengine.api.validation.Optional object>, 'import_transform': <google.appengine.api.validation.Optional object>, 'property': <google.appengine.api.validation.Type object>, 'export_transform': <google.appengine.api.validation.Optional object>}
- CheckInitialized()source
Check that all required (combinations) of fields are set.
Also fills in computed properties.
RaisesInvalidConfiguration – If the config is invalid.
- class google.appengine.ext.bulkload.bulkloader_parser.PythonPreambleEntry(**attributes)source
-
Bases: google.appengine.api.validation.Validated
Python modules to import at initialization time, typically models.
- ATTRIBUTES = {'import': <google.appengine.api.validation.Type object>, 'as': <google.appengine.api.validation.Optional object>}
- CheckInitialized()source
-
Check that all required fields are set, and update global state.
The imports specified in the preamble are imported at this time.
- class google.appengine.ext.bulkload.bulkloader_parser.TransformerEntry(**attributes)source
-
Bases: google.appengine.api.validation.Validated
Describes the transform for an entity (or model) kind.
- ATTRIBUTES = {'connector': <google.appengine.api.validation.Type object>, 'kind': <google.appengine.api.validation.Optional object>, 'sort_key_from_entity': <google.appengine.api.validation.Optional object>, 'name': <google.appengine.api.validation.Optional object>, 'connector_options': <google.appengine.api.validation.Optional object>, 'property_map': <google.appengine.api.validation.Repeated object>, 'model': <google.appengine.api.validation.Optional object>, 'post_export_function': <google.appengine.api.validation.Optional object>, 'post_import_function': <google.appengine.api.validation.Optional object>, 'use_model_on_export': <google.appengine.api.validation.Optional object>}
- CheckInitialized()source
Check that all required (combinations) of fields are set.
Also fills in computed properties.
RaisesInvalidConfiguration – if the config is invalid.
- google.appengine.ext.bulkload.bulkloader_parser.load_config(stream, config_globals)source
Load a configuration file and generate importer and exporter classes.
ParametersReturnsBulkloaderEntry
RaisesInvalidConfiguration – If the config is invalid.
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2025-06-16 UTC.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-06-16 UTC."],[[["\u003cp\u003eThe \u003ccode\u003ebulkloader_parser\u003c/code\u003e module is designed to read and parse bulkloader YAML configuration files, returning a \u003ccode\u003eBulkloaderEntry\u003c/code\u003e object that represents the parsed configuration.\u003c/p\u003e\n"],["\u003cp\u003eClasses like \u003ccode\u003eConnectorOptions\u003c/code\u003e, \u003ccode\u003eConnectorSubOptions\u003c/code\u003e, \u003ccode\u003eExportEntry\u003c/code\u003e, \u003ccode\u003ePropertyEntry\u003c/code\u003e, \u003ccode\u003ePythonPreambleEntry\u003c/code\u003e, and \u003ccode\u003eTransformerEntry\u003c/code\u003e define the structure and attributes of various components within the bulkloader configuration.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003eEvaluatedCallable\u003c/code\u003e class validates and processes Python code strings within the configuration, ensuring they are callable functions and storing them as \u003ccode\u003eParsedMethod\u003c/code\u003e objects.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003eload_config\u003c/code\u003e function is responsible for reading a YAML configuration stream and generating importer and exporter classes, returning a \u003ccode\u003eBulkloaderEntry\u003c/code\u003e object, with validation for configuration accuracy.\u003c/p\u003e\n"],["\u003cp\u003eThe classes utilize the \u003ccode\u003eValidated\u003c/code\u003e base class to ensure proper configuration and validation of attributes like transformers, python preambles, and connector options, and the module imports specified in the preamble.\u003c/p\u003e\n"]]],[],null,["# google.appengine.ext.bulkload.bulkloader_parser module\n======================================================\n\nSummary\n-------\n\nBulkloader Config Parser and runner.\n\nA library to read bulkloader yaml configs. Returns a BulkloaderEntry object\nwhich describes the bulkloader.yaml in object form, including some additional\nparsing of things like Python lambdas.\n\nContents\n--------\n\n*class* google.appengine.ext.bulkload.bulkloader_parser.BulkloaderEntry(\\*\\*attributes)[source](/appengine/docs/legacy/standard/python/refdocs/modules/google/appengine/ext/bulkload/bulkloader_parser#BulkloaderEntry)\n\n: Bases: [google.appengine.api.validation.Validated](/appengine/docs/legacy/standard/python/refdocs/google.appengine.api.validation#google.appengine.api.validation.Validated)\n\n Root of the bulkloader configuration. \n\n ATTRIBUTES*= {'transformers': \\\u003cgoogle.appengine.api.validation.Repeated object\\\u003e, 'python_preamble': \\\u003cgoogle.appengine.api.validation.Optional object\\\u003e}*\n: \n\n*class* google.appengine.ext.bulkload.bulkloader_parser.ConnectorOptions(\\*\\*attributes)[source](/appengine/docs/legacy/standard/python/refdocs/modules/google/appengine/ext/bulkload/bulkloader_parser#ConnectorOptions)\n\n: Bases: [google.appengine.api.validation.Validated](/appengine/docs/legacy/standard/python/refdocs/google.appengine.api.validation#google.appengine.api.validation.Validated)\n\n Connector options. \n\n ATTRIBUTES*= {'xpath_to_nodes': \\\u003cgoogle.appengine.api.validation.Optional object\\\u003e, 'template': \\\u003cgoogle.appengine.api.validation.Optional object\\\u003e, 'encoding': \\\u003cgoogle.appengine.api.validation.Optional object\\\u003e, 'skip_import_header_row': \\\u003cgoogle.appengine.api.validation.Optional object\\\u003e, 'epilog': \\\u003cgoogle.appengine.api.validation.Optional object\\\u003e, 'style': \\\u003cgoogle.appengine.api.validation.Optional object\\\u003e, 'import_options': \\\u003cgoogle.appengine.api.validation.Optional object\\\u003e, 'print_export_header_row': \\\u003cgoogle.appengine.api.validation.Optional object\\\u003e, 'mode': \\\u003cgoogle.appengine.api.validation.Optional object\\\u003e, 'column_list': \\\u003cgoogle.appengine.api.validation.Optional object\\\u003e, 'export_options': \\\u003cgoogle.appengine.api.validation.Optional object\\\u003e, 'columns': \\\u003cgoogle.appengine.api.validation.Optional object\\\u003e, 'prolog': \\\u003cgoogle.appengine.api.validation.Optional object\\\u003e}*\n : \n\n CheckInitialized()[source](/appengine/docs/legacy/standard/python/refdocs/modules/google/appengine/ext/bulkload/bulkloader_parser#ConnectorOptions.CheckInitialized)\n\n : Post-loading 'validation'. Really used to fix up yaml hackyness.\n\n*class* google.appengine.ext.bulkload.bulkloader_parser.ConnectorSubOptions(\\*\\*attributes)[source](/appengine/docs/legacy/standard/python/refdocs/modules/google/appengine/ext/bulkload/bulkloader_parser#ConnectorSubOptions)\n\n: Bases: [google.appengine.api.validation.Validated](/appengine/docs/legacy/standard/python/refdocs/google.appengine.api.validation#google.appengine.api.validation.Validated)\n\n Connector options. \n\n ATTRIBUTES*= {'dialect': \\\u003cgoogle.appengine.api.validation.Optional object\\\u003e, 'delimiter': \\\u003cgoogle.appengine.api.validation.Optional object\\\u003e}*\n: \n\n*class* google.appengine.ext.bulkload.bulkloader_parser.EvaluatedCallable[source](/appengine/docs/legacy/standard/python/refdocs/modules/google/appengine/ext/bulkload/bulkloader_parser#EvaluatedCallable)\n\n: Bases: [google.appengine.api.validation.Validator](/appengine/docs/legacy/standard/python/refdocs/google.appengine.api.validation#google.appengine.api.validation.Validator)\n\n Validates that a string evaluates to a Python callable.\n\n Calls eval at validation time and stores the results as a ParsedMethod object.\n The ParsedMethod object can be used as a string (original value) or callable\n (parsed method). It also exposes supports_bulkload_state if the callable has\n a kwarg called 'bulkload_state', which is used to determine how to call\n the \\*_transform methods. \n\n *class* ParsedMethod(value, key)[source](/appengine/docs/legacy/standard/python/refdocs/modules/google/appengine/ext/bulkload/bulkloader_parser#EvaluatedCallable.ParsedMethod)\n\n : Bases: object\n\n Wrap the string, the eval'd method, and supports_bulkload_state. \n\n ToValue(value)[source](/appengine/docs/legacy/standard/python/refdocs/modules/google/appengine/ext/bulkload/bulkloader_parser#EvaluatedCallable.ToValue)\n\n : Returns the code string for this value.\n\n Validate(value, key)[source](/appengine/docs/legacy/standard/python/refdocs/modules/google/appengine/ext/bulkload/bulkloader_parser#EvaluatedCallable.Validate)\n\n : Validates that the string compiles as a Python callable.\n\n Parameters\n\n - value -- String to compile as a regular expression.\n\n - key -- The YAML field name.\n\n Returns\n\n Value wrapped in an object with properties 'value' and 'fn'.\n Raises\n\nInvalidCodeInConfiguration when value does not compile. \n\n*class* google.appengine.ext.bulkload.bulkloader_parser.ExportEntry(\\*\\*attributes)[source](/appengine/docs/legacy/standard/python/refdocs/modules/google/appengine/ext/bulkload/bulkloader_parser#ExportEntry)\n\n: Bases: [google.appengine.api.validation.Validated](/appengine/docs/legacy/standard/python/refdocs/google.appengine.api.validation#google.appengine.api.validation.Validated)\n\n Describes the optional export transform for a single property. \n\n ATTRIBUTES*= {'external_name': \\\u003cgoogle.appengine.api.validation.Optional object\\\u003e, 'export_transform': \\\u003cgoogle.appengine.api.validation.Optional object\\\u003e}*\n: \n\n*class* google.appengine.ext.bulkload.bulkloader_parser.PropertyEntry(\\*\\*attributes)[source](/appengine/docs/legacy/standard/python/refdocs/modules/google/appengine/ext/bulkload/bulkloader_parser#PropertyEntry)\n\n: Bases: [google.appengine.api.validation.Validated](/appengine/docs/legacy/standard/python/refdocs/google.appengine.api.validation#google.appengine.api.validation.Validated)\n\n Describes the transform for a single property. \n\n ATTRIBUTES*= {'default_value': \\\u003cgoogle.appengine.api.validation.Optional object\\\u003e, 'export': \\\u003cgoogle.appengine.api.validation.Optional object\\\u003e, 'import_template': \\\u003cgoogle.appengine.api.validation.Optional object\\\u003e, 'external_name': \\\u003cgoogle.appengine.api.validation.Optional object\\\u003e, 'import_transform': \\\u003cgoogle.appengine.api.validation.Optional object\\\u003e, 'property': \\\u003cgoogle.appengine.api.validation.Type object\\\u003e, 'export_transform': \\\u003cgoogle.appengine.api.validation.Optional object\\\u003e}*\n : \n\n CheckInitialized()[source](/appengine/docs/legacy/standard/python/refdocs/modules/google/appengine/ext/bulkload/bulkloader_parser#PropertyEntry.CheckInitialized)\n\n : Check that all required (combinations) of fields are set.\n\n Also fills in computed properties.\n Raises\n\nInvalidConfiguration -- If the config is invalid. \n\n*class* google.appengine.ext.bulkload.bulkloader_parser.PythonPreambleEntry(\\*\\*attributes)[source](/appengine/docs/legacy/standard/python/refdocs/modules/google/appengine/ext/bulkload/bulkloader_parser#PythonPreambleEntry)\n\n: Bases: [google.appengine.api.validation.Validated](/appengine/docs/legacy/standard/python/refdocs/google.appengine.api.validation#google.appengine.api.validation.Validated)\n\n Python modules to import at initialization time, typically models. \n\n ATTRIBUTES*= {'import': \\\u003cgoogle.appengine.api.validation.Type object\\\u003e, 'as': \\\u003cgoogle.appengine.api.validation.Optional object\\\u003e}*\n : \n\n CheckInitialized()[source](/appengine/docs/legacy/standard/python/refdocs/modules/google/appengine/ext/bulkload/bulkloader_parser#PythonPreambleEntry.CheckInitialized)\n\n : Check that all required fields are set, and update global state.\n\nThe imports specified in the preamble are imported at this time. \n\n*class* google.appengine.ext.bulkload.bulkloader_parser.TransformerEntry(\\*\\*attributes)[source](/appengine/docs/legacy/standard/python/refdocs/modules/google/appengine/ext/bulkload/bulkloader_parser#TransformerEntry)\n\n: Bases: [google.appengine.api.validation.Validated](/appengine/docs/legacy/standard/python/refdocs/google.appengine.api.validation#google.appengine.api.validation.Validated)\n\n Describes the transform for an entity (or model) kind. \n\n ATTRIBUTES*= {'connector': \\\u003cgoogle.appengine.api.validation.Type object\\\u003e, 'kind': \\\u003cgoogle.appengine.api.validation.Optional object\\\u003e, 'sort_key_from_entity': \\\u003cgoogle.appengine.api.validation.Optional object\\\u003e, 'name': \\\u003cgoogle.appengine.api.validation.Optional object\\\u003e, 'connector_options': \\\u003cgoogle.appengine.api.validation.Optional object\\\u003e, 'property_map': \\\u003cgoogle.appengine.api.validation.Repeated object\\\u003e, 'model': \\\u003cgoogle.appengine.api.validation.Optional object\\\u003e, 'post_export_function': \\\u003cgoogle.appengine.api.validation.Optional object\\\u003e, 'post_import_function': \\\u003cgoogle.appengine.api.validation.Optional object\\\u003e, 'use_model_on_export': \\\u003cgoogle.appengine.api.validation.Optional object\\\u003e}*\n : \n\n CheckInitialized()[source](/appengine/docs/legacy/standard/python/refdocs/modules/google/appengine/ext/bulkload/bulkloader_parser#TransformerEntry.CheckInitialized)\n\n : Check that all required (combinations) of fields are set.\n\n Also fills in computed properties.\n Raises\n\nInvalidConfiguration -- if the config is invalid. \n\ngoogle.appengine.ext.bulkload.bulkloader_parser.load_config(stream, config_globals)[source](/appengine/docs/legacy/standard/python/refdocs/modules/google/appengine/ext/bulkload/bulkloader_parser#load_config)\n\n: Load a configuration file and generate importer and exporter classes.\n\n Parameters\n\n - stream -- Stream containing config YAML.\n\n - config_globals -- Dict to use to reference globals for code in the config.\n\n Returns\n\n BulkloaderEntry\n Raises\n\n InvalidConfiguration -- If the config is invalid."]]