What’s the buzz: Python gorges on tools and libraries

The BeeWare project offers tools and libraries offered for mobile and web development

The BeeWare project is increasing options for the Python language by offering a collection of tools and libraries for mobile and web development.

Billed as "BeeWare, the IDEs of Python," the collection follows the "Unix philosophy" of each doing one thing well. Libraries provide functionality ranging from iOS and Android application development to CSS support, while tools cover activities ranging from browser support to conversion of Python code to Java and debugging.

"The BeeWare project is a collection of tools and libraries to get native user interfaces out to people using Python as a deployment language," said project founder Russell Keith-Magee. Desktop, mobile, and even tvOS development is enabled, as is building single-page Web applications.

But the project still is in its early stages. "The low-level tool chain -- the pieces that let Python run on mobile devices and give access to the native system libraries -- is the more mature part of the project; probably somewhere around late-alpha/early-beta phase," Keith-Magee said. "The user-facing APIs like Toga are at proof-of-concept stage, and still in rapid development."

Featured as a library, Toga is a native, cross-platform widget toolkit for building GUIs for iOS and Android. It uses native buttons for iOS, while for Android development, Toga uses BeeWare's Voc transpiler to convert Python bytecode directly to Java bytecode.

Another library, iOS Template, provides a cookie-cutter template for deploying Python code on iOS. The Python Android Template library, meanwhile, does the same for Android.

The included Batavia tool runs Python bytecode in the browser by implements a Python 3.4 bytecode machine to handle function calls and basic class definitions. "I think it's probably optimistic to think [Batavia] it will ever completely replace JavaScript -- but I believe it has the potential to demonstrate that being able to support multiple languages in the browser would be of benefit to the entire Web ecosystem," said Keth-Magee. Batavia does not, however, support all of Python's built-in functions or the full standard library, it lacks support for full class inheritance, and it doesn't make a good distinction between integer and floating-point math.

Also in the BeeWare suite, the Rubicon library features a collection of tools bridging Python to other environments, including Objective-C and Java. "It allows you to instantiate, manipulate and extend all the native iOS libraries as if they were native Python libraries," said Keith-Magee.

The Cricket graphical tool runs Python test suites, supporting pre-Django 1.6 project test suites, Django 1.6-plus suites using unittest2-style discovery, and unittest test suites. Bugjar serves as a graphical interactive debugger for Python code, while Duvet is a GUI tool for visualizing code coverage results visualized by the Coverage.py tool.

BeeWare's Briefcase tool serves as a distutils extension to help package Python projects as standalone applications. The Colosseum library provides a partial implementation of the CSS box and flexbox.layout algorithm, while the Cassowary library is an implementation of the Cassowary constraint-solving algorithm. "At this point, the importance [of the Cassowary tool] is historical," Keith-Magee said. "The first iteration of the Toga widget toolkit used the Cassowary algorithm for widget layout. Cassowary is the underlying algorithm behind the constraint-based layout that iOS uses natively as of iOS 6."

Join the PC World newsletter!

Error: Please check your email address.
Rocket to Success - Your 10 Tips for Smarter ERP System Selection

Tags pythonprogramming

Keep up with the latest tech news, reviews and previews by subscribing to the Good Gear Guide newsletter.

Paul Krill

InfoWorld
Show Comments

Most Popular Reviews

Latest Articles

Resources

PCW Evaluation Team

Matthew Stivala

HP OfficeJet 250 Mobile Printer

The HP OfficeJet 250 Mobile Printer is a great device that fits perfectly into my fast paced and mobile lifestyle. My first impression of the printer itself was how incredibly compact and sleek the device was.

Armand Abogado

HP OfficeJet 250 Mobile Printer

Wireless printing from my iPhone was also a handy feature, the whole experience was quick and seamless with no setup requirements - accessed through the default iOS printing menu options.

Azadeh Williams

HP OfficeJet Pro 8730

A smarter way to print for busy small business owners, combining speedy printing with scanning and copying, making it easier to produce high quality documents and images at a touch of a button.

Andrew Grant

HP OfficeJet Pro 8730

I've had a multifunction printer in the office going on 10 years now. It was a neat bit of kit back in the day -- print, copy, scan, fax -- when printing over WiFi felt a bit like magic. It’s seen better days though and an upgrade’s well overdue. This HP OfficeJet Pro 8730 looks like it ticks all the same boxes: print, copy, scan, and fax. (Really? Does anyone fax anything any more? I guess it's good to know the facility’s there, just in case.) Printing over WiFi is more-or- less standard these days.

Ed Dawson

HP OfficeJet Pro 8730

As a freelance writer who is always on the go, I like my technology to be both efficient and effective so I can do my job well. The HP OfficeJet Pro 8730 Inkjet Printer ticks all the boxes in terms of form factor, performance and user interface.

Michael Hargreaves

Windows 10 for Business / Dell XPS 13

I’d happily recommend this touchscreen laptop and Windows 10 as a great way to get serious work done at a desk or on the road.

Featured Content

Latest Jobs

Don’t have an account? Sign up here

Don't have an account? Sign up now

Forgot password?