U
    kuf  ã                   @  s0   d Z ddlmZ G dd„ dƒZG dd„ dƒZdS )zNBase classes and function for readers and writers.

Authors:

* Brian Granger
é    )Úannotationsc                   @  s    e Zd ZdZdd„ Zdd„ ZdS )ÚNotebookReaderzThe base notebook reader.c                 K  s   d}t |ƒ‚dS )zRead a notebook from a string.ú'loads must be implemented in a subclassN©ÚNotImplementedError)ÚselfÚsÚkwargsÚmsg© r   ú6/tmp/pip-unpacked-wheel-zj9qk9v2/nbformat/v1/rwbase.pyÚreads   s    zNotebookReader.readsc                 K  s   | j | ¡ f|ŽS )z'Read a notebook from a file like object)r   Úread)r   Úfpr	   r   r   r   r   !   s    zNotebookReader.readN)Ú__name__Ú
__module__Ú__qualname__Ú__doc__r   r   r   r   r   r   r      s   r   c                   @  s    e Zd ZdZdd„ Zdd„ ZdS )ÚNotebookWriterzThe base notebook writer.c                 K  s   d}t |ƒ‚dS )zWrite a notebook to a string.r   Nr   )r   Únbr	   r
   r   r   r   Úwrites)   s    zNotebookWriter.writesc                 K  s   |  | j|f|Ž¡S )z&Write a notebook to a file like object)Úwriter   )r   r   r   r	   r   r   r   r   .   s    zNotebookWriter.writeN)r   r   r   r   r   r   r   r   r   r   r   &   s   r   N)r   Ú
__future__r   r   r   r   r   r   r   Ú<module>   s   