Quantcast
Channel: David Underhill » Python
Browsing latest articles
Browse All 7 View Live

Python + Twisted Length-Type-Based Protocol Client / Server

It seems like I often have a need to work with a simple TCP protocol whose messages have a header which starts with the length of the message and an integer representing the message type (OpenFlow is...

View Article



Integrating Twisted with a pcap-based Python packet sniffer

Twisted is an awesome event-driven networking engine. Unfortunately, it does not have good support for interfacing with raw sockets (unlike its support for many network protocols, which is amazing)....

View Article

Python logging and performance: how to have your cake and eat it too

I love Python‘s logging module. I use it all the time to log a wide variety of information — messages to help me debug as well as informative messages for the user. Though you can toggle which messages...

View Article

FAST Google App Engine Sessions (and RPX integration)

The Google App Engine infrastructure provides many services, but sessions is not one of them. There are several Python-based session middlewares which already do this so I considered them first...

View Article

Rate limiting users requests on app engine (optionally with Captchas)

You may have some functionality on your app engine site that you want to protect from robots and prevent users from executing too frequently. For example, perhaps users can leave comments but you only...

View Article


Asynchronous URL Fetch manager for App Engine

App Engine’s URL Fetch API supports fetching URLs asynchronously.  However, a request handler may only simultaneously fetch up to 10 URLs.  To fetch more than 10, it must wait for one to finish before...

View Article

PostgreSQL UPSERT (in Python)

PostgreSQL does not yet support the UPSERT command (though it is on their Todo list). If you have a row you want to update (if it already exists in the database) or insert (if it doesn’t exist yet),...

View Article
Browsing latest articles
Browse All 7 View Live




Latest Images