【问题标题】:need some help authenticating to github API with python需要一些帮助使用 python 对 github API 进行身份验证
【发布时间】:2014-10-05 11:41:07
【问题描述】:

我已按照this 教程使用 Python 对 Github API 进行身份验证。

虽然,对我来说它不起作用,当我转到 localhost:5000 时,我收到“此网页不可用”消息。它只是说它从 localhost:5000 开始,并且在我执行 python github.py 后没有返回任何错误。我的目录/文件树看起来像:

-templates
 -login.html
 -about.html
-github.py
-github.db

执行后的消息:python github.py

 * Running on http://127.0.0.1:5000/
 * Restarting with reloader

我做错了什么,有什么办法可以使这项工作正常进行吗?

或者,在使用 Python 对 Github API 进行身份验证方面是否有其他选择?找不到,但有吗?

【问题讨论】:

  • 或者有没有其他方法可以使用 Python 对 Github API 进行身份验证。找不到,但有吗?
  • PyGithub 接受 OAuth2 令牌,具体取决于您要执行的操作。
  • 教程链接失效

标签: python oauth flask github-api rauth


【解决方案1】:

文件夹名称区分大小写。您已将文件夹命名为 Templates,但 Flask 正在寻找一个名为 templates 的文件夹。

【讨论】:

  • 感谢您的回答!但这并不能解决问题。你有更多建议吗?
  • 没有看到你的实际代码。使用教程中提供的代码访问 localhost:5000 会呈现 templates/login.html
猜你喜欢
  • 2012-06-01
  • 2015-11-30
  • 2010-10-03
  • 1970-01-01
  • 2013-08-03
  • 1970-01-01
  • 2015-09-10
  • 2018-06-08
  • 1970-01-01
相关资源
最近更新 更多