Auto naming of items
AFAIK there isn't a python utility to do this, it wouldn't be too difficult to emulate it

import bpy

import re
def strip_trailing_number(s):
    m = re.search(r'\.(\d{3})$', s)
    return s[0:-4] if m else s

def unique_name(collection, base_name):
    base_name = strip_trailing_number(base_name)
    count = 1
    name = base_name

    while collection.get(name):
        name = "%s.%03d" % (base_name, count)
        count += 1      
    return name

# check

print(unique_name(bpy.data.objects, "Cube"))
print(unique_name(bpy.data.objects, "Cube.004"))