[Twisted-Python] twisted.mail.imap4.IMAP4Client.fetchMessage always throws exception

2015-09-03 Thread Wang Yan
Hi, I've installed Twisted 15.3.0 on Ubuntu 14.04LTS. Excellent work but there's one problem bothering me for a long time: twisted.mail.imap4.IMAP4Client.fetchMessage always throws exception and the exception occured at random, e.g. somtimes the exception occured when the program read the 120t

[Twisted-Python] How to design REST API with Twisted?

2015-10-25 Thread Wang Yan
Hi, I'm confused about how to design REST APIs with Twisted, especially when my app have to interact with MySQL. Is there any basic design patterns for this kind of situation? Thanks!___ Twisted-Python mailing list Twisted-Python@twistedmatrix.com

Re: [Twisted-Python] How to design REST API with Twisted?

2015-11-03 Thread Wang Yan
urces? At 2015-10-25 20:13:58, "Burak Arslan" wrote: Hey! On 10/25/15 13:04, Wang Yan wrote: Hi, I'm confused about how to design REST APIs with Twisted, especially when my app have to interact with MySQL. Is there any basic design patterns for this kind of situation? I

Re: [Twisted-Python] How to design REST API with Twisted?

2015-11-05 Thread Wang Yan
t Sarker Shakkhar" 写道: On 11/3/15 10:15 PM, Wang Yan wrote: I'm planning to design some REST APIs with Twisted in Python. For example, I want to use the HTTP method "GET" to fetch a single user's information: GET http://myhost:8000/api/v1.0/users/[user_id] I know I sh

Re: [Twisted-Python] How to design REST API with Twisted?

2015-11-12 Thread Wang Yan
need a filter, but I'm not sure how to implement such a filter or resource with Twisted and Klein. 在 2015-11-06 06:02:53,"Glyph Lefkowitz" 写道: On Nov 5, 2015, at 1:28 AM, Wang Yan wrote: Thank you to remind me of Klein. I'm very new to Twisted and Klein. What I'

[Twisted-Python] How to design /login and /logout resources with twisted.web.server.Session

2015-12-05 Thread Wang Yan
I'm trying to implement login/logout function for my app. Both /login and /logout are designed to be resource to provide RESTful web service. I guess those functions must interact with sessions and cookies, so I've read some documents such as https://twistedmatrix.com/documents/current/web/howt

[Twisted-Python] What are the relationships between twisted.cred.portal.IRealm, Portal and avatar

2015-12-13 Thread Wang Yan
I'm trying to use Twisted's HTTP basic authentication to control access to some protected resources. According to some articles, it is necessary to use three important concepts: Realm, Portal and avatar. Now I'm wondering if the Realm and avatar is one to one correspondence. Let's look at an