PyAMF 0.4 released

The team is proud to announce the release of PyAMF 0.4 final!

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

This release fixes over a 100 tickets, see the changelog for the complete list of changes. We now consider the library to be stable and ready for production! A brief overview of the changes:

  • A new C extension to pyamf.util and pyamf.amf3. This is a work in progress, created using Cython, and more sections of the library will be moved to C as they are identified. Thanks to Gerard Escalante.
  • An adapter for SQLAlchemy 0.4/0.5 is available, allowing object graphs to be easily encoded. See the wiki for more information. Thanks to Dave Thompson and Michael Van Tellingen.
  • Improvements to the Google App Engine adapter to allow datastore objects to be easily encoded/decoded.

Check out the download page, installation instructions.

Got questions? First stop is the mailing list or IRC.

PyAMF 0.4rc3 released

The PyAMF team is proud to announce a new release of PyAMF, a lightweight library that allows Flash and Python applications to communicate via Adobe’s ActionScript Message Format.

This is hopefully the last Release Candidate before we release 0.4 final. Changes since rc2 include:

  • Support for SQLAlchemy 0.5.0 (Ticket:436)
  • pyamf.util.DataTypeMixIn/cpyamf.util.BufferedByteStream can now encode/decode 24bit un/signed integers. (Ticket:422)
  • pyamf.util.StringIOProxy/cpyamf.util.BufferedByteStream both have new consume methods that will chop of the tail of the stream (already read stream). (Ticket:423)
  • Now checking for all types of supported xml lib types for encoding, but will only use the first implementation for decoding (Ticket:426)
  • fpconst dependancy is now only required if the platform requires it (Ticket:356)
  • Decoding negative timestamps on certain platforms (namely Windows) are now supported (Ticket:390)

For a detailed list of changes, see the change log.

To download this release either grab a compressed file, use 'easy_install -U pyamf' or grab the Subversion tag.

Check out the download page, installation instructions.

Got questions? First stop is the mailing list or IRC.

Cheers,

The PyAMF team

PyAMF 0.4rc2 released

The PyAMF team is proud to announce a new release of PyAMF, a lightweight library that allows Flash and Python applications to communicate via Adobe’s ActionScript Message Format.

Lots of changes for this one, a brief overview:

  • A new C extension to pyamf.util and pyamf.amf3. This is a work in progress and using Cython more sections of the library will be moved to C as they are identified. Thanks to Gerard Escalante.
  • An adapter for SQLAlchemy is available, allowing object graphs to be easily encoded. See the wiki for more information. Thanks to Dave Thompson and Michael Van Tellingen.
  • Improvements to the Google App Engine adapter to allow datastore objects to be easily encoded/decoded.

For a detailed list of changes, see the change log.

To download this release either grab a compressed file, use 'easy_install -U pyamf' or grab the Subversion tag.

This is a release candidate so depending on feedback, 0.4 final will be available in a few days.

Happy New Year,

The PyAMF team

Getting started with Jython and Apache Ant

Today I decided to introduce some Jython in one of our build scripts at work because it was simply too painful to use a pure Ant script. It would/ve been nice to avoid the Jython dependency but after screwing around with Ant for a few hours I decided to write a Python script to do the job.

Although the Ant documentation for the Script task is pretty good it wasn't dead simple to hook up Jython to Ant, and because I couldn't find any examples online I decided to create a simple example so others might benefit from it. All files (except for the .jar's) are available in the sandbox of the PyAMF repository.

Steps:

  1. Download Jython and the JSR 223 scripting engine .jar files for Jython
  2. Externalize some paths in a build.properties file (optional)
  3. Create a Python test script that prints out some property defined in the Ant build file
  4. Create the Ant build.xml file that defines a Script task and includes the build.properties file

Run the Ant script on the console and it should output something like:

Buildfile: build.xml jython: [script] Apache Ant told Jython: Hello World! BUILD SUCCESSFUL Total ...

Flash Player 10 Beta Released

Flash Player 10

Today Adobe released the first beta version (10.0.1.218) of the upcoming Flash Player 10, code named 'Astro'. You can download the new player for Mac OS X, Linux and Windows from Adobe Labs (make sure you uninstall older players first). There are quite a few enhancements but unfortunately the documentation of the new APIs isn't available yet (will be released at a later date through Adobe's Livedocs system) so I haven't been able to play with them in Actionscript yet.

Content created with the open source Flex 3 SDK is designed to work with Flash Player 9 (9.0.115.0 and higher) and will continue to function as expected with Flash Player 10. To build Flex content that takes advantage of the new features, you need a Flex SDK 3.0.x nightly build which can target the Flash Player 10 Beta.

Some of the highlights in the new Player:

Speex Audio Codec

SpeexThe open source Speex voice codec offers an alternative to the older, proprietary Nellymoser for audio that delivers the lowest-latency audio experience possible. Flash developers have requested an open source voice codec since the day Macromedia added Nellymoser to Flash ...

Introducing cPyAMF

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.

PyAMF 0.3.1 Released

We're pleased to announce a new release of PyAMF, a lightweight library that allows Flash and Python applications to communicate via Adobe's ActionScript Message Format.

This release improves support for Google App Engine and introduces a new AMF gateway for GAE web applications. Aral Balkan announced he's using PyAMF in his GAESWF project, which will be used to power the website of the online Singularity conference later this year.

You can try some of the PyAMF examples for GAE on our appspot like the Interactive Python shell example and the PUnit tool to run the PyAMF test suite on GAE using a web interface. We also added an Ohloh API example.

The dependency on the fpconst module was removed for Python >= 2.5 to make it easier to deploy PyAMF applications on GAE and devices like smart phones. Unfortunately we had to keep it around for the Windows platform due to a float issue with that version of Python 2.5.

Check out the download page, installation instructions.

Got questions? First stop is the mailing list or IRC.

Interactive Python shell with Flex

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):

Interactive Python shell example

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 AppEngine

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

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.