{"id":13813632,"url":"https://github.com/dizballanze/django-eraserhead","last_synced_at":"2025-10-07T07:59:43.955Z","repository":{"id":49700314,"uuid":"96622726","full_name":"dizballanze/django-eraserhead","owner":"dizballanze","description":"💂🏻 Django package that provides hints to optimize database usage by deferring unused fields (and more)","archived":false,"fork":false,"pushed_at":"2022-12-26T20:27:56.000Z","size":236,"stargazers_count":193,"open_issues_count":3,"forks_count":3,"subscribers_count":8,"default_branch":"master","last_synced_at":"2025-10-02T13:58:19.869Z","etag":null,"topics":["django","django-models","django-orm","monkey-patching"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/dizballanze.png","metadata":{"files":{"readme":"README.rst","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-07-08T14:07:05.000Z","updated_at":"2025-09-05T10:12:06.000Z","dependencies_parsed_at":"2023-01-31T01:15:16.360Z","dependency_job_id":null,"html_url":"https://github.com/dizballanze/django-eraserhead","commit_stats":null,"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"purl":"pkg:github/dizballanze/django-eraserhead","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dizballanze%2Fdjango-eraserhead","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dizballanze%2Fdjango-eraserhead/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dizballanze%2Fdjango-eraserhead/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dizballanze%2Fdjango-eraserhead/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dizballanze","download_url":"https://codeload.github.com/dizballanze/django-eraserhead/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dizballanze%2Fdjango-eraserhead/sbom","scorecard":{"id":345593,"data":{"date":"2025-08-11","repo":{"name":"github.com/dizballanze/django-eraserhead","commit":"75daa0444c8edc8973c0638dde1367703cbf45de"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":1.7,"checks":[{"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":"Code-Review","score":0,"reason":"Found 1/29 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":"Token-Permissions","score":-1,"reason":"No tokens found","details":null,"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":"Dangerous-Workflow","score":-1,"reason":"no workflows found","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":"Pinned-Dependencies","score":-1,"reason":"no dependencies found","details":null,"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":"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":"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":"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":"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":"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":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: MIT License: LICENSE:0"],"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 'master'"],"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":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 2 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"name":"Vulnerabilities","score":0,"reason":"21 existing vulnerabilities detected","details":["Warn: Project is vulnerable to: PYSEC-2018-6 / GHSA-2f9x-5v75-3qv4","Warn: Project is vulnerable to: PYSEC-2019-17 / GHSA-337x-4q8g-prc5","Warn: Project is vulnerable to: PYSEC-2020-36 / GHSA-3gh2-xw74-jmcw","Warn: Project is vulnerable to: PYSEC-2018-2 / GHSA-5hg3-6c2f-f3wr","Warn: Project is vulnerable to: PYSEC-2021-98 / GHSA-68w8-qjq3-2gfm","Warn: Project is vulnerable to: PYSEC-2019-10 / GHSA-6c7v-2f49-8h26","Warn: Project is vulnerable to: PYSEC-2019-13 / GHSA-6r97-cj55-9hrq","Warn: Project is vulnerable to: PYSEC-2019-79 / GHSA-7rp2-fm2h-wchj","Warn: Project is vulnerable to: GHSA-7xr5-9hcq-chf9","Warn: Project is vulnerable to: GHSA-8x94-hmjh-97hq","Warn: Project is vulnerable to: PYSEC-2017-44 / GHSA-9r8w-6x8c-6jr9","Warn: Project is vulnerable to: PYSEC-2019-11 / GHSA-c4qh-4vgv-qc6g","Warn: Project is vulnerable to: PYSEC-2019-12 / GHSA-h5jv-4p7w-64jg","Warn: Project is vulnerable to: PYSEC-2020-35 / GHSA-hmr4-m2h5-33qx","Warn: Project is vulnerable to: PYSEC-2018-5 / GHSA-r28v-mw67-m5p9","Warn: Project is vulnerable to: GHSA-rrqc-c2jx-6jgv","Warn: Project is vulnerable to: PYSEC-2019-14 / GHSA-v9qg-3j8p-r63v","Warn: Project is vulnerable to: PYSEC-2019-16 / GHSA-vfq6-hq5r-27r6","Warn: Project is vulnerable to: PYSEC-2019-18 / GHSA-wh4h-v3f2-r2pp","Warn: Project is vulnerable to: PYSEC-2022-43017 / GHSA-qwmp-2cf2-g9g6","Warn: Project is vulnerable to: PYSEC-2022-238 / GHSA-h3qr-fjhm-jphw"],"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-18T06:57:31.825Z","repository_id":49700314,"created_at":"2025-08-18T06:57:31.825Z","updated_at":"2025-08-18T06:57:31.825Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":278740828,"owners_count":26037480,"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","status":"online","status_checked_at":"2025-10-07T02:00:06.786Z","response_time":59,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":["django","django-models","django-orm","monkey-patching"],"created_at":"2024-08-04T04:01:23.869Z","updated_at":"2025-10-07T07:59:43.917Z","avatar_url":"https://github.com/dizballanze.png","language":"Python","funding_links":[],"categories":["Testing","Python"],"sub_categories":[],"readme":"=============================\nDjango Eraserhead\n=============================\n\n.. image:: https://badge.fury.io/py/django-eraserhead.svg\n    :target: https://badge.fury.io/py/django-eraserhead\n\n.. image:: https://travis-ci.org/dizballanze/django-eraserhead.svg?branch=master\n    :target: https://travis-ci.org/dizballanze/django-eraserhead\n\n.. image:: https://codecov.io/gh/dizballanze/django-eraserhead/branch/master/graph/badge.svg\n    :target: https://codecov.io/gh/dizballanze/django-eraserhead\n\n.. image:: https://img.shields.io/badge/Say%20Thanks-!-1EAEDB.svg\n    :target: https://saythanks.io/to/dizballanze\n\nProvide hints to optimize database usage by deferring unused fields\n\n.. image:: https://github.com/dizballanze/django-eraserhead/raw/master/eraserhead.jpg\n\n*WARNING* use this package only in dev environment!\n\nDocumentation\n-------------\n\nRequirements\n-----------\n\n* Django 1.9+\n* Python 2.7, 3.4+\n\nQuickstart\n----------\n\nInstall Django Eraserhead::\n\n    pip install django-eraserhead\n\nAdd it to your `INSTALLED_APPS`:\n\n.. code-block:: python\n\n    INSTALLED_APPS = (\n        ...\n        'eraserhead.apps.EraserheadConfig',\n        ...\n    )\n\n    ERASERHEAD_ENABLED = True\n    ERASERHEAD_TRACEBACK_BASE_PATH = BASE_DIR\n\n\nSettings:\n\n* `ERASERHEAD_ENABLED` - enable/disable Django Eraserhead\n* `ERASERHEAD_TRACEBACK_BASE_PATH` - set base path to filter tracebacks. Set to `None` to display full traceback.\n\nFeatures\n--------\n\n.. image:: https://github.com/dizballanze/django-eraserhead/raw/master/screenshot.png\n\nDjango Eraserhead monitors:\n\n* querysets/models fields usage (used and unused fields) with considering deferred fields\n* count of instances created for each queryset\n* corresponding model of each queryset\n* traceback for each queryset to easily find corresponding code\n* calculate memory consumption of unused fields\n\nBased on fields usage Django Eraserhead suggests optimizations for each queryset.\n\n\nTODO\n-----\n\n* decorator and/or context processor for partial stats collecting\n* detect deferred fields loading\n* auto deferring fields based on usage\n* display deferred fields\n\nRunning Tests\n-------------\n\n::\n\n    source \u003cYOURVIRTUALENV\u003e/bin/activate\n    (myenv) $ pip install tox\n    (myenv) $ tox\n\nCredits\n-------\n\nTools used in rendering this package:\n\n*  Cookiecutter_\n*  `cookiecutter-djangopackage`_\n\n.. _Cookiecutter: https://github.com/audreyr/cookiecutter\n.. _`cookiecutter-djangopackage`: https://github.com/pydanny/cookiecutter-djangopackage\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdizballanze%2Fdjango-eraserhead","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdizballanze%2Fdjango-eraserhead","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdizballanze%2Fdjango-eraserhead/lists"}