All Projects → simonw → datasette-render-images

simonw / datasette-render-images

Licence: other
Datasette plugin that renders binary blob images using data-uris

Programming Languages

python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to datasette-render-images

datasette-cluster-map
Datasette plugin that shows a map for any data with latitude/longitude columns
Stars: ✭ 51 (+264.29%)
Mutual labels:  datasette, datasette-plugin, datasette-io
datasette-publish-vercel
Datasette plugin for publishing data using Vercel
Stars: ✭ 30 (+114.29%)
Mutual labels:  datasette, datasette-plugin, datasette-io
datasette-ripgrep
Web interface for searching your code using ripgrep, built as a Datasette plugin
Stars: ✭ 58 (+314.29%)
Mutual labels:  datasette, datasette-plugin, datasette-io
datasette-dashboards
Datasette plugin providing data dashboards from metadata
Stars: ✭ 65 (+364.29%)
Mutual labels:  datasette, datasette-plugin, datasette-io
dogsheep-photos
Upload your photos to S3 and import metadata about them into a SQLite database
Stars: ✭ 156 (+1014.29%)
Mutual labels:  datasette, datasette-io
google-takeout-to-sqlite
Save data from Google Takeout to a SQLite database
Stars: ✭ 73 (+421.43%)
Mutual labels:  datasette, datasette-io
Datasette
An open source multi-tool for exploring and publishing data
Stars: ✭ 5,640 (+40185.71%)
Mutual labels:  datasette, datasette-io
pocket-to-sqlite
Create a SQLite database containing data from your Pocket account
Stars: ✭ 56 (+300%)
Mutual labels:  datasette, datasette-io
healthkit-to-sqlite
Convert an Apple Healthkit export zip to a SQLite database
Stars: ✭ 130 (+828.57%)
Mutual labels:  datasette, datasette-io
dbf-to-sqlite
CLI tool for converting DBF files (dBase, FoxPro etc) to SQLite
Stars: ✭ 31 (+121.43%)
Mutual labels:  datasette-io
django-sql-dashboard
Django app for building dashboards using raw SQL queries
Stars: ✭ 369 (+2535.71%)
Mutual labels:  datasette-io
evernote-to-sqlite
Tools for converting Evernote content to SQLite
Stars: ✭ 28 (+100%)
Mutual labels:  datasette-io
datasette.io
The official project website for Datasette
Stars: ✭ 48 (+242.86%)
Mutual labels:  datasette
geojson-to-sqlite
CLI tool for converting GeoJSON files to SQLite (with SpatiaLite)
Stars: ✭ 41 (+192.86%)
Mutual labels:  datasette-io
museums
A website recommending niche museums to visit
Stars: ✭ 30 (+114.29%)
Mutual labels:  datasette
covid-19-datasette
Deploys a Datasette instance of COVID-19 data from Johns Hopkins CSSE and the New York Times
Stars: ✭ 62 (+342.86%)
Mutual labels:  datasette
cbmtapepi
Use a Raspberry Pi as fast mass storage solution for your Commodore 8-bit computer using just the datassette port.
Stars: ✭ 41 (+192.86%)
Mutual labels:  datasette
goodreads-to-sqlite
Export your (or other people's) Goodreads data to SQLite
Stars: ✭ 62 (+342.86%)
Mutual labels:  datasette
sqlite-generate
Tool for generating demo SQLite databases
Stars: ✭ 20 (+42.86%)
Mutual labels:  datasette-io

datasette-render-images

PyPI Changelog Tests License

A Datasette plugin that renders binary blob images with data-uris, using the render_cell() plugin hook.

Installation

Install this plugin in the same environment as Datasette.

$ pip install datasette-render-images

Usage

If a database row contains binary image data (PNG, GIF or JPEG), this plugin will detect that it is an image (using the imghdr module and render that cell using an <img src="data:image/png;base64,..."> element.

Here's a demo of the plugin in action.

Creating a compatible database table

You can use the sqlite-utils insert-files command to insert image files into a database table:

$ pip install sqlite-utils
$ sqlite-utils insert-files gifs.db images *.gif

See Fun with binary data and SQLite for more on this tool.

Configuration

By default the plugin will only render images that are smaller than 100KB. You can adjust this limit using the size_limit plugin configuration option - for example, to increase the limit to 1MB (1000000 bytes) use the following in metadata.json:

{
    "plugins": {
        "datasette-render-images": {
            "size_limit": 1000000
        }
    }
}
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].