{"id":17942521,"url":"https://github.com/mrthearman/django-lookup-property","last_synced_at":"2025-10-09T23:18:42.808Z","repository":{"id":202658125,"uuid":"707394245","full_name":"MrThearMan/django-lookup-property","owner":"MrThearMan","description":"Django model properties that are also lookup expressions!","archived":false,"fork":false,"pushed_at":"2025-09-29T19:48:14.000Z","size":3377,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-09-29T21:42:54.575Z","etag":null,"topics":["django","lookup","optimization","orm","property"],"latest_commit_sha":null,"homepage":"https://pypi.org/project/django-lookup-property","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/MrThearMan.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-10-19T20:03:08.000Z","updated_at":"2025-09-29T19:48:17.000Z","dependencies_parsed_at":"2024-02-19T18:59:35.685Z","dependency_job_id":"f093b2de-4dcc-4643-9d0a-36efd09a8bf0","html_url":"https://github.com/MrThearMan/django-lookup-property","commit_stats":null,"previous_names":["mrthearman/django-lookup-property"],"tags_count":30,"template":false,"template_full_name":null,"purl":"pkg:github/MrThearMan/django-lookup-property","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MrThearMan%2Fdjango-lookup-property","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MrThearMan%2Fdjango-lookup-property/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MrThearMan%2Fdjango-lookup-property/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MrThearMan%2Fdjango-lookup-property/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/MrThearMan","download_url":"https://codeload.github.com/MrThearMan/django-lookup-property/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MrThearMan%2Fdjango-lookup-property/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279002344,"owners_count":26083340,"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-09T02:00:07.460Z","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","lookup","optimization","orm","property"],"created_at":"2024-10-29T03:06:05.299Z","updated_at":"2025-10-09T23:18:42.786Z","avatar_url":"https://github.com/MrThearMan.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Django Lookup Property\n\n[![Coverage Status][coverage-badge]][coverage]\n[![GitHub Workflow Status][status-badge]][status]\n[![PyPI][pypi-badge]][pypi]\n[![GitHub][licence-badge]][licence]\n[![GitHub Last Commit][repo-badge]][repo]\n[![GitHub Issues][issues-badge]][issues]\n[![Downloads][downloads-badge]][pypi]\n[![Python Version][version-badge]][pypi]\n\n```shell\npip install django-lookup-property\n```\n\n---\n\n**Documentation**: [https://mrthearman.github.io/django-lookup-property/](https://mrthearman.github.io/django-lookup-property/)\n\n**Source Code**: [https://github.com/MrThearMan/django-lookup-property/](https://github.com/MrThearMan/django-lookup-property/)\n\n**Contributing**: [https://github.com/MrThearMan/django-lookup-property/blob/main/CONTRIBUTING.md](https://github.com/MrThearMan/django-lookup-property/blob/main/CONTRIBUTING.md)\n\n---\n\nDjango model properties that are also lookup expressions.\n\n```python\nfrom lookup_property import lookup_property\nfrom django.db import models\nfrom django.db.models import Value\nfrom django.db.models.functions import Concat\n\nclass Student(models.Model):\n    first_name = models.CharField(max_length=50)\n    last_name = models.CharField(max_length=50)\n\n    @lookup_property\n    def full_name():\n        return Concat(\"first_name\", Value(\" \"), \"last_name\")\n```\n```pycon\n\u003e\u003e\u003e from myapp.models import Student\n\u003e\u003e\u003e from lookup_property import L\n\u003e\u003e\u003e\n\u003e\u003e\u003e Student.objects.create(first_name=\"John\", last_name=\"Doe\")\n\u003e\u003e\u003e student = Student.objects.filter(L(full_name=\"John Doe\")).first()\n\u003e\u003e\u003e\n\u003e\u003e\u003e student.full_name\n'John Doe'\n```\n\n[coverage-badge]: https://coveralls.io/repos/github/MrThearMan/django-lookup-property/badge.svg?branch=main\n[status-badge]: https://img.shields.io/github/actions/workflow/status/MrThearMan/django-lookup-property/test.yml?branch=main\n[pypi-badge]: https://img.shields.io/pypi/v/django-lookup-property\n[licence-badge]: https://img.shields.io/github/license/MrThearMan/django-lookup-property\n[repo-badge]: https://img.shields.io/github/last-commit/MrThearMan/django-lookup-property\n[issues-badge]: https://img.shields.io/github/issues-raw/MrThearMan/django-lookup-property\n[version-badge]: https://img.shields.io/pypi/pyversions/django-lookup-property\n[downloads-badge]: https://img.shields.io/pypi/dm/django-lookup-property\n\n[coverage]: https://coveralls.io/github/MrThearMan/django-lookup-property?branch=main\n[status]: https://github.com/MrThearMan/django-lookup-property/actions/workflows/test.yml\n[pypi]: https://pypi.org/project/django-lookup-property\n[licence]: https://github.com/MrThearMan/django-lookup-property/blob/main/LICENSE\n[repo]: https://github.com/MrThearMan/django-lookup-property/commits/main\n[issues]: https://github.com/MrThearMan/django-lookup-property/issues\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmrthearman%2Fdjango-lookup-property","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmrthearman%2Fdjango-lookup-property","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmrthearman%2Fdjango-lookup-property/lists"}