{"id":16641216,"url":"https://github.com/barseghyanartur/django-ormex","last_synced_at":"2026-05-18T17:02:26.740Z","repository":{"id":57421121,"uuid":"91631016","full_name":"barseghyanartur/django-ormex","owner":"barseghyanartur","description":"Django ORM extensions.","archived":false,"fork":false,"pushed_at":"2020-01-22T21:23:24.000Z","size":302,"stargazers_count":1,"open_issues_count":2,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2026-04-01T05:25:29.331Z","etag":null,"topics":["django","django-aggregations","django-orm"],"latest_commit_sha":null,"homepage":"https://pypi.python.org/pypi/django-ormex","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/barseghyanartur.png","metadata":{"files":{"readme":"README.rst","changelog":"CHANGELOG.rst","contributing":null,"funding":null,"license":"LICENSE_GPL2.0.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-05-18T00:13:17.000Z","updated_at":"2020-08-02T18:27:27.000Z","dependencies_parsed_at":"2022-09-10T23:20:30.922Z","dependency_job_id":null,"html_url":"https://github.com/barseghyanartur/django-ormex","commit_stats":null,"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"purl":"pkg:github/barseghyanartur/django-ormex","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/barseghyanartur%2Fdjango-ormex","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/barseghyanartur%2Fdjango-ormex/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/barseghyanartur%2Fdjango-ormex/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/barseghyanartur%2Fdjango-ormex/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/barseghyanartur","download_url":"https://codeload.github.com/barseghyanartur/django-ormex/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/barseghyanartur%2Fdjango-ormex/sbom","scorecard":{"id":226149,"data":{"date":"2025-08-11","repo":{"name":"github.com/barseghyanartur/django-ormex","commit":"9c3570b3b501dc5379c70d6bb7e6af05a8c3d754"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":1.6,"checks":[{"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":"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":"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":"Code-Review","score":0,"reason":"Found 0/27 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":"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":"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":"Pinned-Dependencies","score":0,"reason":"dependency not pinned by hash detected -- score normalized to 0","details":["Warn: pipCommand not pinned by hash: examples/ormex_demo_installer.sh:7","Warn: pipCommand not pinned by hash: examples/ormex_demo_installer.sh:8","Warn: pipCommand not pinned by hash: scripts/install.sh:1","Info:   0 out of   3 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":"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_GPL2.0.txt: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 '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":"Vulnerabilities","score":0,"reason":"45 existing vulnerabilities detected","details":["Warn: Project is vulnerable to: PYSEC-2014-5 / GHSA-296w-6qhq-gf92","Warn: Project is vulnerable to: PYSEC-2011-2 / GHSA-3jqw-crqj-w8qw","Warn: Project is vulnerable to: PYSEC-2012-3 / GHSA-59w8-4wm2-4xw8","Warn: Project is vulnerable to: PYSEC-2012-4 / GHSA-5h2q-4hrp-v9rr","Warn: Project is vulnerable to: PYSEC-2014-6 / GHSA-625g-gx8c-xcmg","Warn: Project is vulnerable to: PYSEC-2015-8 / GHSA-6565-fg86-6jcx","Warn: Project is vulnerable to: PYSEC-2021-98 / GHSA-68w8-qjq3-2gfm","Warn: Project is vulnerable to: PYSEC-2012-2 / GHSA-78vx-ggch-wghm","Warn: Project is vulnerable to: PYSEC-2015-9 / GHSA-7fq8-4pv5-5w5c","Warn: Project is vulnerable to: PYSEC-2015-4 / GHSA-7qfw-j7hp-v45g","Warn: Project is vulnerable to: PYSEC-2011-9 / GHSA-7wph-fc4w-wqp2","Warn: Project is vulnerable to: GHSA-7xr5-9hcq-chf9","Warn: Project is vulnerable to: PYSEC-2014-2 / GHSA-89hj-xfx5-7q66","Warn: Project is vulnerable to: GHSA-8x94-hmjh-97hq","Warn: Project is vulnerable to: PYSEC-2016-2 / GHSA-c8c8-9472-w52h","Warn: Project is vulnerable to: PYSEC-2016-3 / GHSA-crhm-qpjc-cm64","Warn: Project is vulnerable to: PYSEC-2014-4 / GHSA-f7cm-ccfp-3q4r","Warn: Project is vulnerable to: PYSEC-2016-16 / GHSA-fp6p-5xvw-m74f","Warn: Project is vulnerable to: PYSEC-2011-8 / GHSA-fwr5-q9rx-294f","Warn: Project is vulnerable to: PYSEC-2015-5 / GHSA-gv98-g628-m9x5","Warn: Project is vulnerable to: PYSEC-2015-20 / GHSA-h582-2pch-3xv3","Warn: Project is vulnerable to: PYSEC-2011-5 / GHSA-h95j-h2rv-qrg4","Warn: Project is vulnerable to: GHSA-hmr4-m2h5-33qx","Warn: Project is vulnerable to: PYSEC-2015-6 / GHSA-jhjg-w2cp-5j44","Warn: Project is vulnerable to: PYSEC-2016-15 / GHSA-pw27-w7w4-9qc7","Warn: Project is vulnerable to: PYSEC-2015-10 / GHSA-q5qw-4364-5hhm","Warn: Project is vulnerable to: PYSEC-2011-4 / GHSA-rm2j-x595-q9cj","Warn: Project is vulnerable to: GHSA-rrqc-c2jx-6jgv","Warn: Project is vulnerable to: PYSEC-2014-1 / GHSA-rvq6-mrpv-m6rm","Warn: Project is vulnerable to: PYSEC-2014-7 / GHSA-rw75-m7gp-92m3","Warn: Project is vulnerable to: PYSEC-2019-16 / GHSA-vfq6-hq5r-27r6","Warn: Project is vulnerable to: PYSEC-2014-3 / GHSA-wqjj-hx84-v449","Warn: Project is vulnerable to: PYSEC-2011-3 / GHSA-wxg3-mfph-qg9w","Warn: Project is vulnerable to: PYSEC-2011-1 / GHSA-x88j-93vc-wpmp","Warn: Project is vulnerable to: PYSEC-2007-1","Warn: Project is vulnerable to: PYSEC-2008-1","Warn: Project is vulnerable to: PYSEC-2008-2","Warn: Project is vulnerable to: PYSEC-2009-3","Warn: Project is vulnerable to: PYSEC-2015-11","Warn: Project is vulnerable to: PYSEC-2015-7","Warn: Project is vulnerable to: PYSEC-2016-18","Warn: Project is vulnerable to: PYSEC-2022-304","Warn: Project is vulnerable to: PYSEC-2021-10 / GHSA-pghf-347x-c2gj","Warn: Project is vulnerable to: PYSEC-2020-92 / GHSA-hj5v-574p-mj7c","Warn: Project is vulnerable to: PYSEC-2022-42969"],"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-17T03:52:20.724Z","repository_id":57421121,"created_at":"2025-08-17T03:52:20.724Z","updated_at":"2025-08-17T03:52:20.724Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33184769,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-18T09:27:30.708Z","status":"ssl_error","status_checked_at":"2026-05-18T09:27:28.300Z","response_time":71,"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":["django","django-aggregations","django-orm"],"created_at":"2024-10-12T07:45:51.478Z","updated_at":"2026-05-18T17:02:26.685Z","avatar_url":"https://github.com/barseghyanartur.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"============\ndjango-ormex\n============\nDjango ORM extensions.\n\n.. image:: https://img.shields.io/pypi/v/django-ormex.svg\n   :target: https://pypi.python.org/pypi/django-ormex\n   :alt: PyPI Version\n\n.. image:: https://img.shields.io/pypi/pyversions/django-ormex.svg\n    :target: https://pypi.python.org/pypi/django-ormex/\n    :alt: Supported Python versions\n\n.. image:: https://img.shields.io/travis/barseghyanartur/django-ormex/master.svg\n   :target: http://travis-ci.org/barseghyanartur/django-ormex\n   :alt: Build Status\n\n.. image:: https://readthedocs.org/projects/django-ormex/badge/?version=latest\n    :target: http://django-ormex.readthedocs.io/en/latest/?badge=latest\n    :alt: Documentation Status\n\n.. image:: https://img.shields.io/badge/license-GPL--2.0--only%20OR%20LGPL--2.1--or--later-blue.svg\n   :target: https://github.com/barseghyanartur/django-ormex/#License\n   :alt: GPL-2.0-only OR LGPL-2.1-or-later\n\n.. image:: https://coveralls.io/repos/github/barseghyanartur/django-ormex/badge.svg?branch=master\u0026service=github\n    :target: https://coveralls.io/github/barseghyanartur/django-ormex?branch=master\n    :alt: Coverage\n\nPrerequisites\n=============\n- Django 1.11, 2.2 and 3.0.\n- Python 2.7, 3.5, 3.6, 3.7 and 3.8\n\nSupported databases\n===================\nPostgreSQL, MySQL, SQLite\n\nInstallation\n============\nInstall in your virtual environment.\n\nLatest stable version from PyPI:\n\n.. code-block:: sh\n\n    pip install django-ormex\n\nLatest stable version from GitHub:\n\n.. code-block:: sh\n\n    pip install https://github.com/barseghyanartur/django-ormex/archive/stable.tar.gz\n\nUsage\n=====\nCommon usage examples.\n\nAggregations\n------------\nContains various modules for aggregations.\n\nGroupConcat\n~~~~~~~~~~~\nWorks like Concat, but for concatenating field values of related ManyToMany\nmodel. For instance, you may use it if you have an ``Author`` model as\nManyToMany relation in the ``Book`` model\n(``Book.authors = ManyToManyField(Author)``) and you want to have concatenated\nlist of all authors coupled to a given book.\n\nGiven the following models:\n\n.. code-block:: python\n\n    class Publisher(models.Model):\n        \"\"\"Publisher.\"\"\"\n\n        name = models.CharField(max_length=255)\n        address = models.CharField(max_length=255)\n        city = models.CharField(max_length=255)\n        state_province = models.CharField(max_length=255)\n        country = models.CharField(max_length=255)\n        website = models.URLField(max_length=255)\n\n\n    class Author(models.Model):\n        \"\"\"Author.\"\"\"\n\n        salutation = models.CharField(max_length=255)\n        name = models.CharField(max_length=255)\n        email = models.EmailField(max_length=255)\n        headshot = models.ImageField(upload_to='authors', null=True, blank=True)\n\n\n    class Book(models.Model):\n        \"\"\"Book.\"\"\"\n\n        title = models.CharField(max_length=255)\n        authors = models.ManyToManyField('books.Author', related_name='books')\n        publisher = models.ForeignKey(Publisher, related_name='books')\n        publication_date = models.DateField()\n        isbn = models.CharField(max_length=255, unique=True)\n        price = models.DecimalField(max_digits=10, decimal_places=2)\n        pages = models.PositiveIntegerField(default=200)\n        stock_count = models.PositiveIntegerField(default=30)\n\nWe could use GroupConcat as follows:\n\n.. code-block:: python\n\n    from ormex.aggregations import GroupConcat\n\n    book = Book.objects.all() \\\n            .values(\n                'id',\n                'title',\n                'pages',\n                'price',\n                'publisher__id',\n                'publisher__name'\n            ).annotate(\n                authors__name=GroupConcat('authors__name', separator=', ')\n            ).first()\n\nOutput would look as follows:\n\n.. code-block:: python\n\n    {\n        'authors__name': 'Finn Janssen, Dan Dijkman, Merel Wolf, Evy de Jong',\n        'id': 14,\n        'pages': 83,\n        'price': Decimal('62.13'),\n        'publisher__id': 19,\n        'publisher__name': 'Rijn, de Bruyn and Verharen',\n        'title': 'Laboriosam officia temporibus facere omnis odit.'\n    }\n\n``GroupConcat`` accepts an optional argument ``order_by`` which can be used\nfor tuning the sorting order of the resulted list of strings. In case if\n``self`` is given as value, sorted by the same field. In order to sort the\nlist of authors by name from the example above, do:\n\n.. code-block:: python\n\n    book = Book.objects.all() \\\n            .values(\n                'id',\n                'title',\n                'pages',\n                'price',\n                'publisher__id',\n                'publisher__name'\n            ).annotate(\n                authors__name=GroupConcat(\n                    'authors__name',\n                    separator=', ',\n                    order_by='self'\n                )\n            ).first()\n\nOutput would look as follows:\n\n.. code-block:: python\n\n    {\n        'authors__name': 'Dan Dijkman, Evy de Jong, Finn Janssen, Merel Wolf',\n        'id': 14,\n        'pages': 83,\n        'price': Decimal('62.13'),\n        'publisher__id': 19,\n        'publisher__name': 'Rijn, de Bruyn and Verharen',\n        'title': 'Laboriosam officia temporibus facere omnis odit.'\n    }\n\nDemo\n====\nRun demo locally\n----------------\nIn order to be able to quickly evaluate the `django-ormex`, a demo\napp (with a quick installer) has been created (works on Ubuntu/Debian, may\nwork on other Linux systems as well, although not guaranteed). Follow the\ninstructions below to have the demo running within a minute.\n\nGrab the latest ``ormex_demo_installer.sh``:\n\n.. code-block:: sh\n\n    wget -O - https://raw.github.com/barseghyanartur/django-ormex/stable/examples/ormex_demo_installer.sh | bash\n\nOpen your browser and test the app.\n\n- URL: http://127.0.0.1:8001/\n\nIf quick installer doesn't work for you, see the manual steps on running the\n`example project\n\u003chttps://github.com/barseghyanartur/django-ormex/tree/stable/examples\u003e`_.\n\nTesting\n=======\nSimply type:\n\n.. code-block:: sh\n\n    ./runtests.py\n\nor use tox:\n\n.. code-block:: sh\n\n    tox\n\nor use tox to check specific env:\n\n.. code-block:: sh\n\n    tox -e py38\n\nor run Django tests:\n\n.. code-block:: sh\n\n    ./manage.py test ormex --settings=settings.testing\n\nLicense\n=======\nGPL-2.0-only OR LGPL-2.1-or-later\n\nSupport\n=======\nFor any issues contact me at the e-mail given in the `Author`_ section.\n\nAuthor\n======\nArtur Barseghyan \u003cartur.barseghyan@gmail.com\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbarseghyanartur%2Fdjango-ormex","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbarseghyanartur%2Fdjango-ormex","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbarseghyanartur%2Fdjango-ormex/lists"}