Code Generator

This SDK includes a code generation tool called sila2-codegen. It can be used to generate full SiLA Server/Client packages.

Use sila2-codegen --help to receive a list of possible options:

                                                                                
 Usage: sila2-codegen [OPTIONS] COMMAND [ARGS]...                               
                                                                                
 SiLA 2 Python Code Generator                                                   
                                                                                
╭─ Options ────────────────────────────────────────────────────────────────────╮
│ --debug                 --no-debug      Display more detailed error messages │
│                                         [default: no-debug]                  │
│ --install-completion                    Install completion for the current   │
│                                         shell.                               │
│ --show-completion                       Show completion for the current      │
│                                         shell, to copy it or customize the   │
│                                         installation.                        │
│ --help                                  Show this message and exit.          │
╰──────────────────────────────────────────────────────────────────────────────╯
╭─ Commands ───────────────────────────────────────────────────────────────────╮
│ add-features             Add features to previously generated package        │
│ generate-feature-files   Generate feature-specific Python files without      │
│                          generating a full server/client package.            │
│ new-package              Generate a SiLA 2 Server/Client Python package from │
│                          given feature definitions                           │
│ update                   Update a previously generated package after         │
│                          modifications to the feature definitions (refreshes │
│                          the 'generated' submodule)                          │
╰──────────────────────────────────────────────────────────────────────────────╯
/usr/local/lib/python3.8/site-packages/google/protobuf/runtime_version.py:112: UserWarning: Protobuf gencode version 5.27.2 is older than the runtime version 5.28.0 at SiLAFramework.proto. Please avoid checked-in Protobuf gencode that can be obsolete.
  warnings.warn(
/usr/local/lib/python3.8/site-packages/google/protobuf/runtime_version.py:112: UserWarning: Protobuf gencode version 5.27.2 is older than the runtime version 5.28.0 at SiLABinaryTransfer.proto. Please avoid checked-in Protobuf gencode that can be obsolete.
  warnings.warn(