{"id":48072773,"url":"https://github.com/toltec-astro/dash_component_template","last_synced_at":"2026-04-04T14:45:55.670Z","repository":{"id":53211950,"uuid":"427118888","full_name":"toltec-astro/dash_component_template","owner":"toltec-astro","description":"A framework to create reusable Dash layout.","archived":false,"fork":false,"pushed_at":"2022-02-28T13:20:26.000Z","size":989,"stargazers_count":6,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2026-01-08T02:56:56.241Z","etag":null,"topics":["dash-plotly"],"latest_commit_sha":null,"homepage":"https://toltec-astro.github.io/dash_component_template","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/toltec-astro.png","metadata":{"files":{"readme":"README.rst","changelog":"HISTORY.rst","contributing":"CONTRIBUTING.rst","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2021-11-11T19:29:00.000Z","updated_at":"2025-10-11T05:08:21.000Z","dependencies_parsed_at":"2022-09-15T06:20:26.810Z","dependency_job_id":null,"html_url":"https://github.com/toltec-astro/dash_component_template","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/toltec-astro/dash_component_template","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/toltec-astro%2Fdash_component_template","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/toltec-astro%2Fdash_component_template/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/toltec-astro%2Fdash_component_template/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/toltec-astro%2Fdash_component_template/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/toltec-astro","download_url":"https://codeload.github.com/toltec-astro/dash_component_template/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/toltec-astro%2Fdash_component_template/sbom","scorecard":{"id":891723,"data":{"date":"2025-08-11","repo":{"name":"github.com/toltec-astro/dash_component_template","commit":"0058d65d21824b100edd885f6cb7d0d4bc9ff50f"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":2.8,"checks":[{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Dangerous-Workflow","score":10,"reason":"no dangerous workflow patterns detected","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Code-Review","score":0,"reason":"Found 0/9 approved changesets -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"SAST","score":0,"reason":"no SAST tool detected","details":["Warn: no pull requests merged into dev branch"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Pinned-Dependencies","score":0,"reason":"dependency not pinned by hash detected -- score normalized to 0","details":["Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/ci_tests.yml:47: update your workflow using https://app.stepsecurity.io/secureworkflow/toltec-astro/dash_component_template/ci_tests.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/ci_tests.yml:51: update your workflow using https://app.stepsecurity.io/secureworkflow/toltec-astro/dash_component_template/ci_tests.yml/main?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/ci_tests.yml:63: update your workflow using https://app.stepsecurity.io/secureworkflow/toltec-astro/dash_component_template/ci_tests.yml/main?enable=pin","Warn: pipCommand not pinned by hash: .github/workflows/ci_tests.yml:56","Warn: pipCommand not pinned by hash: .github/workflows/ci_tests.yml:57","Info:   0 out of   2 GitHub-owned GitHubAction dependencies pinned","Info:   0 out of   1 third-party GitHubAction dependencies pinned","Info:   0 out of   2 pipCommand dependencies pinned"],"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"Token-Permissions","score":0,"reason":"detected GitHub workflow tokens with excessive permissions","details":["Warn: no topLevel permission defined: .github/workflows/ci_tests.yml:1","Info: no jobLevel write permissions found"],"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"License","score":9,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Warn: project license file does not contain an FSF or OSI license."],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'main'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"Vulnerabilities","score":3,"reason":"7 existing vulnerabilities detected","details":["Warn: Project is vulnerable to: PYSEC-2013-9 / GHSA-4gv5-qhvr-36vv","Warn: Project is vulnerable to: PYSEC-2021-437 / GHSA-5xp3-jfq3-5q8x","Warn: Project is vulnerable to: PYSEC-2019-160 / GHSA-c5h8-cq4v-cvfm","Warn: Project is vulnerable to: PYSEC-2013-8 / GHSA-g3p5-fjj9-h8gj","Warn: Project is vulnerable to: PYSEC-2020-173 / GHSA-gpvv-69j7-gwj8","Warn: Project is vulnerable to: PYSEC-2023-228 / GHSA-mq26-g339-26xf","Warn: Project is vulnerable to: PYSEC-2022-43017 / GHSA-qwmp-2cf2-g9g6"],"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}}]},"last_synced_at":"2025-08-24T12:06:04.814Z","repository_id":53211950,"created_at":"2025-08-24T12:06:04.814Z","updated_at":"2025-08-24T12:06:04.814Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31403585,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-04T10:20:44.708Z","status":"ssl_error","status_checked_at":"2026-04-04T10:20:06.846Z","response_time":60,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["dash-plotly"],"created_at":"2026-04-04T14:45:55.576Z","updated_at":"2026-04-04T14:45:55.660Z","avatar_url":"https://github.com/toltec-astro.png","language":"Python","readme":"=======================\ndash_component_template\n=======================\n\n\n.. image:: https://img.shields.io/pypi/v/dash_component_template.svg\n        :target: https://pypi.python.org/pypi/dash_component_template\n\n.. image:: https://img.shields.io/badge/gh--pages-doc-brightgreen\n        :target: https://toltec-astro.github.io/dash_component_template\n\n.. image:: https://github.com/toltec-astro/dash_component_template/actions/workflows/ci_tests.yml/badge.svg\n        :target: https://github.com/toltec-astro/dash_component_template/actions/workflows/ci_tests.yml\n\n.. image:: https://codecov.io/gh/toltec-astro/dash_component_template/branch/main/graph/badge.svg?token=4Z2P2IPL1U\n      :target: https://codecov.io/gh/toltec-astro/dash_component_template\n\n\nA framework to create reusable Dash layout.\n\n\n* Free software: BSD license\n* Documentation: https://toltec-astro.github.io/dash_component_template\n\n\nFeatures\n--------\n\nThis package provides a new API for creating Dash layout and callbacks.\n\n* The id and children are managed automatically. No deeply nested dicts\n  and lists any more; unique ids of components are automatically created.\n\n* A re-usable template can be defined by sub-classing\n  ``dash_component_template.ComponentTemplate``. Instances of the template\n  have children with unique ids and can be used anywhere in anyway inside\n  a larger Dash app layout tree.\n\nGet Started\n-----------\n\nSuppose we have the following Dash app (from Dash tutorial site):\n\n.. code::\n\n    # Run this app with `python app.py` and\n    # visit http://127.0.0.1:8050/ in your web browser.\n\n    import dash\n    from dash import dcc, html\n    import plotly.express as px\n    import pandas as pd\n\n    app = dash.Dash(__name__)\n\n    # assume you have a \"long-form\" data frame\n    # see https://plotly.com/python/px-arguments/ for more options\n    df = pd.DataFrame({\n        \"Fruit\": [\"Apples\", \"Oranges\", \"Bananas\", \"Apples\", \"Oranges\", \"Bananas\"],\n        \"Amount\": [4, 1, 2, 2, 4, 5],\n        \"City\": [\"SF\", \"SF\", \"SF\", \"Montreal\", \"Montreal\", \"Montreal\"]\n    })\n\n    fig = px.bar(df, x=\"Fruit\", y=\"Amount\", color=\"City\", barmode=\"group\")\n\n    app.layout = html.Div(children=[\n        html.H1(children='Hello Dash'),\n\n        html.Div(children='''\n            Dash: A web application framework for your data.\n        '''),\n\n        dcc.Graph(\n            id='example-graph',\n            figure=fig\n        )\n    ])\n\n    if __name__ == '__main__':\n        app.run_server(debug=True)\n\nLet's build a new app which have two columns of the same layout.\n\n.. code::\n\n    from dash_component_template import ComponentTemplate\n    import dash_bootstrap_components as dbc\n    import pandas as pd\n    import dash\n    import plotly.express as px\n    from dash import html, dcc\n\n\n    # This class defines a template that resembles the Dash example,\n    # with a title, subtitle, and graph for visualizing a data frame\n    class MyTableGraph(ComponentTemplate):\n\n        class Meta:\n            component_cls = dbc.Container\n\n        def __init__(self, title_text, subtitle_text, df, parent=None):\n            super().__init__(parent=parent)\n            self._title_text = title_text\n            self._subtitle_text = subtitle_text\n            self._df = df\n\n        def setup_layout(self, app):\n            container = self\n            container.child(html.Div, self._title_text)\n            container.child(html.Div, self._subtitle_text)\n            container.child(dcc.Graph, figure=self._make_fig())\n            super().setup_layout(app)\n\n        def _make_fig(self):\n            return px.bar(\n                self._df, x=\"Fruit\", y=\"Amount\", color=\"City\", barmode=\"group\")\n\n\n    # This class defines the app layout which have two columns each column\n    # contains an instance of the template defined above.\n\n    class MyPage(ComponentTemplate):\n\n        class Meta:\n            component_cls = dbc.Container\n\n        # define some data\n        df1 = pd.DataFrame({\n            \"Fruit\": [\n                \"Apples\", \"Oranges\", \"Bananas\", \"Apples\", \"Oranges\", \"Bananas\"],\n            \"Amount\": [4, 1, 2, 2, 4, 5],\n            \"City\": [\"SF\", \"SF\", \"SF\", \"Montreal\", \"Montreal\", \"Montreal\"]\n        })\n\n        df2 = pd.DataFrame({\n            \"Fruit\": [\n                \"Apples\", \"Oranges\", \"Bananas\", \"Apples\", \"Oranges\", \"Bananas\"],\n            \"Amount\": [5, 6, 7, 8, 4, 5],\n            \"City\": [\"SF\", \"SF\", \"SF\", \"Montreal\", \"Montreal\", \"Montreal\"]\n        })\n\n        def setup_layout(self, app):\n            col1, col2 = self.grid(nrows=1, ncols=2, squeeze=True)\n            col1.child(MyTableGraph(\n                df=self.df1,\n                title_text='Hello Dash (left)',\n                subtitle_text='Re-usable template instance 1'\n                ))\n            col2.child(MyTableGraph(\n                df=self.df2,\n                title_text='Hello Dash (right)',\n                subtitle_text='Re-usable template instance 2'\n                ))\n            # this line is important which triggers children's setup_layout\n            super().setup_layout(app)\n\n\n    # Now create the app and set the bootstrap css\n    app = dash.Dash(__name__, external_stylesheets=[dbc.themes.BOOTSTRAP])\n\n    # Instantiant the page tempalte, and call the setup layout function\n    # This only \"declare\" the structure of the Dash components. No actual\n    # Dash components are created yet.\n    page = MyPage()\n    page.setup_layout(app)\n    # Create and assign the app layout. The actual creation of Dash components\n    # are done here.\n    app.layout = page.layout\n\n    if __name__ == '__main__':\n        app.run_server(debug=True)\n\n\nLive Examples\n-------------\n\nLive examples can be found in the `TolTEC DR site \u003chttp://toltecdr.astro.umass.edu\u003e`_.\n\n\nCredits\n-------\n\nThis package was created with Cookiecutter_ and the `audreyr/cookiecutter-pypackage`_ project template.\n\n.. _Cookiecutter: https://github.com/audreyr/cookiecutter\n.. _`audreyr/cookiecutter-pypackage`: https://github.com/audreyr/cookiecutter-pypackage\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftoltec-astro%2Fdash_component_template","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftoltec-astro%2Fdash_component_template","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftoltec-astro%2Fdash_component_template/lists"}