Renderers

class commons_api.wikidata.renderers.GeoJSONRenderer[source]
format = 'geojson'
media_type = 'application/vnd.geo+json'
render(data, accepted_media_type=None, renderer_context=None)[source]

Render data into JSON, returning a bytestring.

to_geojson(data)[source]
class commons_api.wikidata.renderers.PopoloJSONRenderer[source]
format = 'popolo-json'
media_type = 'application/popolo+json'
membership_to_popolo(data)[source]
organization_to_popolo(data, classification=None)[source]
person_to_popolo(data)[source]
render(data, accepted_media_type=None, renderer_context=None)[source]

Render data into JSON, returning a bytestring.

to_m17n(data)[source]