{"id":13815219,"url":"https://github.com/simonw/django-sql-dashboard","last_synced_at":"2025-05-16T06:05:59.319Z","repository":{"id":39740676,"uuid":"347263722","full_name":"simonw/django-sql-dashboard","owner":"simonw","description":"Django app for building dashboards using raw SQL queries","archived":false,"fork":false,"pushed_at":"2024-03-06T14:15:45.000Z","size":346,"stargazers_count":451,"open_issues_count":36,"forks_count":38,"subscribers_count":9,"default_branch":"main","last_synced_at":"2025-05-10T08:44:25.273Z","etag":null,"topics":["dashboards","datasette-io","datasette-tool","django","sql"],"latest_commit_sha":null,"homepage":"https://django-sql-dashboard.datasette.io/","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/simonw.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"docs/contributing.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"docs/security.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-03-13T03:38:23.000Z","updated_at":"2025-04-30T20:42:55.000Z","dependencies_parsed_at":"2024-06-19T00:32:18.207Z","dependency_job_id":null,"html_url":"https://github.com/simonw/django-sql-dashboard","commit_stats":{"total_commits":203,"total_committers":12,"mean_commits":"16.916666666666668","dds":0.0788177339901478,"last_synced_commit":"59b71ea470f3bfa0be45abddf912ac3890c9308f"},"previous_names":[],"tags_count":36,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/simonw%2Fdjango-sql-dashboard","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/simonw%2Fdjango-sql-dashboard/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/simonw%2Fdjango-sql-dashboard/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/simonw%2Fdjango-sql-dashboard/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/simonw","download_url":"https://codeload.github.com/simonw/django-sql-dashboard/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254478188,"owners_count":22077676,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["dashboards","datasette-io","datasette-tool","django","sql"],"created_at":"2024-08-04T04:03:08.983Z","updated_at":"2025-05-16T06:05:57.791Z","avatar_url":"https://github.com/simonw.png","language":"Python","readme":"# django-sql-dashboard\n\n[![PyPI](https://img.shields.io/pypi/v/django-sql-dashboard.svg)](https://pypi.org/project/django-sql-dashboard/)\n[![Changelog](https://img.shields.io/github/v/release/simonw/django-sql-dashboard?include_prereleases\u0026label=changelog)](https://github.com/simonw/django-sql-dashboard/releases)\n[![Tests](https://github.com/simonw/django-sql-dashboard/workflows/Test/badge.svg)](https://github.com/simonw/django-sql-dashboard/actions?query=workflow%3ATest)\n[![Documentation Status](https://readthedocs.org/projects/django-sql-dashboard/badge/?version=latest)](http://django-sql-dashboard.datasette.io/en/latest/?badge=latest)\n[![License](https://img.shields.io/badge/license-Apache%202.0-blue.svg)](https://github.com/simonw/django-sql-dashboard/blob/main/LICENSE)\n\nDjango SQL Dashboard provides an authenticated interface for executing read-only SQL queries directly against your PostgreSQL database, bringing a useful subset of [Datasette](https://datasette.io/) to Django.\n\nApplications include ad-hoc analysis and debugging, plus the creation of reporting dashboards that can be shared with team members or published online.\n\nSee my blog for [more about this project](https://simonwillison.net/2021/May/10/django-sql-dashboard/), including [a video demo](https://www.youtube.com/watch?v=ausrmMZkPEY).\n\nFeatures include:\n\n- Safely run read-only one or more SQL queries against your database and view the results in your browser\n- Bookmark queries and share those links with other members of your team\n- Create [saved dashboards](https://django-sql-dashboard.datasette.io/en/latest/saved-dashboards.html) from your queries, with full control over who can view and edit them\n- [Named parameters](https://django-sql-dashboard.datasette.io/en/latest/sql.html#sql-parameters) such as `select * from entries where id = %(id)s` will be turned into form fields, allowing quick creation of interactive dashboards\n- Produce [bar charts](https://django-sql-dashboard.datasette.io/en/latest/widgets.html#bar-label-bar-quantity), [progress bars](https://django-sql-dashboard.datasette.io/en/latest/widgets.html#total-count-completed-count) and more from SQL queries, with the ability to easily create new [custom dashboard widgets](https://django-sql-dashboard.datasette.io/en/latest/widgets.html#custom-widgets) using the Django template system\n- Write SQL queries that safely construct and render [markdown](https://django-sql-dashboard.datasette.io/en/latest/widgets.html#markdown) and [HTML](https://django-sql-dashboard.datasette.io/en/latest/widgets.html#html)\n- Export the full results of a SQL query as a downloadable CSV or TSV file, using a combination of Django's [streaming HTTP response](https://docs.djangoproject.com/en/3.2/ref/request-response/#django.http.StreamingHttpResponse) mechanism and PostgreSQL [server-side cursors](https://www.psycopg.org/docs/usage.html#server-side-cursors) to efficiently stream large amounts of data without running out of resources\n- Copy and paste the results of SQL queries directly into tools such as Google Sheets or Excel\n- Uses Django's authentication system, so dashboard accounts can be granted using Django's Admin tools\n\n## Documentation\n\nFull documentation is at [django-sql-dashboard.datasette.io](https://django-sql-dashboard.datasette.io/)\n\n## Screenshot\n\n\u003cimg width=\"1018\" alt=\"Screenshot showing a SQL query that produces a table and one that produces a bar chart\" src=\"https://user-images.githubusercontent.com/9599/124050883-42ad2300-d9d0-11eb-83e6-44ad85f7ef64.png\"\u003e\n\n## Alternatives\n\n- [django-sql-explorer](https://github.com/groveco/django-sql-explorer) provides a related set of functionality that also works against database backends other than PostgreSQL\n","funding_links":[],"categories":["Python"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsimonw%2Fdjango-sql-dashboard","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsimonw%2Fdjango-sql-dashboard","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsimonw%2Fdjango-sql-dashboard/lists"}