Loading repository data…
Loading repository data…
joaojkuligowski / repository
A minimal REST API for creating and managing SQLite3 databases remotely. Easily spin up lightweight SQLite instances, run queries, load extensions, and access multiple databases over HTTP. Ideal for prototyping, local tools, testing environments, and simple remote data storage.
A transparent discovery signal based on current public GitHub metadata.
This score does not audit code, security, maintainers, documentation quality, or suitability. Verify the repository and its current documentation before adoption.
A experimental REST API for managing multiple SQLite databases with extension support, caching, query optimization, and SQL dialect conversion.
git clone https://github.com/joaojkuligowski/sqlite-multi-db-api.git
cd sqlite-multi-db-api
python -m venv venv
source venv/bin/activate # On Windows: venv\Scripts\activate
pip install -r requirements.txt
.env file based on .env.example:cp .env.example .env
.env file to set your API key and other configuration options.python src/main.py
This will start the server on http://localhost:8000.
POST /query - Execute a SQL queryGET /query/{query_id} - Get status and results of a queryPOST /db/{db_name} - Create a new databaseGET /extensions - List available extensionsPOST /extensions/load - Load an extension into a databaseGET /extensions/{extension_name} - Get information about an extensionGET /db/{db_name}/extensions - List extensions loaded in a databasePOST /tools/optimize - Optimize a SQL queryPOST /tools/convert - Convert a query between SQL dialectscurl -X POST "http://localhost:8000/query" \
-H "X-API-Key: your-secret-api-key" \
-H "Content-Type: application/json" \
-d '{
"query": "SELECT * FROM example LIMIT 10",
"db_name": "default",
"cache_ttl": 300
}'
curl -X POST "http://localhost:8000/db/my_new_db" \
-H "X-API-Key: your-secret-api-key"
curl -X POST "http://localhost:8000/extensions/load" \
-H "X-API-Key: your-secret-api-key" \
-H "Content-Type: application/json" \
-d '{
"extension_name": "my_extension.so",
"db_name": "default"
}'
curl -X POST "http://localhost:8000/tools/optimize" \
-H "X-API-Key: your-secret-api-key" \
-H "Content-Type: application/json" \
-d '{
"query": "SELECT a.id, b.name FROM table_a a LEFT JOIN table_b b ON a.id = b.id WHERE a.value > 10"
}'
curl -X POST "http://localhost:8000/tools/convert" \
-H "X-API-Key: your-secret-api-key" \
-H "Content-Type: application/json" \
-d '{
"origin_dialect": "sqlite",
"target_dialect": "mysql",
"query": "SELECT * FROM users WHERE rowid = 1"
}'
Edit the configuration in src/config.py or override using environment variables:
API_KEY: Authentication key for API accessDB_DIR: Directory to store SQLite databasesEXTENSIONS_DIR: Directory for SQLite extensionsMAX_WORKERS: Maximum number of worker threadsCACHE_EXPIRY: Default cache expiration time in secondsMAX_CACHE_SIZE: Maximum number of items in the query cacheTo use SQLite extensions:
.so (Linux), .dll (Windows), or .dylib (macOS) extension files in the extensions/ directorypytest tests/
src/models/ directorysrc/services/ directorysrc/api/routes/ directorysrc/api/router.pyMIT