@click.command(help='Display description for link at given PATH.')
@click.argument('path', nargs=-1)
def describe(path):
    doc = get_document()
    if doc is None:
        click.echo('No current document. Use `coreapi get` to fetch a document first.')
        sys.exit(1)

    if not path:
        click.echo('Missing PATH to a link in the document.')
        sys.exit(1)

    node = doc
    keys = coerce_key_types(doc, path)
    for key in keys:
        try:
            node = node[key]
        except (__HOLE__, IndexError):
            click.echo('Key %s not found.' % repr(key).strip('u'))
            sys.exit(1)

    if not isinstance(node, coreapi.Link):
        click.echo('Given PATH must index a link, not a %s.' % doc.__class__.__name__)
        sys.exit(1)

    fields_description = any([field.description for field in node.fields])
    if not (node.description or fields_description):
        click.echo('Link has no description.')
        sys.exit(1)

    if node.description:
        click.echo(node.description)
        click.echo()
    for field in node.fields:
        name = field.name if field.required else '[%s]' % field.name
        if field.description:
            click.echo('* %s - %s' % (name, field.description))
        else:
            click.echo('* %s' % name)
dataset/ETHPy150Open core-api/python-client/coreapi/commandline.py/describe