.. _pyxbgen-cli: ``pyxbgen`` Command Line Options ================================ Generic Options --------------- .. table:: Generic Options ============= ========= ====== ================================================== Long Option Argument Alt Description ============= ========= ====== ================================================== ``--version`` :ref:`show program's version number and exit` ``--help`` ``-h`` :ref:`show this help message and exit` ============= ========= ====== ================================================== .. _pyxbgen--version: ``--version`` ^^^^^^^^^^^^^ show program's version number and exit .. _pyxbgen--help: ``--help`` ^^^^^^^^^^ show this help message and exit Identifying Schema ------------------ Specify and locate schema for which bindings should be generated. .. table:: Identifying Schema =================================== ============= ====== ================================================== Long Option Argument Alt Description =================================== ============= ====== ================================================== ``--schema-location`` *FILE_or_URL* ``-u`` :ref:`Add the location of an entrypoint schema. The...` ``--schema-root`` *DIRECTORY* :ref:`The directory from which entrypoint schemas...` ``--schema-stripped-prefix`` *TEXT* :ref:`Optional string that is stripped from the...` ``--location-prefix-rewrite`` *TEXT* :ref:`Add a rewrite entry for schema locations....` ``--uri-content-archive-directory`` *DIRECTORY* :ref:`The directory path into which any content...` =================================== ============= ====== ================================================== .. _pyxbgen--schema-location: ``--schema-location`` ^^^^^^^^^^^^^^^^^^^^^ Add the location of an entrypoint schema. The provided value should be a URL; if it does not have a URL scheme (e.g., ``http:``), it is assumed to be a file, and if it is not an absolute path is located relative to the ``schemaRoot``. .. _pyxbgen--schema-root: ``--schema-root`` ^^^^^^^^^^^^^^^^^ The directory from which entrypoint schemas specified as relative file paths will be read. .. _pyxbgen--schema-stripped-prefix: ``--schema-stripped-prefix`` ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Optional string that is stripped from the beginning of schemaLocation values before loading from them. This applies only to the values of schemaLocation attributes in ``import`` and ``include`` elements. Its purpose is to convert absolute schema locations into relative ones to allow offline processing when all schema are available in a local directory. See ``schemaRoot``. .. _pyxbgen--location-prefix-rewrite: ``--location-prefix-rewrite`` ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Add a rewrite entry for schema locations. Parameter values are strings of the form ``pfx=sub``. The effect is that a schema location that begins with ``pfx`` is rewritten so that it instead begins with ``sub``. .. _pyxbgen--uri-content-archive-directory: ``--uri-content-archive-directory`` ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ The directory path into which any content retrieved by URI will be written. This serves as a local cache, and to give you an opportunity to inspect material retrieved from some other system. @rtype: ``str`` Configuring Bindings -------------------- Specify where generated bindings should be written, and how they will be accessed from Python. .. table:: Configuring Bindings ================================ =========== ====== ================================================== Long Option Argument Alt Description ================================ =========== ====== ================================================== ``--module`` *MODULE* ``-m`` :ref:`Add a module name corresponding to an entrypoint...` ``--module-prefix`` *MODULE* :ref:`The prefix for binding modules. The base name for...` ``--binding-root`` *DIRECTORY* :ref:`The directory path into which generated bindings...` ``--write-for-customization`` ``-r`` :ref:`Indicates whether the binding Python code should...` ``--no-write-for-customization`` :ref:`Indicates whether the binding Python code should...` ================================ =========== ====== ================================================== .. _pyxbgen--module: ``--module`` ^^^^^^^^^^^^ Add a module name corresponding to an entrypoint schema. The namespace defined by the corresponding schema will be written to a binding using the given module name, adjusted by L{modulePrefix}. .. _pyxbgen--module-prefix: ``--module-prefix`` ^^^^^^^^^^^^^^^^^^^ The prefix for binding modules. The base name for the module holding a binding is taken from the moduleList, moduleMap, or an XMLNS prefix associated with the namespace in a containing schema. This value, if present, is used as a prefix to allow a deeper module hierarchy. .. _pyxbgen--binding-root: ``--binding-root`` ^^^^^^^^^^^^^^^^^^ The directory path into which generated bindings will be written. @rtype: ``str`` .. _pyxbgen--write-for-customization: ``--write-for-customization`` ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Indicates whether the binding Python code should be written into a sub- module for customization. If enabled, a module ``path.to.namespace`` will be written to the file ``path/to/raw/namespace.py``, so that the file ``path/to/namespace.py`` can import it and override behavior. This option turns on the feature. .. _pyxbgen--no-write-for-customization: ``--no-write-for-customization`` ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Indicates whether the binding Python code should be written into a sub- module for customization. If enabled, a module ``path.to.namespace`` will be written to the file ``path/to/raw/namespace.py``, so that the file ``path/to/namespace.py`` can import it and override behavior. This option turns off the feature (*default*). Reading Namespace Archives -------------------------- Locating and loading (or inhibiting load of) namespace archives. .. table:: Reading Namespace Archives ======================= ========= ==== ================================================== Long Option Argument Alt Description ======================= ========= ==== ================================================== ``--archive-path`` *PATH* :ref:`A colon-separated list of paths from which...` ``--pre-load-archive`` *FILE* :ref:`Name of a file containing a stored archive from...` ``--no-load-namespace`` *URI* :ref:`Mark that the specified namespace should not be...` ======================= ========= ==== ================================================== .. _pyxbgen--archive-path: ``--archive-path`` ^^^^^^^^^^^^^^^^^^ A colon-separated list of paths from which namespace archives can be read. The default path is the contents of the ``PYXB_ARCHIVE_PATH`` environment variable, or the standard path configured at installation time. Any file with the extension ``.wxs`` found in one of these directories is examined to see whether it is a namespace archive. .. _pyxbgen--pre-load-archive: ``--pre-load-archive`` ^^^^^^^^^^^^^^^^^^^^^^ Name of a file containing a stored archive from which namespaces should be read prior to processing schema. Files to be pre-loaded are not affected by ``noLoadNamespace``. .. _pyxbgen--no-load-namespace: ``--no-load-namespace`` ^^^^^^^^^^^^^^^^^^^^^^^ Mark that the specified namespace should not be loaded from an archive. Use this when you are generating bindings for an application that has a restricted profile of a namespace that would otherwise be read from an archive. Be aware that this removes any knowledge of any archive in which this namespace is present as a non-private member. Writing Namespace Archives -------------------------- Control the location and content of a namespace archive corresponding to a binding generation. .. table:: Writing Namespace Archives =============================== ========= ==== ================================================== Long Option Argument Alt Description =============================== ========= ==== ================================================== ``--archive-to-file`` *FILE* :ref:`Optional file into which the archive of namespaces...` ``--public-namespace`` *URI* :ref:`Indicates, for specific namespaces, whether their...` ``--private-namespace`` *URI* :ref:`Indicates, for specific namespaces, whether their...` ``--default-namespace-public`` :ref:`Indicates whether unmentioned namespaces will be...` ``--default-namespace-private`` :ref:`Indicates whether unmentioned namespaces will be...` =============================== ========= ==== ================================================== .. _pyxbgen--archive-to-file: ``--archive-to-file`` ^^^^^^^^^^^^^^^^^^^^^ Optional file into which the archive of namespaces will be written. Subsequent generation actions can read pre-parsed namespaces from this file, and therefore reference the bindings that were built earlier rather than re-generating them. The file name should normally end with ``.wxs``. .. _pyxbgen--public-namespace: ``--public-namespace`` ^^^^^^^^^^^^^^^^^^^^^^ Indicates, for specific namespaces, whether their visibility in the archive should be public or private. This option adds the namespace as a public archive member. .. _pyxbgen--private-namespace: ``--private-namespace`` ^^^^^^^^^^^^^^^^^^^^^^^ Indicates, for specific namespaces, whether their visibility in the archive should be public or private. This option adds the namespace as a private archive member. .. _pyxbgen--default-namespace-public: ``--default-namespace-public`` ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Indicates whether unmentioned namespaces will be public or private (default) in the archive. A namespace is *mentioned* if it is the target namespace of an entrypoint schema, or appears in a namespace visibility specification. I.e., this default applies only to namespaces that are modified as a result of including some schema, which is generally a local customization of something. This option makes the default ``public`` (*default*). .. _pyxbgen--default-namespace-private: ``--default-namespace-private`` ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Indicates whether unmentioned namespaces will be public or private (default) in the archive. A namespace is *mentioned* if it is the target namespace of an entrypoint schema, or appears in a namespace visibility specification. I.e., this default applies only to namespaces that are modified as a result of including some schema, which is generally a local customization of something. This option makes the default ``private``. Configuring Binding Code Generation ----------------------------------- Control the style and content of the generated bindings. This is not well-supported, and you are advised to pretend these options don't exist. .. table:: Configuring Binding Code Generation ========================= ========= ==== ================================================== Long Option Argument Alt Description ========================= ========= ==== ================================================== ``--validate-changes`` :ref:`Indicates whether the bindings should validate...` ``--no-validate-changes`` :ref:`Indicates whether the bindings should validate...` ========================= ========= ==== ================================================== .. _pyxbgen--validate-changes: ``--validate-changes`` ^^^^^^^^^^^^^^^^^^^^^^ Indicates whether the bindings should validate mutations against the content model. This option turns on validation (default). .. _pyxbgen--no-validate-changes: ``--no-validate-changes`` ^^^^^^^^^^^^^^^^^^^^^^^^^ Indicates whether the bindings should validate mutations against the content model. This option turns off validation. Miscellaneous Options --------------------- Anything else. .. table:: Miscellaneous Options ========================= ========= ==== ================================================== Long Option Argument Alt Description ========================= ========= ==== ================================================== ``--logging-config-file`` *FILE* :ref:`A file provided to L{logging.config.fileConfig} to...` ========================= ========= ==== ================================================== .. _pyxbgen--logging-config-file: ``--logging-config-file`` ^^^^^^^^^^^^^^^^^^^^^^^^^ A file provided to L{logging.config.fileConfig} to control log messages. In the absence of other configuration the Python standard logging infrastructure is used in its default configuration. @rtype: ``str`` Maintainer Options ------------------ Don't use these. They don't exist. If they did, they'd do different things at different times, and if you used them you'd probably be sorry. .. table:: Maintainer Options ================================= ========= ==== ================================================== Long Option Argument Alt Description ================================= ========= ==== ================================================== ``--allow-absent-module`` :ref:`Indicates whether the code generator is permitted...` ``--no-allow-absent-module`` :ref:`Indicates whether the code generator is permitted...` ``--allow-builtin-generation`` :ref:`Indicates whether bindings will be written for...` ``--no-allow-builtin-generation`` :ref:`Indicates whether bindings will be written for...` ================================= ========= ==== ================================================== .. _pyxbgen--allow-absent-module: ``--allow-absent-module`` ^^^^^^^^^^^^^^^^^^^^^^^^^ Indicates whether the code generator is permitted to process namespace for which no module path can be determined. Use this only when generating bindings that will not be referenced by other bindings. This option turns on the feature. .. _pyxbgen--no-allow-absent-module: ``--no-allow-absent-module`` ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Indicates whether the code generator is permitted to process namespace for which no module path can be determined. Use this only when generating bindings that will not be referenced by other bindings. This option turns off the feature (default). .. _pyxbgen--allow-builtin-generation: ``--allow-builtin-generation`` ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Indicates whether bindings will be written for namespaces that are built-in to PyXB. This must be enabled when building bindings for the XML, XMLSchema instance, and other built-in namespaces. Normally generation of these namespaces is inhibited lest it produce inconsistencies. This option turns on the feature. .. _pyxbgen--no-allow-builtin-generation: ``--no-allow-builtin-generation`` ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Indicates whether bindings will be written for namespaces that are built-in to PyXB. This must be enabled when building bindings for the XML, XMLSchema instance, and other built-in namespaces. Normally generation of these namespaces is inhibited lest it produce inconsistencies. This option turns off the feature (default). WSDL Options ------------ Options relevant to generating bindings from WSDL service descriptions .. table:: WSDL Options =================== ============= ====== ================================================== Long Option Argument Alt Description =================== ============= ====== ================================================== ``--wsdl-location`` *FILE_or_URL* ``-W`` :ref:`Generate bindings for the types stanza of the...` =================== ============= ====== ================================================== .. _pyxbgen--wsdl-location: ``--wsdl-location`` ^^^^^^^^^^^^^^^^^^^ Generate bindings for the ``types`` stanza of the WSDL at this location. This option is equivalent to retrieving the WSDL, extracting the schema part of its ``types`` block to a file, and using that file as a ``--schema-location``.