Changes by version

This section contains all the changes that I can remember, by version.


  • Drops support for pymongo < 2.9.
  • Adds support for Python > 3.5.
  • Fixes some minor test cases.
  • Deprecates support for pymongo < 3.
  • Deprecates support for Python < 3.

Released March 6, 2018.


  • Makes HumbleDB handle the safe= keyword for update(), insert(), and save() when using Pymongo 3.0 or greater. If you specified safe=False, then HumbleDB will use w=0 (no write concern), and otherwise will fall back to the configured write concern level, which defaults to w=1.

Released July 8, 2015


  • Adds support for Pymongo version 3.0.0 and higher which made some backwards incompatible changes.

Released June 14, 2015


  • Add humbledb.ensure_indexes pyconfig setting to allow for disabling ensure index calls.


  • Adds support for SSL. Thanks to paulnues.




  • Add config_uri configuration option for declaring default databases and databases with authentication.
  • If a Mongo subclass specifies a config_uri which includes a database, and a Document is used which does not match the database, a DatabaseMismatch error will be raised.
  • Fix a bug where declaring Mongo subclasses late (at runtime) would not correctly instantiate the connection instance.
  • Fix a bug with Pymongo 2.1.x connection instances.



  • Patch from paulnues to fix brittle tests.


  • Bump the default for config_max_pool_size up to 300, since in PyMongo 2.6, they changed the behavior of connection pools to make that a blocking limit, rather than a minimum size.


  • Fix a bug where a Report would raise a ValueError on querying months with 30 days.


  • Fix a bug where a Array may not have its page created before an append call attempts to modify it by adding write concern to the insert.



  • Fix a bug with summing report intervals where too many or too few values could be returned, sometimes with the wrong timestamp.


  • This release may break backwards compatibility.
  • Total rewrite of the :module:`` module to make it much more useful. Sorry, but I’m fairly sure nobody was using it before anyway.


  • Fix bug with array.Array.remove() in sharded environments.


  • This release may break backwards compatibility.
  • Restrict from humbledb import * to only basic document classes (Mongo, Document, Embed, Index).
  • Create new humbledb.errors module, which contains shortcuts to Pymongo specific errors, as well as the new exceptions: NoConnection, NestedConnection, and MissingConfig.
  • Document will now raise MissingConfig and NoConnection. The previous behavior was to raise just a RuntimeError.
  • Mongo subclasses add the new configuration option config_write_concern. This now defaults to 1, which may break backwards compatibility. The previous behavior depended on which version of Pymongo you were using.
  • Mongo will now raise NestedConnection.
  • Document instances which do not map attributes for embedded documents will no longer wrap the accessed embedded documents in DictMap instances. This should improve performance substantially for very large documents with many unmapped, embedded documents.
  • The Array class has been refactored to no longer need the array_id and number fields, or the index on them. It now leverages regex queries against the _id field instead.
  • The Array class now has shortcut properties for accessing the following attributes on the Page class: find, update, remove, entries, size. The find, update, and remove attributes require a Mongo (or a subclass) connection context.
  • The page_count parameter to Array is not longer required. If omitted, the number of pages will be queried for before the first append operation.
  • remove() now only removes the first matching element found. The previous behavior was to remove all matching elements, but this meant that the Array.length() could get out of sync with the actual size.


  • Now depends on Pytool >= 3.0.1.


  • Implement for_json() hook on Document, DictMap and ListMap.
  • Implement version checking for ttl vs. cache_for keyword to ensure_index().
  • Fix config_replica handling when config_replica is set to a descriptor class (i.e. a pyconfig.setting() instance).
  • Removed humbledb.document.Document._asdict(). Use for_json() instead.


  • Add the humbledb.array module and humbledb.array.Array class for easily working with very large paginated arrays in MongoDB.


  • Add support for MongoClient and MongoReplicaSetClient.


  • Fix bug in deleting embedded document keys via attributes.


  • Fix bug with DocumentMeta accidentally getting extra name attribute, which in turn became available on Document, and would override mapping behavior.


  • Fix bug with checking config_resolution on the MonthlyReport.


  • Major internal refactoring of module layout.
  • Add support for compound indexes.
  • Add Cursor subclass to do document type coercion rather than use as_class argument to pymongo methods.
  • Change return value of unset attributes from None to {}.
  • Add aliases humbledb.DESC and humbledb.ASC for pymongo.DESCENDING and pymongo.ASCENDING respectively.
  • Add embedded document list attribute mapping.
  • Lots of test coverage.


  • Change to use 0-59 for minute range, rather than 0-1439.


  • Add support for resolving dot-notation indexes.
  • Add reporting framework.


  • Fix bug when old version by using pkg_resources.parse_version to check pymongo version.


  • Add Index class.
  • Make HumbleDB compatible with pymongo >= 2.0.1.


  • Fix bug when find_one or find_and_modify return None.


  • Fix bug where find_and_modify returned dict instead of Document subclass.


  • Updated documentation.


  • First release fit for public consumption.