index on ventil:
5897a5a Merge branch 'matousek' of https://bastart.spoton.cz/git/spoton/cherrypy_sqlite_restapi into ventil
cherrypy_sqlite_restapi
Simple, lightweight, universal SQLite API, based on cherrypy.
Requirements:
1. universal
2. ssl / non-ssl versions
3. secure / cleanup of querries
4. DB/table specification
5. row inserts
6. row deletes
7. row modifies
REST API
https://www.restapitutorial.com/
Cherrypy http microframework / server
Progress
-
set up Cherrypy server as base for RESTAPI (matoumi)
- cherrypy base, config, root, ssl (later)?
- responses for /insert /select /delete /modify
-
classes and functions for DB operations and mapping
- Conditions operators and values can obviously be merged to one statement and sent to the API as is - then need to be validated.
- INSERT
- STRUCTURE http://server/{operation}/{db}/{table}/?values=1,2,3,4
- INSERT INTO {table} VALUES({val1}, {val2})
- validate number of fields and types
- error handling and tracebacks
- SELECT
- STRUCTURE: http://server/{operation}/{db}/{table}/?json=true
- operation, db, table, json are optional
- SELECT {fields} FROM {table} WHERE {condition} {operator} {value}
- TODO: conditions and filters
- the whole where cluase is optional, but needs to be implemented
- STRUCTURE: http://server/{operation}/{db}/{table}/?json=true
- DELETE
- DELETE FROM {table} WHERE {condition} {operator} {value}
- MODIFY / ALTER
-
aggregate functions and complex queries mapping
Description
Languages
Python
94.6%
HTML
5.4%