Skip to content


XML Books — Project Overview

Django + XML + Google Drive API

Summary: XML Books loads a book catalog from an XML file stored in Google Drive, validates and parses it at request time, and exposes simple filters by author and title. The goal is to keep the app lightweight (no large datasets in the repo) while demonstrating external storage integration and clean UI rendering in Django.

Django 4.1 Python 3.11 Requests Google Drive API XML
Open Endpoint

Goals
  • Load and validate an XML dataset from Google Drive (folder-scoped query + file download).
  • Defend against HTML previews/warnings from Drive before parsing.
  • Filter results via query params (?author=..., ?title=...).
  • Keep the Heroku slug small (no heavy datasets in the repo).
High-level Architecture
  1. View xml_books reads query params and builds the Drive request.
  2. File listing by folder + exact filename; then direct file download.
  3. Guard: if payload looks like HTML, abort parsing (Drive preview pages).
  4. Parse with xml.etree.ElementTree and normalize CDATA/text.
  5. Filter and render results with Bootstrap.
Environment Variables
VariableDescriptionExample
GOOGLE_DRIVE_API_KEY API Key for Google Drive (Files: list/get). AIzaSy...xyz
GOOGLE_DRIVE_FOLDER_ID Folder ID containing the XML file. 1AbCdEfGhIJ...
BOOKS_XML_FILENAME Exact XML filename to fetch. books.xml
Endpoint & Usage
EndpointDescriptionParamsExamples
/data-science/books-filter/ Returns the book list from remote XML with optional filters. author (optional), title (optional) ?author=arturo
?title=sidi
?author=arturo&title=sidi
Error Handling
  • 404/403 listing Drive: check GOOGLE_DRIVE_FOLDER_ID permissions.
  • HTML payload (preview/warning): abort parsing to avoid XML errors.
  • XML ParseError: malformed or truncated XML; verify the source file.
  • Timeouts: add caching and increase request timeout if needed.
Books Store

Search Form


Author's book list:

LA ISLA

LA ISLA

ISBN: 9788435018616
Page: 400
Lang: Castellano
Year: 1999
Price: 9.45
Publisher By: Edhasa
Tags: Narrativa extranjera del XIX al XXI en bolsillo,Narrativa en bolsillo,Literatura

LEMURIA: CUENTOS EXTRAÑOS Y MALDITOS

LEMURIA: CUENTOS EXTRAÑOS Y MALDITOS

ISBN: 9788477028352
Page: 352
Lang: Castellano
Year: 2016
Price: 23.75
Publisher By: Valdemar
Tags: Narrativa de terror,Géneros literarios,Literatura

En la época de entreguerras se produjo en el mundo de habla alemana un resurgimiento del género fantástico y de terror protagonizado por tres autores que alcanzaron una gran popularidad Gustav Meyrink, H.H. Ewers y Karl Hans Strobl.

CARTAS DEL DIABLO A SU SOBRINO (LAS CARTAS DE ESCRUTOPO)

CARTAS DEL DIABLO A SU SOBRINO (LAS CARTAS DE ESCRUTOPO)

ISBN: 9788432147357
Page: 144
Lang: Castellano
Year: 2015
Price: 10.45
Publisher By: Rialp
Tags: Narrativa extranjera,Novela contemporánea

CADÁVER EXQUISITO

CADÁVER EXQUISITO

ISBN: 9788420433424
Page: 256
Lang: Castellano
Year: 2018
Price: 17.00
Publisher By: Alfaguara
Tags: Narrativa española,Novela contemporánea

HISPANICA Español, Castellano . En esta despiadada distopía -tan brutal como sutil, tan alegórica como realista-, Agustina Bazterrica inspira, con el poder explosivo de la ficción, sensaciones y debates de suma actualidad.La súbita aparición de un virus letal que ataca a los animales modifica de manera irreversible el mundo desde las fieras hasta las mascotas deben ser sistemáticamente sacrificadas, y su carne ya no puede ser consumida. Los gobiernos enfrentan la situación con una decisión drástica legalizando la cría, reproducción, matanza y procesamiento de carne humana. El canibalismo es ley y la sociedad ha quedado dividida en dos grupos los que comen y los que son comidos.Marcos Tejo, encargado general del frigorífico Krieg, separado de su esposa y a cargo de su padre, es un oscuro burócrata. El día en que recibe como regalo una mujer criada para el consumo, las tentaciones lo transforman en una conciencia peligrosa de pliegues truculentos que lo llevará a transgredir las nuevas normas hasta límites que la sociedad desconoce.Qué resto de humanidad cabe cuando los muertos son cremados para evitar su consumo? Quién es el otro si, de verdad, somos lo que comemos?Reseña «Novela mayor, cuya acción transcurre en el interior de una atmósfera densa e hipnótica en la que el lector queda atrapado desde las primeras líneas como si fuera uno de sus personajes.» Juan José Millás

ATRACCION MORTAL: LA APARIENCIA ES EL ANTIFAZ DE LA MENTIRA

ATRACCION MORTAL: LA APARIENCIA ES EL ANTIFAZ DE LA MENTIRA

ISBN: 9788416942534
Page: 368
Lang: Castellano
Year: 2017
Price: 16.15
Publisher By: Nova casa editorial
Tags: Narrativa hispanoamericana,Novela contemporánea

DIA 21 (LOS 100 VOL.2)

DIA 21 (LOS 100 VOL.2)

ISBN: 9788420417752
Page: 304
Lang: Castellano
Year: 2015
Price: 15.15
Publisher By: Alfaguara
Tags: Juvenil

THE GIVER

THE GIVER

ISBN: 9780007578498
Page:
Lang: Inglés
Year: 2014
Price: 7.98
Publisher By: Harpercollins pub.
Tags: Literatura en ingles,En otros idiomas,Literatura

In a perfect world, Jonas begins to see the flaws THE GIVER is the classic award-winning novel that inspired the dystopian genre and a major motion picture adaptation for 2014 starring Jeff Bridges, Meryl Streep, Katie Holmes and Taylor Swift. It is the future. There is no war, no hunger, no pain. No one in the community wants for anything. Everything needed is provided. And at twelve years old, each member of the community has their profession carefully chosen for them by the Committee of Elders. Twelve-year old Jonas has never thought there was anything wrong with his world. But from the moment he is selected as the Receiver of Memory, Jonas discovers that their community is not as perfect as it seems. It is only with the help of the Giver, that Jonas can find what has been lost. And it is only through his personal courage that Jonas finds the strength to do what is right The Giver is the award-winning classic of bravery and adventure that has inspired countless dystopian writers as the forerunner of this genre.

XENIA, #KEEPCALM I FES UN TUIT

XENIA, #KEEPCALM I FES UN TUIT

ISBN: 9788448936013
Page: 192
Lang: Catalán
Year: 2015
Price: 11.87
Publisher By: Barcanova
Tags: Juvenil

L ARBRE DE LES MENTIDES

L ARBRE DE LES MENTIDES

ISBN: 9788483435045
Page: 488
Lang: Catalán
Year: 2017
Price: 13.77
Publisher By: Bambu editorial
Tags: Juvenil

EL VALLE SIN NOMBRE: UN APASIONANTE VIAJE A LA EDAD MEDIA EN EL P AIS VASCO

EL VALLE SIN NOMBRE: UN APASIONANTE VIAJE A LA EDAD MEDIA EN EL P AIS VASCO

ISBN: 9788494091254
Page: 480
Lang: Castellano
Year: 2013
Price: 17.95
Publisher By: Travel bug
Tags: Narrativa histórica

HARRY POTTER AND THE PRISONER OF AZKABAN (SIGNATURE ED)

HARRY POTTER AND THE PRISONER OF AZKABAN (SIGNATURE ED)

ISBN: 9781408855676
Page: 480
Lang: Inglés
Year: 2015
Price: 8.93
Publisher By: Bloomsbury publishing ltd.
Tags: Juvenil

When the Knight Bus crashes through the darkness and screeches to a halt in front of him, it's the start of another far from ordinary year at Hogwarts for Harry Potter. Sirius Black, escaped mass-murderer and follower of Lord Voldemort, is on the run - and they say he is coming after Harry. In his first ever Divination class, Professor Trelawney sees an omen of death in Harry's tea leaves . But perhaps most terrifying of all are the Dementors patrolling the school grounds, with their soul-sucking kiss. These new editions of the classic and internationally bestselling, multi-award-winning series feature instantly pick-up-able new jackets by Jonny Duddle, with huge child appeal, to bring Harry Potter to the next generation of readers. It's time to PASS THE MAGIC ON .

LA MANO DE FATIMA

LA MANO DE FATIMA

ISBN: 9788425343544
Page: 960
Lang: Castellano
Year: 2009
Price: 23.65
Publisher By: Grijalbo
Tags: Narrativa histórica

En la opulenta Córdoba de la segunda mitad del siglo XVI, un joven morisco, desgarrado entre dos culturas y dos amores, inicia una ardiente lucha por la tolerancia religiosa y los derechos de su pueblo.En 1568, en los valles y montes de las Alpujarras, ha estallado el grito de la rebelión hartos de injusticias, expolio y humillaciones, los moriscos se enfrentan a los cristianos e inician una desigual pugna que sólo podía terminar con su derrota y dispersión por todo el reino de Castilla. Entre los sublevados se encuentra el joven Hernando. Hijo de una morisca y el sacerdote que la violó, es rechazado por los suyos, debido a su origen, y por los cristianos, por la cultura y costumbres de su familia. Durante la insurrección conoce la brutalidad y crueldad de unos y otros, pero también encuentra el amor en la figura de la valerosa Fátima, la de los grandes ojos negros. A partir de la derrota, forzado a vivir en Córdoba y en medio de las dificultades de la existencia cotidiana, todas sus fuerzas se concentrarán en lograr que su cultura y religión, las de los vencidos, recuperen la dignidad y el papel que merecen. Para ello deberá correr riesgos y atreverse con audaces y muy peligrosas iniciativas.Los lectores de La catedral del mar encontrarán en esta segunda novela de su autor las mismas claves que llevaron al éxito a la primera la fidelidad histórica, que se entrevera con un apasionado relato de amor y odio, de ilusiones perdidas y esperanzas que dan sentido a la vida y la lanzan por los caminos de la aventura. De ese modo, su autor construye una trepidante novela que pretende reflejar la tragedia del pueblo morisco, ahora que se cumple el cuarto centenario de su expulsión de España, y que también relata una vida singular, la de un hombre fronterizo y enamorado que nunca se resignó a la derrota y luchó por la convivencia.

Page 152 of 834 (10000 books)

Show Code