{"id":17780733,"url":"https://github.com/sibyx/duckql-python","last_synced_at":"2025-06-24T15:06:17.617Z","repository":{"id":57424494,"uuid":"254049497","full_name":"Sibyx/duckql-python","owner":"Sibyx","description":"JSON-based SQL representation library","archived":false,"fork":false,"pushed_at":"2025-01-17T16:22:02.000Z","size":947,"stargazers_count":3,"open_issues_count":2,"forks_count":2,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-06-23T02:49:34.795Z","etag":null,"topics":["json","python","query-builder","query-language","sql"],"latest_commit_sha":null,"homepage":"https://sibyx.github.io/duckql-python/","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/Sibyx.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","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":"2020-04-08T09:56:01.000Z","updated_at":"2025-01-17T16:20:30.000Z","dependencies_parsed_at":"2025-03-15T22:31:24.036Z","dependency_job_id":null,"html_url":"https://github.com/Sibyx/duckql-python","commit_stats":null,"previous_names":[],"tags_count":32,"template":false,"template_full_name":null,"purl":"pkg:github/Sibyx/duckql-python","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Sibyx%2Fduckql-python","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Sibyx%2Fduckql-python/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Sibyx%2Fduckql-python/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Sibyx%2Fduckql-python/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Sibyx","download_url":"https://codeload.github.com/Sibyx/duckql-python/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Sibyx%2Fduckql-python/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":261700468,"owners_count":23196501,"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","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":["json","python","query-builder","query-language","sql"],"created_at":"2024-10-27T03:03:44.380Z","updated_at":"2025-06-24T15:06:17.608Z","avatar_url":"https://github.com/Sibyx.png","language":"Python","readme":"# duckQL 🐥\n\n![PyPi package](https://img.shields.io/pypi/v/duckql)\n![Tests](https://github.com/Sibyx/duckql-python/workflows/Tests/badge.svg)\n[![codecov](https://codecov.io/gh/Sibyx/duckql-python/branch/master/graph/badge.svg)](https://codecov.io/gh/Sibyx/duckql-python)\n[![FOSSA Status](https://app.fossa.io/api/projects/git%2Bgithub.com%2FSibyx%2Fduckql-python.svg?type=shield)](https://app.fossa.io/projects/git%2Bgithub.com%2FSibyx%2Fduckql-python?ref=badge_shield)\n\nduckQL is simple JSON-based notation for some SQL dialects (PostgreSQL, MariaDB, MySQL) based on\n[pydantic](https://github.com/samuelcolvin/pydantic/) library.\n\n## Example\n\nHere is a simple example of library usage. For more examples please visit\n[project page](https://sibyx.github.io/duckql-python/).\n\n```python\nfrom duckql import Query, Property, Comparision, Constant\n\n\nmy_query = Query(\n    entity='users',\n    properties=[\n        Property(name='users.name'),\n        Property(name='users.surname')\n    ],\n    conditions=Comparision(\n        properties=[\n            Property(name='users.age'),\n            Constant(value=15)\n        ],\n        operation=Comparision.Operation.GREATER_EQUAL\n    )\n)\n```\n\n```json\n{\n  \"obj\": \"structures.Query\",\n  \"entity\": \"users\",\n  \"properties\": [\n    {\n      \"obj\": \"properties.Property\",\n      \"name\": \"users.name\"\n    },\n    {\n      \"obj\": \"properties.Property\",\n      \"name\": \"users.surname\"\n    }\n  ],\n  \"conditions\": {\n    \"obj\": \"structures.Comparision\",\n    \"properties\": [\n      {\n        \"obj\": \"properties.Property\",\n        \"name\": \"users.age\"\n      },\n      {\n        \"obj\": \"properties.Constant\",\n        \"value\": \"15\"\n      }\n    ],\n    \"operation\": \"gte\"\n  }\n}\n```\n\n```postgresql\nSELECT users.name, users.surname FROM users WHERE (users.age \u003e= 15);\n```\n\n## Development\n\nProject is using [poetry](https://python-poetry.org/) and documentation is generated by\n[MkDocs](https://www.mkdocs.org/). If you want to generate documentation you need to follow these simple steps\ninside of your virtual environment:\n\n1. `poetry install`\n2. `mkdocs build`\n\nInside of your virtual environment, you can also use `mkdocs serve` to create temporary auto-reload http server with\nlive docs.\n\nWe use [pytest](https://docs.pytest.org/en/latest/) for unit tests and [flake8](https://flake8.pycqa.org/en/latest/)\nfor code-style validation. You can execute tests inside of pipenv shell using these commands:\n\n- `pytest -v .`: executes unit tests\n- `pytest -v --flake8 .`: flake8 code-style tests\n\n## License\n[![FOSSA Status](https://app.fossa.io/api/projects/git%2Bgithub.com%2FSibyx%2Fduckql-python.svg?type=large)](https://app.fossa.io/projects/git%2Bgithub.com%2FSibyx%2Fduckql-python?ref=badge_large)\n\n---\nMade with ☕️ and ❤️ by Jakub Dubec \u0026 [BACKBONE s.r.o.](https://www.backbone.sk/en/)\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsibyx%2Fduckql-python","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsibyx%2Fduckql-python","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsibyx%2Fduckql-python/lists"}