
Security News
Browserslist-rs Gets Major Refactor, Cutting Binary Size by Over 1MB
Browserslist-rs now uses static data to reduce binary size by over 1MB, improving memory use and performance for Rust-based frontend tools.
A Python library for creating a RESTful API from an SQLite database using Flask.
SQLite2REST is a Python library that simplifies the process of creating a RESTful API from an SQLite database using the Flask web framework. It automatically reads the schema of an SQLite database and generates endpoints for each table, allowing for Create, Read, Update, and Delete (CRUD) operations. The library also generates an OpenAPI specification for the API.
You can install SQLite2REST using pip:
pip install sqlite2rest
You can use SQLite2REST from the command line by providing the path to your SQLite database:
sqlite2rest serve /path/to/database.db
This will start a Flask server with endpoints for each table in the database. For example, if your database has a table named users
, you can access the records in this table at the /users
endpoint.
You can also use the /openapi.yaml
endpoint to get the OpenAPI specification for the API.
For each table in the database, the following endpoints are available:
GET /<table>
: Get all records from the table.GET /<table>/<id>
: Returns the record with the given ID from the table.POST /<table>
: Create a new record in the table. The data for the record should be provided as JSON in the request body.PUT /<table>/<id>
: Update an existing record in the table. The data for the record should be provided as JSON in the request body.DELETE /<table>/<id>
: Delete an existing record from the table.You can also generate an OpenAPI specification from an SQLite database:
sqlite2rest spec /path/to/database.db
Contributions are welcome! Please feel free to submit a pull request.
SQLite2REST is licensed under the MIT license. See the LICENSE file for more details.
FAQs
A Python library for creating a RESTful API from an SQLite database using Flask.
We found that sqlite2rest demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Browserslist-rs now uses static data to reduce binary size by over 1MB, improving memory use and performance for Rust-based frontend tools.
Research
Security News
Eight new malicious Firefox extensions impersonate games, steal OAuth tokens, hijack sessions, and exploit browser permissions to spy on users.
Security News
The official Go SDK for the Model Context Protocol is in development, with a stable, production-ready release expected by August 2025.