def save(self, doc, **options):
        if '_id' in doc:
            func = _doc_resource(self.resource, doc['_id']).put_json
        else:
            func = self.resource.post_json
        _, _, data = func(body=doc, **options)
        id, rev = data['id'], data.get('rev')
        doc['_id'] = id
        if rev is not None: # Not present for batch='ok'
            doc['_rev'] = rev
        return id, rev
The length is the number of features.
dataset/ETHPy150Open djc/couchdb-python/couchdb/client.py/Database.save--crossover with--dataset/ETHPy150Open dcramer/django-compositepks/django/contrib/gis/gdal/layer.py/Layer.__len__