{"id":49124152,"url":"https://github.com/intouch-smartwater/queryset-csv","last_synced_at":"2026-04-21T13:33:08.699Z","repository":{"id":62571298,"uuid":"183254439","full_name":"intouch-smartwater/queryset-csv","owner":"intouch-smartwater","description":"CSV QuerySet serialization for the Django framework","archived":false,"fork":false,"pushed_at":"2020-01-13T09:37:45.000Z","size":111,"stargazers_count":1,"open_issues_count":1,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-09-18T18:51:54.811Z","etag":null,"topics":["csv","django","python","queryset","serializer"],"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/intouch-smartwater.png","metadata":{"files":{"readme":"README.rst","changelog":null,"contributing":null,"funding":null,"license":"COPYING","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2019-04-24T15:14:48.000Z","updated_at":"2019-06-11T14:03:21.000Z","dependencies_parsed_at":"2022-11-03T17:15:43.217Z","dependency_job_id":null,"html_url":"https://github.com/intouch-smartwater/queryset-csv","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/intouch-smartwater/queryset-csv","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/intouch-smartwater%2Fqueryset-csv","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/intouch-smartwater%2Fqueryset-csv/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/intouch-smartwater%2Fqueryset-csv/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/intouch-smartwater%2Fqueryset-csv/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/intouch-smartwater","download_url":"https://codeload.github.com/intouch-smartwater/queryset-csv/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/intouch-smartwater%2Fqueryset-csv/sbom","scorecard":{"id":491779,"data":{"date":"2025-08-11","repo":{"name":"github.com/intouch-smartwater/queryset-csv","commit":"ca390f677ff206609c6e559b8d2fdaef5a1f13dd"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":2.7,"checks":[{"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":"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":"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 0/30 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":"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":"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":"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":"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":"Vulnerabilities","score":10,"reason":"0 existing vulnerabilities detected","details":null,"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}},{"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":0,"reason":"Project has not signed or included provenance with any releases.","details":["Warn: release artifact 0.3.1 not signed: https://api.github.com/repos/intouch-smartwater/queryset-csv/releases/16996102","Warn: release artifact 0.3.0 not signed: https://api.github.com/repos/intouch-smartwater/queryset-csv/releases/16996098","Warn: release artifact 0.3.1 does not have provenance: https://api.github.com/repos/intouch-smartwater/queryset-csv/releases/16996102","Warn: release artifact 0.3.0 does not have provenance: https://api.github.com/repos/intouch-smartwater/queryset-csv/releases/16996098"],"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"}}]},"last_synced_at":"2025-08-19T19:21:21.310Z","repository_id":62571298,"created_at":"2025-08-19T19:21:21.310Z","updated_at":"2025-08-19T19:21:21.310Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32094507,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-21T11:25:29.218Z","status":"ssl_error","status_checked_at":"2026-04-21T11:25:28.499Z","response_time":128,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: 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":["csv","django","python","queryset","serializer"],"created_at":"2026-04-21T13:33:04.343Z","updated_at":"2026-04-21T13:33:08.688Z","avatar_url":"https://github.com/intouch-smartwater.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"============\r\nQueryset CSV\r\n============\r\n\r\n.. image:: https://travis-ci.org/intouch-smartwater/queryset-csv.svg?branch=master\r\n    :target: https://travis-ci.org/intouch-smartwater/queryset-csv\r\n    \r\n.. image:: https://img.shields.io/github/license/intouch-smartwater/queryset-csv.svg\r\n    :target: https://github.com/intouch-smartwater/queryset-csv\r\n    :alt: GitHub\r\n    \r\n.. image:: https://img.shields.io/pypi/v/intouch_queryset_csv.svg\r\n    :target: https://pypi.org/project/intouch-queryset-csv/\r\n    :alt: PyPI\r\n\r\nQueryset CSV is a simple module to allow Django Querysets to be exported as CSV files.\r\n\r\n------------\r\nInstallation\r\n------------\r\n::\r\n\r\n    pip install intouch-queryset-csv\r\n\r\nThen add the app to your installed apps ::\r\n\r\n    intouch.queryset_csv\r\n\r\n-----\r\nUsage\r\n-----\r\n\r\nThere are several ways to use the Queryset csv exporter.\r\n\r\n^^^^^^^^^^^^^^^^^^\r\nRender to response\r\n^^^^^^^^^^^^^^^^^^\r\n\r\nThe most basic usage is to call the function ::\r\n\r\n    queryset_as_csv_response\r\n\r\nThis function accepts a queryset as a parameter, along with a filename and\r\nwhether the file is to be streamed. It returns an HTTPResponse object, so\r\nshould be called at the end of a view function to offer the download to the\r\nclient.\r\n\r\nWhen using this method, field selections made using `values()` and\r\n`values_list()` are respected - only selected fields will appear, and they\r\nwill appear in the order they are specified. Querysets using `defer()` or\r\n`only()` will still return all fields, but they will be lazily loaded as the\r\noutput file is generated.\r\n\r\n^^^^^^^^^^^^\r\nAdmin Action\r\n^^^^^^^^^^^^\r\n\r\nAn action is provided for the Django admin site. There are 3 ways of including it:\r\n\r\n#. The function :code:`export_model_as_csv` can be added to your custom admin\r\n    class's actions\r\n#. The :code:`CsvExporterAdmin` class can be inherited to provide the action\r\n#. Setting :code:`CSV_EXPORT_ADMIN_ACTION_AVAILABLE=True` in your django\r\n    settings module will make the action available to all registered admin\r\n    classes.\r\n\r\nThe action will simply export all objects of the selected model to csv (as a stream)  \r\n\r\n--------------------------------------------------------------------\r\nWhy create this code rather than use an existing CSV export project?\r\n--------------------------------------------------------------------\r\n\r\n#. Licensing - Other CSV export packages encountered are Licensed under the\r\n    GNU GPL. The GPL is incompatible with the desired usage, so a this was\r\n    written from scratch.\r\n#. Functionality - Existing CSV packages are not designed to handle very large\r\n    querysets, the option to steam querysets is essential for models with\r\n    thousands of entries.\r\n#. Simplicity - This package has no dependencies other than django itself, and\r\n    the requirements are to be kept to a minimum in future versions\r\n    (preferably solely django). It is also designed to require as little\r\n    effort as possible to use.\r\n#. Currency - The package is written and tested using the latest versions of\r\n    Python and Django. While it may work with older versions, no special\r\n    effort will be expended to force compatibility with old versions.\r\n\r\n--------\r\nSettings\r\n--------\r\n#. :code:`CSV_EXPORT_ADMIN_ACTION_AVAILABLE` - If True, adds the CSV Export\r\n    action to all admin pages by default\r\n#. :code:`QUERYSET_CSV_DATE_FORMAT` - Set the format to use when outputting\r\n    datetime.datetime objects, defaults to :code:`\"%d-%m-%Y %H:%M:%S\"`\r\n\r\n---------------\r\nTested Versions\r\n---------------\r\n\r\nDjango versions 1.11-2.2 should be supported, Python 3 versions supported as\r\nper the Django releases.\r\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fintouch-smartwater%2Fqueryset-csv","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fintouch-smartwater%2Fqueryset-csv","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fintouch-smartwater%2Fqueryset-csv/lists"}