Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我正在阅读 python-eve 的有关速率限制的文档,看起来它正在使用 redis 来存储“会话信息”,但是我找不到有关如何在 python-eve 中设置与 redis 的连接的文档?例如指定托管redis的服务器等?谢谢
您将 redis 实例传递给 Eve,因此您可以事先根据需要进行配置。我想这样的事情应该有效:
import redis from eve import Eve r = redis.StrictRedis(host='localhost', port=6379, db=0) app = Eve(redis=r) app.run()