Tag Archives: opendata

A Linked Data Plaform Server in python/asyncio

It’s been a while I haven’t posted here (but at least this mean I’m kind of busy)!

A few years have passed since we’ve started dreaming of a decentralized, open data network for all our (web) projects. Happily, researchers have worked on the semantic web for quite a few years and with the latest W3 drafts, I think we’re almost there.

So, I’ve spent my latest weeks working on an implementation of a Linked Data Platform Server in python. It’s a rewrite of my previous attempt in Pyramid.

This rewrite, now fully in Python 3, uses the new asyncio library that allows me to use coroutines and therefore speed it up a lot compared to the previous implementation. After attending this year’s FOSDEM, I felt I had to try aiohttp and API-Hour. Thanks @saghul and @GMLudo for inspiring me with your talks! Yes, it rocks!

I see a lot of usages for this server: backing the data of the commons in a p2p way (think Unisson, TILIOS, p2pfoundation, Virtual Assembly), being the backbone of any cultural or research institution, allowing rapid data backend deployment, …

Currently, I’m trying to pass the W3 Test Suite to make my implementation conform and I already have a few upcoming projects to proof-test it! Yay!

Oh, yes, it’s called Glutton. It loves data, all the data!

Accès aux données V’Lille (+ API Python)

Bon, c’est bien joli la carte sur le site de Transpole ( http://vlille.fr/stations/les-stations-vlille.aspx ) mais c’est quand même super triste de ne pas pouvoir avoir accès aux données brutes.

En fait, c’est juste très simple, après 1 minute passée à fouiller le javascript. Voici comment faire, le tout servi en XML :

  • Obtenir la liste des stations avec leur ID et emplacement géographique : http://vlille.fr/stations/xml-stations.aspx
  • Obtenir les infos d’une station en particulier : http://vlille.fr/stations/xml-station.aspx?borne=<ID>

Voilà, rien de plus simple… maintenant, à nous de faire voir qu’on peut intelligemment exploiter les données ouvertes :-)

Mise à jour du 19 Septembre : Je viens d’écrire une API Python pour accéder aux Vlilles Vous pouvez la trouver ici : https://github.com/glibersat/python-vlille

Happy Hacking !