腾讯云
开发者社区
文档
建议反馈
控制台
登录/注册
首页
学习
活动
专区
圈层
工具
MCP广场
文章/答案/技术大牛
搜索
搜索
关闭
发布
文章
问答
(9999+)
视频
沙龙
1
回答
如
何在
flask
restful
api
应用
中
配置
basepath
?
、
、
我想为我的
flask
应用
程序设置一个基本路径。我在下面提到了一个例子。
basepath
= 'http://localhost:3000/
api
' 我有两个
api
调用,一个是GET,另一个是POST。from
flask
import
Flask
app =
Flask
(__name__)
浏览 39
提问于2020-01-20
得票数 0
回答已采纳
2
回答
json在烧瓶
restful
上序列化日期
、
,default=str)来包装它,但我发现有一种方法可以在烧瓶-
restful
上强制执行。我只是不清楚到底需要做些什么。我特别读到: representation will formatJSON by providing a
RESTFUL
_JSON我终于解决了这个问题:
浏览 5
提问于2017-01-18
得票数 7
回答已采纳
4
回答
没有名为
flask
.ext.
restful
的模块
、
✱ File "mainDAL.py", line 4, in <module> File "/Users/partuck/.virtualenvs/dal/lib/python2.7/site-packages/
flask
/exthoo
浏览 1
提问于2015-01-12
得票数 9
回答已采纳
1
回答
如何从烧瓶中提取数据到角度?
、
有什么办法可以从烧瓶
中
拿出数据并发送到角度吗?这些数据将被用于我的一个高图表的角度。
浏览 2
提问于2022-02-22
得票数 0
1
回答
如何让
Flask
_restplus使用来自app_errorhandler的错误处理程序?
、
、
、
、
@error_bp.app_errorhandler(NotFound) return "Error 404", 404因此,我的问题是:如
何在
API
中使用app_errorhandler
浏览 1
提问于2018-12-15
得票数 3
回答已采纳
3
回答
用烧瓶定义URL根
、
、
我有多个路径,它们有相同的URL根。示例: 谢谢
浏览 6
提问于2016-01-18
得票数 2
3
回答
在大型
应用
中使用烧瓶
Restful
作为蓝图
、
我正在尝试使用烧瓶
restful
作为蓝图,在一个模式,为其他蓝图工作。import
Flask
from
flask
_bootstrap import Bootstrapbootstrap = Bootstrap() app =
Flask</
浏览 4
提问于2016-07-19
得票数 4
回答已采纳
2
回答
如何使用
Flask
REST JSON模块向所有路由添加前缀?
、
显示您可以创建这样的route():
api
.route(PostDetail, 'post_detail', '/posts/<int:id>') 但我希望我的所有路线都像/
api
/posts和/
api
/poss/<int:id>那样,我希望避免在每个ro
浏览 5
提问于2021-03-20
得票数 0
回答已采纳
3
回答
无法使用
Flask
Blueprints和Swagger UI获取
API
规范
、
、
、
、
因此,按照swagger ui使用
flask
blueprints ()的示例,我有以下代码:test_blueprint = Blueprint('tests', __name__) test_
api
= swagger.docs(
restful
.
Api
(test_blueprint), apiVersion='0.1',
basePath
='http://localhos
浏览 1
提问于2014-08-25
得票数 4
1
回答
python烧瓶-在google云引擎
中
的
restful
部署
、
、
我正在第一次将Python
应用
程序部署到GAE
中
,它使用
Flask
作为REST服务器,我无法理解如何正确
配置
部署的概念。我正在尝试使用最小的烧瓶-
restful
应用
程序示例minimal.pyfrom
flask
_
restful
import Resource,
Api
app =
Flask
(__name__)
api</e
浏览 0
提问于2018-05-19
得票数 0
回答已采纳
1
回答
烧瓶
api
表示会影响所有视图。
、
、
、
、
我需要有两个逻辑上相同的视图来响应不同内容类型
中
的相同数据。我用的是
RESTful
。APP =
flask
.
Flask
(__name__) @
API
.representation('text/csv')return resp
浏览 1
提问于2015-07-27
得票数 2
回答已采纳
3
回答
使用
Flask
创建
RESTful
应用
程序接口?
、
、
、
Flask
教程站点指出,要创建
RESTful
应用
程序接口,您需要编写扩展
restful
.Resource的类,然后通过以下方式将其添加到
应用
程序接口中:
api
=
restful
.
Api
(app) def get(self): return {'hello':
浏览 0
提问于2015-01-20
得票数 18
回答已采纳
2
回答
RESTful
API
在烧瓶
中
的
应用
实例
、
、
、
有人能给我举几个例子,说明如何制作一个使用
RESTful
中
数据库信息的
API
吗?我不知道如何实现POST,PUT和DELETE,我总是在无法在url中使用该方法时得到405错误。
浏览 5
提问于2016-11-01
得票数 0
回答已采纳
2
回答
如何提到过程的数量?就像它是如何用Flaks做的
、
、
、
、
我试图用* Django和*烧瓶创建一个简单的Fibonacci web服务from
flask
import
Flask
, request, Response, jsonify from
flask
_
restful
import abor
浏览 4
提问于2017-07-07
得票数 1
回答已采纳
1
回答
AttributeError:类主页没有属性“as_view”
、
我使用的是
Flask
Restful
,我想在根端点上呈现一个HTML file:app =
Flask
( __name_,我会得到以下错误: File "/home/vagrant/.local/lib/python2.7/
浏览 1
提问于2018-10-19
得票数 2
回答已采纳
3
回答
Flask
-
restful
-自定义错误处理
、
、
我想为
Flask
-
restful
API
定义自定义错误处理。documentation
中
建议的方法是执行以下操作: 'UserAlreadyExistsError': { },app =
Flask
(__name__)
api
=
flask
_
restful
.
Api</em
浏览 5
提问于2016-12-15
得票数 10
1
回答
python烧瓶-
restful
无法在资源类
中
访问
应用
程序。
、
、
下面是来自的示例代码from
flask
.ext import
restful
api
=
restful
.
Api
import
Flask
from resource.HelloWorld import HelloWorld app = <em
浏览 2
提问于2014-02-11
得票数 2
回答已采纳
3
回答
如
何在
网站的子文件夹上托管一个烧瓶
应用
程序?
、
我有一个烧瓶
应用
程序,我想把它放在一个网站的子文件夹,
如
example.com/cn。我
配置
了我的nginx proxy_pass http://localhost:8000/;因此,如果我访问example.com/cn,它将重定向到烧瓶的索引页
浏览 2
提问于2021-05-28
得票数 3
回答已采纳
1
回答
如何强制一个烧瓶-
restful
应用
程序将post体解释为json,而忽略了请求的mime类型
、
、
、
我有一个python
flask
-
restful
应用
程序,它在post
中
接收json。这里有两个最小文件app.py和info.pyfrom
flask
import
Flask
api
浏览 2
提问于2016-07-15
得票数 0
回答已采纳
1
回答
Python
Flask
-
Restful
-对象没有端点
、
晚上好,基本信息是在我的扩展文件
中
定义的
api
=
restful
.
Api
() 然后在我的app.py文件
中
configure_blueprints(app, bl
浏览 0
提问于2013-05-16
得票数 1
点击加载更多
热门
标签
更多标签
云服务器
ICP备案
云直播
腾讯会议
实时音视频
活动推荐
运营活动
广告
关闭
领券