YTMusic
*******

class ytmusicapi.YTMusic(auth: str | dict[str, Any] | None = None, user: str | None = None, requests_session: Session | None = None, proxies: dict[str, str] | None = None, language: str = 'en', location: str = '', oauth_credentials: OAuthCredentials | None = None)

   Allows automated interactions with YouTube Music by emulating the
   YouTube web client's requests. Permits both authenticated and non-
   authenticated requests. Authentication header data must be provided
   on initialization.

YTMusic.__init__(auth: str | dict[str, Any] | None = None, user: str | None = None, requests_session: Session | None = None, proxies: dict[str, str] | None = None, language: str = 'en', location: str = '', oauth_credentials: OAuthCredentials | None = None)

   Create a new instance to interact with YouTube Music.

   Parameters:
      * **auth** ("str" | "dict"["str", "Any"] | "None") -- Optional.
        Provide a string, path to file, or oauth token dict.
        Authentication credentials are needed to manage your library.
        See "setup()" for how to fill in the correct credentials.
        Default: A default header is used without authentication.

      * **user** ("str" | "None") -- Optional. Specify a user ID
        string to use in requests. This is needed if you want to send
        requests on behalf of a brand account. Otherwise the default
        account is used. You can retrieve the user ID by going to
        https://myaccount.google.com/brandaccounts and selecting your
        brand account. The user ID will be in the URL:
        https://myaccount.google.com/b/user_id/

      * **requests_session** ("Session" | "None") --

        A Requests session object or None to create one. Default
        sessions have a request timeout of 30s, which produces a
        requests.exceptions.ReadTimeout. The timeout can be changed by
        passing your own Session object:

           s = requests.Session()
           s.request = functools.partial(s.request, timeout=3)
           ytm = YTMusic(requests_session=s)

      * **proxies** ("dict"["str", "str"] | "None") --

        Optional. Proxy configuration in requests format.

      * **language** ("str") -- Optional. Can be used to change the
        language of returned data. English will be used by default.
        Available languages can be checked in the ytmusicapi/locales
        directory.

      * **location** ("str") -- Optional. Can be used to change the
        location of the user. No location will be set by default. This
        means it is determined by the server. Available languages can
        be checked in the FAQ.

      * **oauth_credentials** ("OAuthCredentials" | "None") --
        Optional. Used to specify a different oauth client to be used
        for authentication flow.
