
Company News
Socket Named Top Sales Organization by RepVue
Socket won two 2026 Reppy Awards from RepVue, ranking in the top 5% of all sales orgs. AE Alexandra Lister shares what it's like to grow a sales career here.
datasette-updated
Advanced tools
Display the date your data was updated
Install this plugin in the same environment as Datasette.
datasette install datasette-updated
You can have a different updated value per table, database or Datasette instance. If undefined at any level, updated will fall back in that order. If no value is set, updated will be unknown.
If you have known updated values, you can define them in your base metadata.(json|yml):
{
"plugins": {
"datasette-updated": {
"updated": "2023-12-14T23:04:42+00:00"
}
},
"databases": {
"my-database-name": {
"plugins": {
"datasette-updated": {
"updated": "2023-01-01T00:00:00+00:00"
}
},
"tables": {
"my-table-name": {
"plugins": {
"datasette-updated": {
"updated": "2020-01-01T00:00:00+00:00"
}
}
...
If you want to define more dynamic updated value(s) on datasette package or datasette publish, put metadata for this plugin in YOUR_PLUGINS_DIR/datasette-updated/metadata.(json|yml). The following is an example that sets updated to the current date/time.
mkdir -p plugins/datasette-updated/ && \
echo '{
"plugins": {
"datasette-updated": {
"updated": "'"$(date -Iseconds)"'"
}
}
}' > plugins/datasette-updated/metadata.json && \
datasette publish --plugins-dir=plugins --install=datasette-updated ...
You can combine base metadata and plugin metadata configuration, but be aware that the base metadata.(json|yml) will always win if there is a duplicate configuration value.
The base / instance level metadata can accept the following extra configuration (that will apply to all levels):
time_type (default: time-ago)
time: 2023-12-01T00:00:00+00:00date: "Apr 11" or "Apr 11, 2013"time-ago: "a second ago", "32 seconds ago", "an hour ago", "14 hours ago"time-or-date: "3:26pm" or "Apr 11"weekday: "Today", "Yesterday", or the weekdayweekday-or-date: "Yesterday" or "Apr 11"{
"plugins": {
"datasette-updated": {
"time_type": "time"
}
}
}
The plugin will try to load a footer template that is copied from the default Datasette footer template, but with the following addition:
{% if datasette_updated %}·
Updated:
<time
data-local="{{ datasette_updated.time_type }}"
datetime="{{ datasette_updated.updated }}">
{{ datasette_updated.updated }}
</time>
{% endif %}

To set up this plugin locally, first checkout the code. Then create a new virtual environment:
cd datasette-updated
python3 -m venv venv
source venv/bin/activate
Now install the dependencies and test dependencies:
pip install -e '.[test]'
To run the tests:
pytest
FAQs
Display the date your data was updated
We found that datasette-updated 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.

Company News
Socket won two 2026 Reppy Awards from RepVue, ranking in the top 5% of all sales orgs. AE Alexandra Lister shares what it's like to grow a sales career here.

Security News
NIST will stop enriching most CVEs under a new risk-based model, narrowing the NVD's scope as vulnerability submissions continue to surge.

Company News
/Security News
Socket is an initial recipient of OpenAI's Cybersecurity Grant Program, which commits $10M in API credits to defenders securing open source software.