mirror of
https://github.com/simonw/datasette.git
synced 2025-12-10 16:51:24 +01:00
ensure_build_metadata() function for metadata
This will be run at compile time - the goal is to generate a build-
metadata.json file with a bunch of useful facts about the databases that could
be expensive to generate at run-time.
Example metadata:
{
"flights": {
"file": "flights.db",
"tables": {
"airlines": 6048,
"airports": 8107,
"routes": 67663
},
"hash": "07d1283e07786b1235bb7041ea445ae103d1571565580a29eab0203c555725fd"
}
So far we have a sha256 hash of the database file itself, plus a row count for
each table.
Fixes #11
This commit is contained in:
parent
f571b19d8a
commit
6a0c5de615
3 changed files with 51 additions and 0 deletions
2
.gitignore
vendored
2
.gitignore
vendored
|
|
@ -1,3 +1,5 @@
|
|||
build-metadata.json
|
||||
|
||||
# Byte-compiled / optimized / DLL files
|
||||
__pycache__/
|
||||
*.py[cod]
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue