-
Notifications
You must be signed in to change notification settings - Fork 120
Home
<!DOCTYPE html>
TFTPy is a pure Python implementation of the Trivial FTP protocol.
I wrote it because the VoIP company that I work for uses TFTP to pull firmware loads for our sets, and at times when this doesn’t work we use a Windows-based diagnostic tool to troubleshoot the connection.
As all of the computers in my home run some flavour of <a href=“http://en.wikipedia.org/wiki/Linux”>Linux or <a href=“http://en.wikipedia.org/wiki/Freebsd”>FreeBSD, this tool wasn’t much use to me, so I started one of my own. I decided to use Python since it’s comfortable and available for the platforms that I care about, and was surprised to not find a pre-existing TFTP library for it. So, I wrote one, and here it is. It’s not 1.0 yet, but downloading is production-ready IMHO, as some of the people using it tell me.
At this time, it supports the following RFCs:
-
1350
The TFTP Protocol, revision 2 (octet mode only) - 2347 TFTP Option Extension
- 2348 TFTP Blocksize Option
- 2349 TFTP Timeout Interval and Transfer Size Options (just the tsize option right now)
I do have plans for this code before a 1.0 release, including the following:
- Full RFC 1350 compliance, including netascii mode (I could
care less about “mail” mode). - Symmetric UDP support. I don’t know of an RFC for this but
it’s a no-brainer for NAT traversal. In this mode the server
should always respond on the port that the RRQ was sent to, so
stateful firewalls will permit the response. - Documentation!
You can find the latest release at the SourceForge <a href=“http://www.sf.net/projects/tftpy/”>Project Page, as a source tarball. It should also be in <a href=“http://pypi.python.org/pypi”>PyPi, so you can use easy_install if you prefer.
The latest code though is always on the master branch in <a href=“http://github.com”>Github. I did use SVN in SourceForge for a while, but after discovering Git I couldn’t go back. To clone the repository, run the following command using git
git clone git://github.com/msoulier/tftpy.gitPatches welcome, even if I can’t guarantee response time. You can of course send me the url of a public git repository to pull from as well.
The Github project page is right
here.
SourceForge doesn’t make the mailing list easy to find, so <a href=“https://lists.sourceforge.net/lists/listinfo/tftpy-general”>here is a direct link if you’d like to join.
Feel free to email me with any questions, or contact me through github.
To submit a bug report, please use the issue tracker in the Github project page. I’ve shut down the trackers at sourceforge for now.
I am working on some documentation via the Sphinx project. The current ones are here.
Last updated: May 10, 2010.