
    kj                     >    d dl mZmZ d dlmZ  G d de          ZdS )    )AnyOptional)ResourceDescriptionc            	       d     e Zd ZU dZdZeed<   dZ	 ddee         dee         de	d	df fd
Z
 xZS )DataDescriptiona  Describes data file to load.

    This is a generic resource description type
    for loading resources that are not textures, programs and scenes.
    That loaded class is used depends on the ``kind`` or the file extension.

    Currently used to load:

    - text files
    - json files
    - binary files

    .. code:: python

        # Describe a text file. Text loader is used based on file extension
        DataDescription(path='data/text.txt')

        # Describe a json file. Json loader is used based on file extension
        DataDescription(path='data/data.json')

        # Describe a binary file. Specify a binary loader should be used.
        DataDescription(path='data/data.bin', kind='binary')
     default_kinddataNpathkindkwargsreturnc                 j    |                     ||d            t                      j        di | dS )zInitialize the resource description.

        Keyword Args:
            path (str): Relative path to the resource
            kind (str): The resource kind deciding loader class
            **kwargs: Additional custom attributes
        )r   r   N )updatesuper__init__)selfr   r   r   	__class__s       T/home/agentuser/manim-venv/lib/python3.11/site-packages/moderngl_window/meta/data.pyr   zDataDescription.__init__"   sB     	tT22333""6"""""    )NN)__name__
__module____qualname____doc__r	   str__annotations__resource_typer   r   r   __classcell__)r   s   @r   r   r      s          0 L#M AE# #SM#08#PS#	# # # # # # # # # #r   r   N)typingr   r   moderngl_window.meta.baser   r   r   r   r   <module>r"      sd                    9 9 9 9 9 9'# '# '# '# '#) '# '# '# '# '#r   