import requests


def pulsar_create(addr, auth, **kwargs):
    """
    Create a new pulsar. 
    
    Args:
        addr: hostname or ip address of database server.
        auth: tuple of username and password.
        name: name of pulsar.
        ra: right ascension of pulsar. 
        dec: declination of pulsar. 
    Raises:
        Exception if pulsar already exists or there is an input error. 
    """
    path = '{0}/{1}/'.format(addr, 'pulsar_create')
    r = requests.post(url=path, auth=auth, data=kwargs)
    r.raise_for_status()
    return r.json()