# Path: compmusic/dunya/conn.py
# HOSTNAME = "https://dunya.compmusic.upf.edu"
# TOKEN = None
#     HOSTNAME = hostname
#     TOKEN = token
# class HTTPError(Exception):
# class ConnectionError(Exception):
# def set_hostname(hostname):
# def set_token(token):
# def _get_paged_json(path, **kwargs):
# def _dunya_url_query(url, extra_headers=None):
# def _dunya_post(url, data=None, files=None):
# def _make_url(path, **kwargs):
# def _dunya_query_json(path, **kwargs):
# def _dunya_query_file(path, **kwargs):


import errno
import logging
import os
import compmusic.dunya.docserver
from compmusic.dunya import conn
         level relationships to a recording with this raaga

    """
    return conn._dunya_query_json("api/carnatic/taala/%s" % str(tid))


def get_instruments():
    """ Get a list of Carnatic instruments in the database.
    This function will automatically page through API results.

    :returns: A list of dictionaries containing instrument information::

        {"id": instrument id, "name": Name of the instrument}

    For additional information about each instrument use :func:`get_instrument`

    """
    return conn._get_paged_json("api/carnatic/instrument")


def get_instrument(iid):
    """ Get specific information about an instrument.

    :param iid: An instrument id
    :returns: id, name, artists.

         ``artists`` includes artists with recording- and release-
         level performance relationships of this instrument.

    """

# Path: compmusic/dunya/conn.py
# HOSTNAME = "https://dunya.compmusic.upf.edu"
# TOKEN = None
#     HOSTNAME = hostname
#     TOKEN = token
# class HTTPError(Exception):
# class ConnectionError(Exception):
# def set_hostname(hostname):
# def set_token(token):
# def _get_paged_json(path, **kwargs):
# def _dunya_url_query(url, extra_headers=None):
# def _dunya_post(url, data=None, files=None):
# def _make_url(path, **kwargs):
# def _dunya_query_json(path, **kwargs):
# def _dunya_query_file(path, **kwargs):


# Path: compmusic/dunya/carnatic.py
import errno
import logging
import os
import compmusic.dunya.docserver
from compmusic.dunya import conn

         level relationships to a recording with this raaga

    """
    return conn._dunya_query_json("api/carnatic/taala/%s" % str(tid))


def get_instruments():
    """ Get a list of Carnatic instruments in the database.
    This function will automatically page through API results.

    :returns: A list of dictionaries containing instrument information::

        {"id": instrument id, "name": Name of the instrument}

    For additional information about each instrument use :func:`get_instrument`

    """
    return conn._get_paged_json("api/carnatic/instrument")


def get_instrument(iid):
    """ Get specific information about an instrument.

    :param iid: An instrument id
    :returns: id, name, artists.

         ``artists`` includes artists with recording- and release-
         level performance relationships of this instrument.

    """

    return conn._dunya_query_json("api/carnatic/instrument/%s" % str(iid))