{"id":13815172,"url":"https://github.com/manimino/ducks","last_synced_at":"2025-12-14T13:00:28.708Z","repository":{"id":38066718,"uuid":"494507924","full_name":"manimino/ducks","owner":"manimino","description":"Indexes your Python objects for fast lookup by their attributes.","archived":false,"fork":false,"pushed_at":"2025-10-17T13:05:58.000Z","size":5626,"stargazers_count":142,"open_issues_count":21,"forks_count":4,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-10-21T20:00:06.178Z","etag":null,"topics":["attribute","btree","ducks","finder","index","object","python"],"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/manimino.png","metadata":{"files":{"readme":"README.rst","changelog":null,"contributing":"CONTRIBUTING.rst","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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2022-05-20T15:02:37.000Z","updated_at":"2025-09-23T00:53:16.000Z","dependencies_parsed_at":"2024-04-29T14:43:05.494Z","dependency_job_id":"49666b49-d701-4a10-acea-ded11491afb2","html_url":"https://github.com/manimino/ducks","commit_stats":{"total_commits":242,"total_committers":4,"mean_commits":60.5,"dds":0.3801652892561983,"last_synced_commit":"0217a0e9673fde155a81ac9ab23dfd3538fcd235"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/manimino/ducks","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/manimino%2Fducks","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/manimino%2Fducks/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/manimino%2Fducks/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/manimino%2Fducks/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/manimino","download_url":"https://codeload.github.com/manimino/ducks/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/manimino%2Fducks/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":27728742,"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-12-14T02:00:11.348Z","response_time":56,"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":["attribute","btree","ducks","finder","index","object","python"],"created_at":"2024-08-04T04:03:04.167Z","updated_at":"2025-12-14T13:00:28.685Z","avatar_url":"https://github.com/manimino.png","language":"Python","funding_links":[],"categories":["Python"],"sub_categories":[],"readme":".. image:: https://raw.githubusercontent.com/manimino/ducks/main/docs/img/ducks-main.png\n    :alt: Ducks, the Python object indexer\n\n=========\nducks  🦆\n=========\n\nIndex your Python objects for fast lookup by their attributes.\n\n.. image:: https://img.shields.io/github/stars/manimino/ducks.svg?style=social\u0026label=Star\u0026maxAge=2592000\n    :target: https://github.com/manimino/ducks\n    :alt: GitHub stars\n.. image:: https://github.com/manimino/ducks/workflows/tests/badge.svg\n    :target: https://github.com/manimino/ducks/actions\n    :alt: tests Actions Status\n.. image:: https://codecov.io/github/manimino/ducks/coverage.svg?branch=main\n    :target: https://codecov.io/gh/manimino/ducks\n    :alt: Coverage\n.. image:: https://img.shields.io/static/v1?label=license\u0026message=MIT\u0026color=2ea44f\n    :target: https://github.com/manimino/ducks/blob/main/LICENSE\n    :alt: license - MIT\n.. image:: https://img.shields.io/static/v1?label=python\u0026message=3.7%2B\u0026color=2ea44f\n    :target: https://github.com/manimino/ducks/\n    :alt: python - 3.7+\n\n-------\nInstall\n-------\n\n.. code-block::\n\n    pip install ducks\n\n-----\nUsage\n-----\n\nThe main container in ducks is called Dex.\n\n.. code-block::\n\n    from ducks import Dex\n\n    # make some objects\n    objects = [\n        {'x': 3, 'y': 'a'},\n        {'x': 6, 'y': 'b'},\n        {'x': 9, 'y': 'c'}\n    ]\n\n    # Create a Dex containing the objects.\n    # Index on x and y.\n    dex = Dex(objects, ['x', 'y'])\n\n    # match objects\n    dex[{\n        'x': {'\u003e': 5, '\u003c': 10},  # where 5 \u003c x \u003c 10\n        'y': {'in': ['a', 'b']}  # and y is 'a' or 'b'\n    }]\n    # result: [{'x': 6, 'y': 'b'}]\n\nThis is a Dex of dicts, but the objects can be any type, even primitives like strings.\n\nDex supports ==, !=, in, not in, \u003c, \u003c=, \u003e, \u003e=.\n\nThe indexes can be dict keys, object attributes, or custom functions.\n\nSee `Quick Start \u003chttps://ducks.readthedocs.io/en/latest/quick_start.html\u003e`_ for more examples of all of these.\n\n--------------\nIs ducks fast?\n--------------\n\nYes. Here's how the ducks containers compare to other datastores on an example task.\n\n.. image:: https://raw.githubusercontent.com/manimino/ducks/main/docs/img/perf_bench.png\n    :width: 600\n\nIn this benchmark, two million objects are generated. Each datastore is used to find the subset of 200 of them that match\nfour constraints. The ducks containers Dex and FrozenDex are shown to be very efficient at this, outperforming by 5x and\nand 10x respectively.\n\nBenchmark code is `in the Jupyter notebook \u003chttps://github.com/manimino/ducks/blob/main/examples/perf_demo.ipynb\u003e`_.\n\n----\nDocs\n----\n\n`Quick Start \u003chttps://ducks.readthedocs.io/en/latest/quick_start.html\u003e`_ covers all the features you need, like\npickling, nested attribute handling, and thread concurrency.\n\n`How It Works \u003chttps://ducks.readthedocs.io/en/latest/how_it_works.html\u003e`_ is a deep dive on the implementation details.\n\n`Demos \u003chttps://ducks.readthedocs.io/en/latest/demos.html\u003e`_ has short scripts showing example uses.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmanimino%2Fducks","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmanimino%2Fducks","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmanimino%2Fducks/lists"}