-
Notifications
You must be signed in to change notification settings - Fork 1
Add Optional SQLAlchemy Backend for Persistent Storage #16
Copy link
Copy link
Open
Labels
Description
Description
Currently, RunAPI uses an in-memory list-based storage as its database layer.
When SQLAlchemy is not installed, the code explicitly skips DB-related functionality.
This limits RunAPI’s usefulness for:
- Production-like environments
- Multi-process usage
- Persistent storage use cases
Proposal
Introduce optional SQLAlchemy support while keeping the current in-memory fallback.
Suggested Approach
- If
sqlalchemyis installed:- Use SQLAlchemy models and sessions
- Support SQLite out of the box
- If not installed:
- Continue using the existing in-memory list storage
- Abstract storage behind a common interface
Benefits
- Enables persistent storage
- Keeps RunAPI lightweight by default
- Allows gradual adoption without breaking changes
Expected Outcome
- More flexible backend support
- Better real-world usability
Reactions are currently unavailable