Overview of Rye Configuration Steps
mainThe examples are organized into six progressive steps to demonstrate the capabilities of Rye configuration:
- Step 1: Minimal Server: Demonstrates pure data notation with key-value pairs and a basic markdown server.
- Step 2: Basic Computation: Introduces arithmetic operations (
*and+) and derived values within the config. - Step 3: Environment Variables: Demonstrates the
get-envbuiltin and theanycombinator for providing fallbacks when environment variables are missing. - Step 4: Route Registration: Shows the
routebuiltin and conditional logic usingifand=for dynamic routing. - Step 5: User Functions: Introduces the
fnkeyword for user-defined functions, including string operations likereplaceandcapitalize?. - Step 6: Debugging: Features the
probetool for value inspection andenter-consolefor live REPL debugging, including execution limits for safety.