{"id":16959489,"url":"https://github.com/crdoconnor/pathquery","last_synced_at":"2025-04-11T22:10:26.219Z","repository":{"id":57451097,"uuid":"48765939","full_name":"crdoconnor/pathquery","owner":"crdoconnor","description":"Declarative path selector for python.","archived":false,"fork":false,"pushed_at":"2021-11-02T17:47:54.000Z","size":50,"stargazers_count":4,"open_issues_count":0,"forks_count":5,"subscribers_count":5,"default_branch":"master","last_synced_at":"2025-04-04T14:04:54.122Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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/crdoconnor.png","metadata":{"files":{"readme":"README.rst","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2015-12-29T20:31:06.000Z","updated_at":"2023-08-04T11:52:10.000Z","dependencies_parsed_at":"2022-09-26T17:31:26.088Z","dependency_job_id":null,"html_url":"https://github.com/crdoconnor/pathquery","commit_stats":null,"previous_names":[],"tags_count":8,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/crdoconnor%2Fpathquery","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/crdoconnor%2Fpathquery/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/crdoconnor%2Fpathquery/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/crdoconnor%2Fpathquery/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/crdoconnor","download_url":"https://codeload.github.com/crdoconnor/pathquery/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248111938,"owners_count":21049576,"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":[],"created_at":"2024-10-13T22:45:06.957Z","updated_at":"2025-04-11T22:10:26.188Z","avatar_url":"https://github.com/crdoconnor.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"PathQuery\n=========\n\nPathQuery is a tool to declaratively define file searches that returns a list\nof `path.py \u003chttps://github.com/jaraco/path.py\u003e`_ Path objects.\n\nExample\n-------\n\nSearch for all files recursively except in the node_modules folder and change its perms:\n\n.. code-block:: python\n\n    from pathquery import pathquery\n\n    for path in pathquery(\"yourdir\").ext(\"js\") - pathquery(\"yourdir/node_modules\"):\n        path.chmod(0755)\n\nInstall\n-------\n\nTo use::\n\n  $ pip install pathquery\n\nAPI\n---\n\nPath properties can be inspected as part of the query:\n\n.. code-block:: python\n\n    pathquery(\"yourdir\").is_dir()\n    pathquery(\"yourdir\").is_not_dir()\n    pathquery(\"yourdir\").is_symlink()\n    pathquery(\"yourdir\").is_not_symlink()\n\nQueries are also chainable:\n\n.. code-block:: python\n\n    for path in pathquery(\"yourdir\").ext(\"pyc\").is_symlink() - pathq(\"yourdir/node_modules\"):\n        path.remove()\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcrdoconnor%2Fpathquery","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcrdoconnor%2Fpathquery","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcrdoconnor%2Fpathquery/lists"}