Archive for the ‘Python’ Category

Adobe AIR 2 example: UDP sockets with PyAMF and Twisted

Tuesday, January 19th, 2010

The upcoming release of Adobe AIR will provide support for UDP sockets, allowing you to send and receive messages using the Universal Datagram Protocol (UDP).

We created an example, using Adobe AIR 2.0 and the PyAMF and Twisted libraries for Python, that echoes ByteArray messages every x seconds to a Twisted UDP server. The example application also enumerates available hardware and software network interfaces on the client computer using the new NetworkInfo API.

Read more in the tutorial.

screenshot of the example

SQLAlchemy and Flash: Addressbook example

Monday, March 16th, 2009

SQLAlchemy logo

Dave Thompson created a new address book example that uses the new SQLAlchemy adapter that was added in the latest release of PyAMF. PyAMF provides Action Message Format (AMF) support for Python, mainly used in the Adobe Flash Player for RPC communication.


Get Adobe Flash player



You can browse or download the source from the Subversion repository. You can find instructions on how to run the example yourself on the documentation page.

Introducing cPyAMF

Sunday, May 4th, 2008

Logo for cPyAMF

There are two parts to PyAMF: the core AMF encoder and decoder, and the gateway/remoting for transporting data between a server and a client.

Currently both parts are written in pure Python but the idea is to create a C version of the AMF encoder/decoder that can be used as a dropin which will increase performance significantly.

For more information check the ticket or browse the source in the repository.

Interactive Python shell with Flex

Saturday, May 3rd, 2008

Google did the Ajax version of the Python shell, running on Google App Engine, we present you with the Flex version (click image to view the sample):

You can browse or download the source from the Subversion repository. You can find instructions on how to run the example yourself in the documentation.

PyAMF test suite running on Google App Engine

Thursday, May 1st, 2008

The 0.3 release tree has been mostly about building up compatibility with Google’s App Engine.

Because the environment that Google exposes to the developer is quite restricted (for obvious reasons!) we thought it best if we get the entire PyAMF test suite (up to 430 individual tests and counting …!) running.

We have built a simple web app that runs the PyAMF test suite from within the Google App Engine. Its a work in progress and isn’t planning on winning any beauty contests, but works nicely.

Check it out!

Ohloh API and Python

Saturday, April 26th, 2008

Ohloh is a website which provides a web services suite and online community platform that aims to map the landscape of open source software development. The Ohloh API is a free, REST-based programming interface to the Ohloh open source directory. You can use the Ohloh API to create your own applications and web services based on Ohloh data. There’s a Python example client and additional examples are available for Java, Ruby, Bash, Perl, PHP and C++.

I decided to create a simple AMF gateway using PyAMF that pulls the account data from Ohloh and then passes it to a Flex application. The reason I use a AMF gateway is because I don’t want to hardcode and expose my API key in the Flex client application, which could be decompiled easily, allowing others to abuse my key.

You can test their API by entering the emailaddress of a registered Ohloh user in the input text-field below, click Submit, and it will display the user’s general account info and load the user’s avatar.

(more…)

Twisted Guestbook Example

Saturday, April 12th, 2008

We created a Guestbook Example to demonstrate a full featured application using Flex, Twisted, and PyAMF of course. Check it out after the jump!

(more…)

PyAMF and Google App Engine

Thursday, April 10th, 2008



After Google’s announcement on Monday we received a lot of questions about running PyAMF on the Google App Engine so we decided to start working on a tutorial. This is a work in progress and might require some updates to the library. We’re also planning on setting up a demo site on our appspot but more on that later.

Socket example

Sunday, January 13th, 2008

The Socket class enables Actionscript to make socket connections and to read and write raw binary data. This example shows how to:

  • use the Twisted framework and PyAMF to create a socket server
  • create a connection with the socket server using Flex and Actionscript
  • send the system time from Python to the Flash Player as Actionscript Date object, with an interval of 1 second

(more…)

GeoIP example

Friday, January 11th, 2008

Check out the Flex example using the GeoIP APIs:

You can browse or download the source from the Subversion repository. You can find instructions on how to run the example yourself in the documentation.