.. NutShell documentation, description .. _nutshell-variables: ================== NutShell Variables ================== .. _system-variables: System variables ================ =============== ============================ ================== Variable Description Example =============== ============================ ================== ``PRODUCT`` Product id, eg. "my.test.product" ``TIMESTAMP`` Numeric time or "LATEST"
"201708121600" or "LATEST" or "TIMESTAMP" \\-- ``YEAR`` Year (4 digits) "2017" \-- ``MONTH`` Month (2 digits) "08" \-- ``DAY`` Day (2 digits) "12" \-- ``HOUR`` Hour (2 digits) "16" \-- ``MINUTE`` Minute (2 digits) "00" ``PARAMETERS`` Product specific variables {"SIZE": "300", "NAME": "X"} \-- ```` Name of a variable "300" \-- ```` Name of a variable "X" \-- ... ... ... ``EXTENSION`` File format, including compression "txt.gz" ``FORMAT`` File format "txt" ``COMPRESSION`` File compression "gz" =============== ============================ ================== In code, nutshell.product.Info provides parsing of above parameters. Part of the variables come from :ref:`configuration` files read by nutshell.nutshell.ProductServer . Variable parsing scheme ======================= Parsing can be tested interactively: >>> import nutshell.product >>> p = nutshell.product.Info("201708121600_my.test.product_SIZE=300.pgm.gz") .. image:: img/nutshell-variables-dot.png