没有项目描述
macros的Python项目详细描述
宏
=====
版本0.0.1。
宏是hy宏的集合。它将被开发
进一步提供更多便利。这是一个非常早期的阶段。
不要在生产中使用。
安装时
…代码块::sh
pip安装git+git://github.com/hylands/macros.git
最新版本,或
…代码块::sh
pip安装宏
更稳定的版本。
然后使用hy中的宏
…代码块::hy
(需要宏烧瓶)
(需要宏流)
然后使用route宏。
…代码块::hy
(route“/”home.html“)
(路线“/”(defn womethods[](“你好,世界”))
(route“/”[“get”“post”](defn wmethods[](“你好,世界”))
(route“/”[“get”“post”]“templatewmethods.html”)
(route“/<;name>;/<;address>;”template.html“[名称][[地址”不适用]])
语法用于模板:
…代码块::hy
(route*route endpoint*[*可能是方法列表*]*模板*[*必需参数*][*可选参数*])
其中*可选参数*的格式可以是[arg1 arg2],默认值为none
或[[arg1 42]arg2],其中arg1的默认值为42,而arg2的默认值为none。
=====
版本0.0.1。
宏是hy宏的集合。它将被开发
进一步提供更多便利。这是一个非常早期的阶段。
不要在生产中使用。
安装时
…代码块::sh
pip安装git+git://github.com/hylands/macros.git
最新版本,或
…代码块::sh
pip安装宏
更稳定的版本。
然后使用hy中的宏
…代码块::hy
(需要宏烧瓶)
(需要宏流)
然后使用route宏。
…代码块::hy
(route“/”home.html“)
(路线“/”(defn womethods[](“你好,世界”))
(route“/”[“get”“post”](defn wmethods[](“你好,世界”))
(route“/”[“get”“post”]“templatewmethods.html”)
(route“/<;name>;/<;address>;”template.html“[名称][[地址”不适用]])
语法用于模板:
…代码块::hy
(route*route endpoint*[*可能是方法列表*]*模板*[*必需参数*][*可选参数*])
其中*可选参数*的格式可以是[arg1 arg2],默认值为none
或[[arg1 42]arg2],其中arg1的默认值为42,而arg2的默认值为none。