4 Python Frameworks You May Not Know About

The phrase “Python frameworks” usually refers to Web frameworks, collections of software that aid development of websites and services. But there are a few frameworks that aren’t for Web development, and some that you might not have come across. Say hi to QuePY, Cement, Carrot and Charm.

Click here to find Python jobs.

QuePy

Python LogoEver heard of Freebase or DBPedia These are very large collections of free structured data. DBPedia is where structured data from Wikipedia is held, while Freebase (now owned by Google) is a very large collection harvested from different sources such as Wikipedia, ChefMoz, NNDB, FMD and MusicBrainz. QuePy is a framework that takes natural language queries and generates the appropriate query language (SPARQL or MQL) that’s needed to query FreeBase or DBPedia.

For example, I asked it to “list Shows with Charlie Sheen” and it produced SPARQL for DBPedia and MQL for Freebase queries that look like this:

SELECT DISTINCT ?x2 WHERE {

?x0 rdf:type dbpedia-owl:TelevisionShow.

?x0 dbpprop:starring ?x1.

?x0 dbpprop:showName ?x2.

?x1 rdf:type foaf:Person.

?x1 rdfs:label "Charlie Sheen"@en.

}

</pre>

and MQL

<pre>

 

[{

"/tv/tv_program/regular_cast": [{

"/tv/regular_tv_appearance/actor": [{

"/type/object/name": "Charlie Sheen",

"/type/object/type": "/people/person"

}]

}],

"/type/object/name": [{}],

"/type/object/type": "/tv/tv_program"

}]

and then ran them. One said “Charlies Sheen is in 2 and a half men,” and the other produced elements of the Wikipedia entry.

Cement CLI Framework

Back in the day before Windows, GUIs and mice came on the scene, everything was accessed through the Command Line Interface. Cement is a powerful framework for CLI application development in Python. Ranging from simple to complex applications, Cement provides configuration handling, plugins and much more. If you like developing non-GUI apps, then you’ll be right at home in Cement.

Command line apps wouldn’t be truly CLI without being able to pass in parameters, and Cement does argument handling very well.

Carrot

Carrot is an open source AMQP messaging framework for Python. If you haven’t come across it, messaging is a methodology for allowing processes or applications to reliably send messages to other processes or applications. It’s been around nearly since networking became standardized. If the target process, etc., is available, then the message will get delivered immediately. If not, the message is held until the recipient becomes available, and then it’s delivered. Basically it’s a very reliable infrastructure that stops messages from getting lost. Many companies use it to glue different applications together.

Carrot interfaces with popular message brokers like RabbitMQ or ZeroMQ. These do the actual work of moving messages and can be used by software written in different languages, running on different platforms.

AMQP came about because software vendors have their own proprietary messaging protocols. IBM has MQSeries, Microsoft has MSMQ, Oracle has OEMS and so on. The Advanced Messaging Queuing Protocol—AMQP–is an open protocol that encourages software developers to make interoperability easier. Microsoft, for instance, bought in during 2013 and sits alongside other partners such as Red Hat, Informatica and DHS, as well as several banks.

Carrot uses JSON (JavaScript Object Notation) to encode messages, making it straightforward to send Python data structures like dictionaries and lists. Or, you can define your own serialization scheme.

Charm

Charm is a framework for rapidly prototyping advanced cryptosystems, which ships with a library of implemented cryptosystems. Based around Python (with C code for extra speed), it’s meant to be used by cryptographers and computer science researchers, though in the future it should be useful to open source and commercial software developers, as well.

The Charm library includes public key encryption schemes, identity-based encryption schemes, attribute-based encryption schemes, digital signatures, privacy-preserving signatures, commitment schemes, zero-knowledge proofs and interactive protocols such as anonymous credential and oblivious transfer schemes.

These are just a few of the non-Web frameworks that you’ll come across. If you want neurological 3D modeling or mathematical modelling, or you just want to solve nonlinear constrained optimization problems, there’s very likely a Python framework for that, as well.

Related Posts