v1.1.0
v1.1.0 (2025-03-29)
Documentation
-
Add project logo to README.md (
9b5ff9c
) -
Add the project logo (
965a44e
) -
Update documentation to remove useless line (
5968ed0
)
Features
- persistence: Add an automatic backup system that saves the current state of the database either periodically or immediately after significant changes (
32647a8
)
The changes introducing an automatic backup system for DictDB. A new module,backup.py
, defines a BackupManager
that starts a background thread to periodically back up the database and also provides a manual trigger via notify_change()
. Unit tests in test_backup.py
verify both periodic and manual backup functionality.
- persistence: Add asynchronous save/load methods (
974036d
)
Implemented async_save and async_load in DictDB using asyncio.to_thread to offload file I/O, ensuring that persistence operations do not block ongoing database activities. Updated documentation and unit tests (test_persistence.py) to cover asynchronous JSON and pickle operations.
-
persistence: Add save/load functionality with pathlib support (
149f471
) -
Implemented
save(filename: Union[str, Path], file_format: str)
andload(filename: Union[str, Path], file_format: str)
in database.py. -
Updated Table class with getstate and setstate to exclude dynamic attributes from pickled state.
-
Refactored Field class to use a top-level _FieldCondition (with operator functions) ensuring picklability.
-
Updated relevant unit tests to cover persistence functionality.
Testing
- persistence: Validate consistency across multiple save/load cycles (
4054721
)
Added a new unit test in test_persistence.py to verify that DictDB maintains a consistent state across multiple save/load cycles using JSON persistence. This test saves and reloads the database repeatedly and compares the final state with the original.
Detailed Changes: v1.0.0...v1.1.0