Archive for January, 2008

PyAMF 0.1 Beta released

Sunday, January 13th, 2008

We are pleased to announce the beta version of PyAMF.

PyAMF Beta

PyAMF is a lightweight library that allows Flash and Python applications to communicate via Adobe’s ActionScript Message Format.

A summary of new features features and improvements in this release:

  • Implemented Local Shared Object (LSO)
  • ByteArray now implements DataInput and DataOutput instead of StringIOProxy
  • remoting.client mostly fully supports the predefined headers
  • Fixed argument positioning for RemoteObject processing
  • Remoting client now supports authentication
  • Proper encoding for aliased subclassed builtin types, specifically flex.ArrayCollection
  • Added support for easy encoding of Django object queries (Foo.objects.all())
  • Added ‘expose_request’ argument to DjangoGateway to expose the underlying HTTP Request object as the first arg in the called services.

Check out the download page and installation instructions. Got questions? First stop is the mailing list, but we also hang out on IRC.

Authentication

Sunday, January 13th, 2008

In this tutorial, I’ll run through how to get a remoting server setup that deals with authentication. I’ll assume that you already have the latest version of PyAMF installed (at the time of writing, 0.1b is the most recent version).

I am going to build a WSGI remoting gateway, but you can use the principles applied here to any of the other supported gateway implementations (Django or Twisted). Check out the examples for more info.

(more…)

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 on the wiki page.

ByteArray example

Thursday, January 10th, 2008

We have created a simple PyAMF example for the ByteArray class in ActionScript which provides methods and properties to optimize reading, writing, and working with binary data. The PyAMF equivalent of this class is also called ByteArray that provides the same basic functionality. (more…)