This project is currently in development and not yet complete. Many features are planned but not yet implemented.
Project Status
BinaryDB is being developed by Raúl Novo as a lightweight, embeddable key-value database. The project is functional for basic use cases but has several pending features.Current State
The project is written in Python and available under the GPL-3.0 license. You can use, modify, and redistribute the code freely, but any redistributions must maintain the same license and credit the original author.Repository Structure
The BinaryDB repository is organized as follows:Completed Modules
database.py
Core
Database class implementing in-memory key-value storage with pickle-based persistence. Includes basic transaction support (begin/rollback/end), atomic file writes, and complete CRUD operations.errors.py
Custom exception hierarchy including
DatabaseError, DatabaseIOError, DatabaseCorruptedError, KeyValidationError, RecordTypeError, TransactionError, and ConcurrencyError.Modules in Development
cache.py
cache.py
Contains minimal error definitions for caching functionality. Purpose and full implementation need to be completed.
index.py
index.py
Status: Empty / PendingPlanned Features:
- Secondary indexes for faster lookups
- Index types (hash, B-tree, etc.)
- Query optimization using indexes
- Index persistence and recovery
lock.py
lock.py
Status: Empty / PendingPlanned Features:
- File-based locking for multi-process access
- Read/write lock support
- Deadlock detection and prevention
- Lock timeout handling
transaction.py
transaction.py
Status: Empty / PendingPlanned Features:
- Enhanced transaction helpers and utilities
- Nested transaction support
- ACID compliance improvements
- Transaction isolation levels
Database class (database.py:201-241).utils.py
utils.py
Status: Empty / PendingPlanned Features:
- Common utility functions
- Data validation helpers
- Serialization utilities
- Performance monitoring tools
wal.py
wal.py
Status: Empty / PendingPlanned Features:
- Write-ahead logging for crash recovery
- Transaction durability guarantees
- Point-in-time recovery
- Log compaction and management
How to Contribute
Getting Started
- Fork the repository on GitHub
-
Clone your fork locally:
-
Create a feature branch:
-
Make your changes and commit them:
-
Push to your fork:
- Open a Pull Request on the main repository
Areas for Contribution
Implement Pending Features
Complete the pending modules: WAL, indexing, improved locking, caching, utilities. Each module has a clear scope and purpose.
Add Tests
Create comprehensive unit tests and integration tests. Test coverage is essential for reliability.
Improve Documentation
Add docstrings, examples, and guides. Help users understand and use BinaryDB effectively.
Fix Bugs
Report and fix bugs. Even small fixes are valuable contributions.
Performance Optimization
Optimize critical paths, reduce memory usage, improve commit performance.
Add Examples
Create example applications and use cases to help users get started.
Contribution Guidelines
Code Style
Follow Python best practices and maintain consistency with existing code:Testing
All new features should include tests:Documentation
Include docstrings for all public functions and classes:Commit Messages
Write clear, descriptive commit messages:Add:for new featuresFix:for bug fixesUpdate:for improvements to existing featuresRemove:for removing codeTest:for adding or updating testsDocs:for documentation changes
Opening Issues
Before starting work on a feature, open an issue to discuss it: Good issue template:Pull Request Process
- Ensure tests pass - All existing tests should still pass
- Add new tests - Cover your changes with tests
- Update documentation - Add docstrings and update guides
- Describe your changes - Write a clear PR description
- Link related issues - Reference issues your PR addresses
- Be responsive - Respond to review comments promptly
Development Setup
Local Development
Running the Examples
License
By contributing to BinaryDB, you agree that your contributions will be licensed under the GNU General Public License v3.0. Key points:- You can freely use, modify, and redistribute the code
- Redistributions must use the same GPL-3.0 license
- You must preserve attribution to the original author (Raúl Novo)
- No warranty is provided
Community
Getting Help
- Open an issue for bugs or feature requests
- Check existing issues before opening new ones
- Be respectful and constructive in all interactions
Recognition
Contributors will be recognized in:- Project README
- Release notes
- Documentation credits
Questions?
If you have questions about contributing:- Check existing issues and discussions
- Open a new issue with your question
- Be patient and respectful when waiting for responses
This is an open-source project maintained by volunteers. Response times may vary.
See Also
- Best Practices - Recommended usage patterns
- API Reference - Complete API documentation
- Security Guide - Important security considerations
