PAOFLOW.gen.qe_input.sources.base#

Base class and shared helpers for database source adapters.

Classes#

DatabaseSource

Abstract adapter mapping a database identifier to a MaterialRecord.

Functions#

download_text(url[, timeout])

Return the decoded text body of url or raise a RuntimeError.

Module Contents#

PAOFLOW.gen.qe_input.sources.base.download_text(url, timeout=30)[source]#

Return the decoded text body of url or raise a RuntimeError.

class PAOFLOW.gen.qe_input.sources.base.DatabaseSource[source]#

Abstract adapter mapping a database identifier to a MaterialRecord.

Concrete subclasses set name and implement matches() (used by --source auto detection) and fetch().

name = ''[source]#
abstractmethod matches(identifier)[source]#

Return True if identifier belongs to this database.

abstractmethod fetch(identifier, **options)[source]#

Download and normalize identifier into a MaterialRecord.