You almost certainly want to do this the other way around - e.g. have add_object() call add_objects() and have add_objects() create a single pack file with all the objects. Creating a lot of pack files is *very* inefficient.

I think the default implementation of add_objects() will already do this for you. You might have to provide add_pack(), which is trivial (see object_store.py:750).