XML Books — Project Overview
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.
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
- View
xml_booksreads query params and builds the Drive request. - File listing by folder + exact filename; then direct file download.
- Guard: if payload looks like HTML, abort parsing (Drive preview pages).
- Parse with
xml.etree.ElementTreeand normalize CDATA/text. - Filter and render results with Bootstrap.
Environment Variables
| Variable | Description | Example |
|---|---|---|
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
| Endpoint | Description | Params | Examples |
|---|---|---|---|
/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_IDpermissions. - 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.
Formulario de búsqueda
Author's book list:
TODO BAJO EL CIELO
ISBN: 9788408068099
Page: 464
Lang: Castellano
Year: 2006
Price: 19.95
Publisher By: Planeta
Tags: Narrativa histórica
BOMARZO: LA VIDA Y AVENTURAS DEL DUQUE DE ORSINI, UN VISIONARIO D EL RENACIMIENTO ITALIANO
ISBN: 9788432248092
Page: 608
Lang: Castellano
Year: 2000
Price: 20.90
Publisher By: Seix barral
Tags: Narrativa histórica
LA ESPADA DE FUEGO (TETRALOGIA LA ESPADA DE FUEGO 1)
ISBN: 9788445075852
Page: 464
Lang: Castellano
Year: 2006
Price: 8.50
Publisher By: Minotauro
Tags: Fantástica en bolsillo,Narrativa en bolsillo,Literatura
UNA HISTORIA DE AMOR Y OSCURIDAD
ISBN: 9788497937429
Page: 776
Lang: Castellano
Year: 2017
Price: 10.40
Publisher By: Debolsillo
Tags: Narrativa extranjera del XIX al XXI en bolsillo,Narrativa en bolsillo,Literatura
ROMANCERO CANYENGUE
ISBN: 9789507540585
Page: 85
Lang: Castellano
Year: 1999
Price: 7.50
Publisher By: Continente
Tags: Poesía contemporánea hispanoamericana del XIX al XXI,Poesía,Literatura
La poética, bajo la advocación de Erato, musa inspiradora de líricos momentos y desocupados románticos, no deja de ser un género glorificado, como poco transitado. La realidad reclama temas más próximos, más nuestros. Esa ligera digresión se convalida cuando el lenguaje cotidiano se sublima y se recrea para describir poéticamente el mundo esencial del amor, de la pasión, del arte o de la patética derrota. Es el caso de este Romancero, que no es el del Cid, precisamente, pero es el alumbramiento de la visión canyengue de noctámbulos, mujeres fáciles, fueyes estirados y guapos que arrugan, todo traducido por la sensibilidad y la emoción de un rioplatense traído de la mano de Cátulo Castillo, consagrado por Astor Piazzolla y expuestos por Alejandro Dolina.
EL CRITICÓN (3ª ED.)
ISBN: 9788437602578
Page: 816
Lang: Castellano
Year: 2004
Price: 16.15
Publisher By: Catedra
Tags: Narrativa española hasta el siglo XVIII,Clásicos,Literatura
LITTLE WOMEN (OXFORD WORLD S CLASSICS)
ISBN: 9780199538119
Page: 528
Lang: Inglés
Year: 2008
Price: 9.50
Publisher By: Oxford university press
Tags: Literatura en ingles,En otros idiomas,Literatura
This classic story of the March family women and their lives in New England during the Civil War has remained enduringly popular since its publication in 1868. Poor, argumentative, loving, and optimistic, the March sisters struggle to supplement their family's meager income and realize their own dreams. This highly autobiographical novel shows us women who are strong-minded and independent in their determination to control their own destiny. The introduction to this edition provides a fascinating history of the Alcotts, and a biographical history of Louisa Alcott's own struggles as a writer. 'this children's novel for all ages is vivid from the very first sentence. ... a children's classic ... lovers of the book will find Valerie Alderson's informed and enthusiastic introduction a valuable bonus, especially about the closely autobiographical nature of the book.' The Observer Review
VIAJE AL PASADO
ISBN: 9788496834996
Page: 96
Lang: Castellano
Year: 2009
Price: 8.55
Publisher By: El acantilado
Tags: Narrativa extranjera del XIX al XXI en bolsillo,Narrativa en bolsillo,Literatura
ANTOLOGIA DE LA LITERATURA FANTASTICA
ISBN: 9788435017947
Page:
Lang: Castellano
Year: 2008
Price: 11.35
Publisher By: Edhasa
Tags: Fantástica en bolsillo,Narrativa en bolsillo,Literatura
CUATRO DIAS DE ENERO
ISBN: 9788483469019
Page: 288
Lang: Castellano
Year: 2017
Price: 9.45
Publisher By: Debolsillo
Tags: Narrativa española del XIX al XXI en bolsillo,Narrativa en bolsillo,Literatura
EL HOMBRE QUE FUE JUEVES
ISBN: 9788477026280
Page: 304
Lang: Castellano
Year: 2011
Price: 9.97
Publisher By: Valdemar
Tags: Narrativa extranjera del XIX al XXI en bolsillo,Narrativa en bolsillo,Literatura
El hombre que fue Jueves, una de las novelas más populares del escritor y polemista británico G.K. Chesterton, pertenece a una variedad literaria peculiar. Aunque su revestimiento externo es el de una ingeniosa trama policiaca, donde el suspense y la sorpresa juegan un papel destacado, la crítica ha creído ver en esta obra una novela de tesis; también una fantasía policiaca, un relato onírico, o un panfleto político. El fino sentido del humor de Chesterton lanza sus venablos envenenados contra la filosofía de Schopenhauer, encarnada en el profesor de Worms, contra el pensamiento de Nietzsche o la ideología anarquista emergente de su tiempo. Según Chesterton, se trataba de un nuevo tipo de novela, una historia en la que se tipifican pensamientos modernos, pero no con argumentos, sino con incidentes simbólicos una comedia alegórica. Su proverbial ingenio le permitió contar dos historias a la vez una entretenida y superficial, y otra trascendente y enigmática, vinculando los acontecimientos del relato con versículos bíblicos, aunque fue lo suficientemente inteligente para que este mensaje no ahogase la historia prefirió que la liviandad y el sentido del humor primasen ante cualquier otra consideración al narrar las aventuras del detective y poeta Gabriel Syme en su cruzada fantástica contra una conspiración anarquista, en un Londres emblemático, la ciudad del fin de los días, un enorme Leviatán en el que se libra la batalla definitiva entre el Bien y el Mal.