@get('/s/cards/{card_id}')
def get_card_route(request, card_id):

    db_conn = request['db_conn']

    card = get_card_by_kind(db_conn, card_id)
    if not card:
        return abort(404)

    unit = Unit.get_latest_accepted(db_conn, entity_id=card['unit_id'])
    if not unit:
        return abort(404)

    # TODO-2 SPLITUP create new endpoints for these instead
    topics = Topic.list_by_entity_id(db_conn, entity_id=card_id)
    versions = Card.get_versions(db_conn, entity_id=card_id)
    requires = Card.list_requires(db_conn, entity_id=card_id)
    required_by = Card.list_required_by(db_conn, entity_id=card_id)
    params = CardParameters.get(db_conn, entity_id=card_id)

    return 200, {
        'card': card.deliver(access='view'),
        'card_parameters': params.get_values(),
        'unit': unit.deliver(),
        'topics': [topic.deliver() for topic in topics],
        'versions': [version.deliver() for version in versions],
        'requires': [require.deliver() for require in requires],
        'required_by': [require.deliver() for require in required_by],
    }
Helper method to execute a command through subprocess and save stdout
dataset/ETHPy150Open heiskr/sagefy/server/routes/card.py/get_card_route--crossover with--dataset/ETHPy150Open openstack/anvil/anvil/shell.py/execute_save_output