[Twisted-Python] ftp server

Christopher Armstrong radeex at gmail.com
Tue Mar 21 20:50:29 EST 2006


On 3/21/06, John Pote <johnpote at jptechnical.co.uk> wrote:
>
> API stability: FTPClient is stable, FTP and FTPFactory (server) is
> unstable.



> As it is the server that I am interested in the 'unstable' comment is
> somewhat worrying. Any comments on this instability would be
> appreciated. i.e. is it particular situations that cause problems or are
> there general problems with the server that may occur doing simple
> things.
>

First, note that it refers to *API* stability, not performance stability.
The only thing "unstable" means in this context is that we reserve the right
to change the interface of the FTP server in a way that could possibly break
end-user code, although that's only if backwards compatibility is
impossible. In practice, code written against an "unstable" Twisted
interface doesn't often  break outright upon upgrade; instead deprecated
APIs will give you warnings when you continue to use them, and hopefully
sufficiently describe the correct way to use the functionality.

Also I do not want the uploaded file contents written directly to disk.
> I want to pass it to another python app/object to decode it, format it
> and finally append it to a file on disk. Could the Twisted ftp server
> allow such 'filtering'? The reason for doing this via ftp is the data
> source client is a GPRS modem that has ftp built in (but not http). The
> alternative is to do my own thing directly via TCP. Comments invited.


The FTP server framework definitely supports such things, although you have
to go through a bit of boilerplate. You eventually end up implementing your
own IConsumer to handle the data, which means you'll get chunks of data
handed to you as it comes in and you can do what you want with it.

Hope this helps. If you need any more detailed info feel free to post again.


--
Christopher Armstrong
International Man of Twistery
http://radix.twistedmatrix.com/
http://twistedmatrix.com/
http://canonical.com/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://twistedmatrix.com/pipermail/twisted-python/attachments/20060321/d29a5a3c/attachment.htm 


More information about the Twisted-Python mailing list