鹰爪
fals的Python项目详细描述
#fal s y
fal.s.y
[屏幕截图](https://raw.githubusercontent.com/pingf/falsy/master/demo.gif)
为static
`mkdir static`
1创建目录。从falsy.falsy import falsy中编写服务器代码(main.py)
```python
编写yml文件
```
swagger:“2.0”
信息:
标题:falsy simple demo api
版本:“0.1”
消耗:
-应用程序/json
生成:
-应用程序/json
基本路径:“/v1”
路径:
'/hello':
获取:
标记:[方法]
operationid:demo.get_it
摘要:测试
参数:
-名称:name
in:query
类型:string
默认值:“john”
响应:
200:
描述:返回响应
````
3。编写操作处理程序(demo.py)
``python
def get_it(name):
return{
'get':name
}
````
4。运行它
`gunicorn-b 0.0.0:8001 main:api--reload-w 1--threads 1`
5。访问ui页面
`http://0.0.0.0:8001/v1/ui/`
确保它以“/”
[截图](https://raw.githubusercontent.com/pingf/falsy/master/falsy.gif)
有关详细信息,请参见demo dir中的文件。
fal.s.y
[屏幕截图](https://raw.githubusercontent.com/pingf/falsy/master/demo.gif)
为static
`mkdir static`
1创建目录。从falsy.falsy import falsy中编写服务器代码(main.py)
```python
编写yml文件
```
swagger:“2.0”
信息:
标题:falsy simple demo api
版本:“0.1”
消耗:
-应用程序/json
生成:
-应用程序/json
基本路径:“/v1”
路径:
'/hello':
获取:
标记:[方法]
operationid:demo.get_it
摘要:测试
参数:
-名称:name
in:query
类型:string
默认值:“john”
响应:
200:
描述:返回响应
````
3。编写操作处理程序(demo.py)
``python
def get_it(name):
return{
'get':name
}
````
4。运行它
`gunicorn-b 0.0.0:8001 main:api--reload-w 1--threads 1`
5。访问ui页面
`http://0.0.0.0:8001/v1/ui/`
确保它以“/”
[截图](https://raw.githubusercontent.com/pingf/falsy/master/falsy.gif)
有关详细信息,请参见demo dir中的文件。