How nside/sqlite2rest works
SQLite2REST turns an SQLite database into a Flask CRUD API and can generate an OpenAPI specification. The main workflow is: a developer starts the CLI server, the app inspects database tables and registers routes, and HTTP requests invoke database operations whose results are returned as JSON. The separate spec workflow reads table and column metadata to generate YAML. The graph follows the README and sampled runtime source; unsampled integrations and internal details are omitted.
Main entry points: routes.py CRUD routes · openapi.py OpenAPI generator · database.py Database access · __main__.py CLI commands
Components 10
Entry and app
- CLI commands
sqlite2rest/__main__.py - App setup
sqlite2rest/app.py
HTTP API
- CRUD routes
sqlite2rest/routes.py - JSON responses
sqlite2rest/routes.py
API specification
- OpenAPI generator
sqlite2rest/openapi.py - OpenAPI YAML
sqlite2rest/openapi.py
SQLite access
- Database access
sqlite2rest/database.py
Other components
- Developer
- SQLite database
- API client
Connections 14
- Developer → CLI commands: runs command
- CLI commands → App setup: starts server
- App setup → Database access: discovers tables
- App setup → CRUD routes: registers routes
- Database access → SQLite database: queries and updates
- API client → CRUD routes: sends requests
- CRUD routes → Database access: runs CRUD
- CRUD routes → OpenAPI generator: requests spec
- OpenAPI generator → Database access: reads schema
- CRUD routes → JSON responses: returns JSON
- JSON responses → API client: sends response
- CLI commands → OpenAPI generator: generates spec
- OpenAPI generator → OpenAPI YAML: serializes spec
- OpenAPI YAML → Developer: prints spec