{"id":25774748,"url":"https://github.com/doofinder/pydoof","last_synced_at":"2025-10-15T14:38:34.033Z","repository":{"id":10327585,"uuid":"12457495","full_name":"doofinder/pydoof","owner":"doofinder","description":" 🔍🐍 A Python library for search and indexing in Doofinder","archived":false,"fork":false,"pushed_at":"2025-03-14T12:58:02.000Z","size":210,"stargazers_count":2,"open_issues_count":2,"forks_count":3,"subscribers_count":13,"default_branch":"master","last_synced_at":"2025-09-29T05:24:38.980Z","etag":null,"topics":["doofinder","indexing","python","search","search-engine"],"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/doofinder.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGES.txt","contributing":null,"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":"2013-08-29T10:24:35.000Z","updated_at":"2025-03-14T12:58:06.000Z","dependencies_parsed_at":"2023-12-13T09:48:04.754Z","dependency_job_id":"208d3d17-5e08-4fea-bf20-bb33d4a90ec4","html_url":"https://github.com/doofinder/pydoof","commit_stats":{"total_commits":148,"total_committers":8,"mean_commits":18.5,"dds":0.5337837837837838,"last_synced_commit":"7382938088ad7fc23832527fae7680814012cd12"},"previous_names":[],"tags_count":24,"template":false,"template_full_name":null,"purl":"pkg:github/doofinder/pydoof","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/doofinder%2Fpydoof","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/doofinder%2Fpydoof/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/doofinder%2Fpydoof/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/doofinder%2Fpydoof/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/doofinder","download_url":"https://codeload.github.com/doofinder/pydoof/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/doofinder%2Fpydoof/sbom","scorecard":{"id":352191,"data":{"date":"2025-08-11","repo":{"name":"github.com/doofinder/pydoof","commit":"65c9273d24abdf7fe123af03291e47e9418e76f9"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":4,"checks":[{"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":"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":"Dangerous-Workflow","score":10,"reason":"no dangerous workflow patterns detected","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":"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":"Code-Review","score":6,"reason":"Found 18/26 approved changesets -- score normalized to 6","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":0,"reason":"detected GitHub workflow tokens with excessive permissions","details":["Warn: no topLevel permission defined: .github/workflows/ci.yml:1","Info: no jobLevel write permissions found"],"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":"Pinned-Dependencies","score":0,"reason":"dependency not pinned by hash detected -- score normalized to 0","details":["Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/ci.yml:15: update your workflow using https://app.stepsecurity.io/secureworkflow/doofinder/pydoof/ci.yml/master?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/ci.yml:16: update your workflow using https://app.stepsecurity.io/secureworkflow/doofinder/pydoof/ci.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/ci.yml:19: update your workflow using https://app.stepsecurity.io/secureworkflow/doofinder/pydoof/ci.yml/master?enable=pin","Warn: pipCommand not pinned by hash: .github/workflows/ci.yml:25","Warn: pipCommand not pinned by hash: .github/workflows/ci.yml:26","Info:   0 out of   2 GitHub-owned GitHubAction dependencies pinned","Info:   0 out of   1 third-party GitHubAction dependencies pinned","Info:   0 out of   2 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":"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":-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":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 23 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}}]},"last_synced_at":"2025-08-18T08:37:03.465Z","repository_id":10327585,"created_at":"2025-08-18T08:37:03.465Z","updated_at":"2025-08-18T08:37:03.465Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279085575,"owners_count":26100017,"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-15T02:00:07.814Z","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":["doofinder","indexing","python","search","search-engine"],"created_at":"2025-02-27T05:33:08.291Z","updated_at":"2025-10-15T14:38:34.028Z","avatar_url":"https://github.com/doofinder.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# PyDoof\n\n[![Build Status](https://api.travis-ci.org/doofinder/pydoof.svg?branch=master)](https://travis-ci.org/doofinder/pydoof)\n\nPyDoof is a Python client for Doofinder APIs (management and search). It provides easy access to Doofinder endpoint, including parameters-parsing and requests authentication.\n\n## Installation\n\nPyDoof can be installed from PyPI:\n\n```shell\npip install pydoof\n```\n\nOr directly from source code:\n\n```shell\npython setup.py install\n```\n\n## Testing\n\nRequired package:\n\n```shell\npip install parameterized\n```\n\nUsing a package like `pytest` or `tox`:\n\n```shell\npip install pytest\n\npytest\n```\n\nOr, directly with `setup.py`:\n\n```shell\npython setup.py test\n```\n\n## Usage\n\nTo configure PyDoof, you need one of your user API keys, and your management and search URLs. You can find that information in the [API Keys section](https://admin.doofinder.com/admin/account/api) of your Doofinder admin page. Set `pydoof.token`, `pydoof.management_url`, and `pydoof.search_url` with those values:\n\n```python\nimport pydoof\npydoof.token = \"b8bcb...\"\npydoof.management_url = \"https://eu1-api.doofinder.com\"\npydoof.search_url = \"https://eu1-search.doofinder.com\"\n\n# Lists your search engines\nsearch_engines = pydoof.search_engines.list()\n\n# Search a term in one search engine\nresult = pydoof.search.query(\"abe16c8...\", \"some terms\")\n```\n\n### Per-request Configuration\n\nYou can configure individual requests via keywords arguments. For instance, setting a different token:\n\n```python\n# List a search engine indices\npydoof.indices.list(\"abe16c8...\", \"product\", token=\"cc83a..\")\n\n# Search suggestions for some terms\nresult = pydoof.search.suggest(\"cb12b...\", \"query\", search_url = \"https://eu1-search.doofinder.com\")\n```\n\n### Management and Search APIs\n\nPyDoof includes clients for Doofinder management and search APIs. These two clients can work as separated modules. For instance, if you only want to use management API, you do not need to configure the `pydoof.search_url` parameter.\n\n#### Management API\n\nManagement API allows you to handle search engines, indices and items. For instance, you can create an index for a search engine and index an item:\n\n```python\nimport pydoof\npydoof.token = \"b8bcb...\"\npydoof.management_url = \"https://eu1-api.doofinder.com\"\n\n# Create an index\nindex = {\n  \"options\": {\n    \"exclude_out_of_stock_items\": False,\n    \"group_variants\": False\n  },\n  \"name\": \"product\",\n  \"preset\": \"product\"\n}\npydoof.indices.create(hashid=\"abe16c8...\", index=index)\n\n# Index an item\nitem = {\n  \"categories\": [\n    \"cat1\",\n    \"cat2\"\n  ],\n  \"df_manual_boost\": 1,\n  \"id\": \"1234\",\n  \"link\": \"http://www.example.com/img/1234.png\",\n  \"title\": \"Item Title\"\n}\npydoof.items.create(hashid=\"abe16c8...\", name=\"product\", item = item)\n```\n\nFor a complete API reference, see the [Management API docs](https://docs.doofinder.com/api/management/v2/index.html).\n\n#### Search API\n\nSearch API allows you to do queries to your search engines, and record data about your sales. For instance, you can search _\"cars\"_ that are _\"blue\"_ and with a price lower than €20.000.000.\n\n```python\nimport pydoof\npydoof.token = \"b8bcb...\"\npydoof.search_url = \"https://eu1-search.doofinder.com\"\n\n# Search \"cars\" that are \"blue\" and with a price lower than €20.000.000\npydoof.search.query(\n  hashid=\"abe16c8...\",\n  query=\"cars\",\n  filter={\"color\": \"blue\"},\n  exclude={\"price\": {\"gt\": 20000000}}\n)\n```\n\nAnd after that, record your sale:\n\n```python\n# Add product to cart\npydoof.search_stats.add_to_cart(\n  hashid=\"abe16c8...\",\n  index_name=\"product\",\n  session_id=\"4affa6\",\n  item_id=\"Ref001\",\n  amount=1,\n  title=\"Ford Fiesta\",\n  price=8900.99\n)\n\n# And record that sale\npydoof.search_stats.log_checkout(hashid=\"abe16c8...\", session_id=\"4affa6\")\n```\n\nFor a complete API reference, see the [Search API docs](https://docs.doofinder.com/api/search/v6/index.html).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdoofinder%2Fpydoof","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdoofinder%2Fpydoof","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdoofinder%2Fpydoof/lists"}