{"id":18602822,"url":"https://github.com/obgnail/everything_tool","last_synced_at":"2025-05-06T16:35:02.303Z","repository":{"id":167093865,"uuid":"640565086","full_name":"obgnail/everything_tool","owner":"obgnail","description":"everything sdk for python","archived":false,"fork":false,"pushed_at":"2024-12-31T05:47:49.000Z","size":99,"stargazers_count":6,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-31T01:31:53.764Z","etag":null,"topics":["ctypes","dll","everything","everything-sdk","ipc","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/obgnail.png","metadata":{"files":{"readme":"README.md","changelog":null,"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":"2023-05-14T14:12:17.000Z","updated_at":"2024-12-31T05:47:53.000Z","dependencies_parsed_at":null,"dependency_job_id":"8c374cf4-6194-49e9-99fb-06d7d50c4efb","html_url":"https://github.com/obgnail/everything_tool","commit_stats":null,"previous_names":["obgnail/everything_tool"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/obgnail%2Feverything_tool","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/obgnail%2Feverything_tool/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/obgnail%2Feverything_tool/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/obgnail%2Feverything_tool/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/obgnail","download_url":"https://codeload.github.com/obgnail/everything_tool/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252721333,"owners_count":21793794,"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":["ctypes","dll","everything","everything-sdk","ipc","python"],"created_at":"2024-11-07T02:12:38.390Z","updated_at":"2025-05-06T16:35:02.296Z","avatar_url":"https://github.com/obgnail.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Everything Tool \n\nEnglish | [简体中文](https://github.com/obgnail/everything_tool/blob/master/README.zh-CN.md)\n\n`Everything Tool` is a Python SDK designed to interface with the `Everything` file search software for Windows. \n\n\n\n## Requirements\n\nThis project uses IPC to communicate with `Everything`. You need to download the full version of `Everything` software. The lite version does not support IPC. Click [here](https://www.voidtools.com/en-us/downloads/) to download the full version. Ensure that `Everything` is running in the background.\n\n\n\n## Usage Example\n\nHere is a basic example demonstrating how to use `Everything Tool` to search for files:\n\n```python\nimport everything_tool as et\n\ndef search():\n    try:\n        with et.Client() as client:\n            print(f'Everything version: {client.version()}')\n\n            flags = et.REQUEST_FILE_NAME | et.REQUEST_SIZE\n            sort = et.SORT_SIZE_DESCENDING\n            limit = 2\n            for file in client.search_ext(keywords='py', ext=['exe', 'msi'], flags=flags, sort=sort, limit=limit):\n                print(file)\n    except (AttributeError, et.Error) as e:\n        print('Error:', e)\n\nif __name__ == '__main__':\n    search()\n```\n\n\n\n## Search Syntax\n\n`Everything Tool` supports all `Everything` search syntax. Refer to `Everything`’s help documentation for detailed search syntax. Below are some common features:\n\n- Operators\n- Wildcards\n- Macros\n- Modifiers\n- Functions\n- Function syntax\n- Size syntax\n- Size constants\n- Date syntax\n- Date constants\n- Property constants\n\n\n\n## Search Function and Its Derivatives\n\n`Everything Tool` provides a series of search functions. Here is the definition and description of the `search` function and its derivatives:\n\n```python\ndef search(\n    self,\n    keywords: str,\n    math_path: bool = False,\n    math_case: bool = False,\n    whole_word: bool = False,\n    regex: bool = False,\n    offset: int = 0,\n    limit: int = -1,\n    flags: [int, Iterable[int]] = DEFAULT_FLAGS,\n    sort: int = SORT_NAME_ASCENDING\n) -\u003e Iterable[Dict]:\n    \"\"\"\n    Search files using Everything\n    :param keywords: Search keyword, supports all Everything search syntax\n    :param math_path: Match path\n    :param math_case: Case sensitive\n    :param whole_word: Whole word match\n    :param regex: Use regular expression\n    :param offset: Offset\n    :param limit: Maximum number, \u003c0 means search all\n    :param flags: Query fields\n    :param sort: Sort order\n    :return: Generator of record dictionaries\n    \"\"\"\n    pass\n\ndef search_in_located(self, path, keywords='', **kwargs):\n    \"\"\"Search files in a specific path\"\"\"\n    return self.search(f'{path} {keywords}', **kwargs)\n\ndef search_folder(self, keywords='', **kwargs):\n    \"\"\"Search folders\"\"\"\n    return self.search(f'folder: {keywords}', **kwargs)\n\ndef search_ext(self, ext, keywords='', **kwargs):\n    \"\"\"Search by file extension\"\"\"\n    return self.search(f'ext:{ext} {keywords}', **kwargs)\n\ndef search_audio(self, keywords='', **kwargs):\n    \"\"\"Search audio files\"\"\"\n    return self.search_ext(f'{self.audio_ext} {keywords}', **kwargs)\n\ndef search_compressed(self, keywords='', **kwargs):\n    \"\"\"Search compressed files\"\"\"\n    return self.search_ext(f'{self.compressed_ext} {keywords}', **kwargs)\n\ndef search_doc(self, keywords='', **kwargs):\n    \"\"\"Search documents\"\"\"\n    return self.search_ext(f'{self.doc_ext} {keywords}', **kwargs)\n\ndef search_exe(self, keywords='', **kwargs):\n    \"\"\"Search executable files\"\"\"\n    return self.search_ext(f'{self.exe_ext} {keywords}', **kwargs)\n\ndef search_pic(self, keywords='', **kwargs):\n    \"\"\"Search image files\"\"\"\n    return self.search_ext(f'{self.pic_ext} {keywords}', **kwargs)\n\ndef search_video(self, keywords='', **kwargs):\n    \"\"\"Search video files\"\"\"\n    return self.search_ext(f'{self.video_ext} {keywords}', **kwargs)\n```\n\n\n\n## Supported Query Fields\n\n`Everything Tool` supports all query fields from `Everything`. Here are some common fields:\n\n```python\nREQUEST_FILE_NAME = 0x00000001  # File name\nREQUEST_PATH = 0x00000002  # Path without file name\nREQUEST_FULL_PATH_AND_FILE_NAME = 0x00000004  # Full path with file name\nREQUEST_EXTENSION = 0x00000008  # Extension\nREQUEST_SIZE = 0x00000010  # Size (byte)\nREQUEST_DATE_CREATED = 0x00000020  # Creation date\nREQUEST_DATE_MODIFIED = 0x00000040  # Modified date\nREQUEST_DATE_ACCESSED = 0x00000080  # Accessed date\nREQUEST_ATTRIBUTES = 0x00000100  # Attributes\nREQUEST_FILE_LIST_FILE_NAME = 0x00000200  # File list name\nREQUEST_RUN_COUNT = 0x00000400  # Run count\nREQUEST_DATE_RUN = 0x00000800  # Last run date\nREQUEST_DATE_RECENTLY_CHANGED = 0x00001000  # Recently changed date\nREQUEST_HIGHLIGHTED_FILE_NAME = 0x00002000  # Highlighted file name\nREQUEST_HIGHLIGHTED_PATH = 0x00004000  # Highlighted path without file name\nREQUEST_HIGHLIGHTED_FULL_PATH_AND_FILE_NAME = 0x00008000  # Highlighted full path with file name\n```\n\nDefault query fields:\n\n```python\nDEFAULT_FLAGS = (\n        REQUEST_FULL_PATH_AND_FILE_NAME\n        | REQUEST_SIZE\n        | REQUEST_DATE_MODIFIED\n)\n```\n\n\n\n## Supported File Attributes\n\nHere are the supported file attributes:\n\n```python\n# See more: https://learn.microsoft.com/en-us/windows/win32/fileio/file-attribute-constants\nFILE_ATTRIBUTE_READONLY = 0x00000001\nFILE_ATTRIBUTE_HIDDEN = 0x00000002\nFILE_ATTRIBUTE_SYSTEM = 0x00000004\nFILE_ATTRIBUTE_DIRECTORY = 0x00000010\nFILE_ATTRIBUTE_ARCHIVE = 0x00000020\nFILE_ATTRIBUTE_DEVICE = 0x00000040\nFILE_ATTRIBUTE_NORMAL = 0x00000080\nFILE_ATTRIBUTE_TEMPORARY = 0x00000100\nFILE_ATTRIBUTE_SPARSE_FILE = 0x00000200\nFILE_ATTRIBUTE_REPARSE_POINT = 0x00000400\nFILE_ATTRIBUTE_COMPRESSED = 0x00000800\nFILE_ATTRIBUTE_OFFLINE = 0x00001000\nFILE_ATTRIBUTE_NOT_CONTENT_INDEXED = 0x00002000\nFILE_ATTRIBUTE_ENCRYPTED = 0x00004000\n```\n\n\n\n## Supported Sort Orders\n\nHere are the supported sort orders:\n\n```python\nSORT_NAME_ASCENDING = 1  # Default\nSORT_NAME_DESCENDING = 2\nSORT_PATH_ASCENDING = 3\nSORT_PATH_DESCENDING = 4\nSORT_SIZE_ASCENDING = 5\nSORT_SIZE_DESCENDING = 6\nSORT_EXTENSION_ASCENDING = 7\nSORT_EXTENSION_DESCENDING = 8\nSORT_TYPE_NAME_ASCENDING = 9\nSORT_TYPE_NAME_DESCENDING = 10\nSORT_DATE_CREATED_ASCENDING = 11\nSORT_DATE_CREATED_DESCENDING = 12\nSORT_DATE_MODIFIED_ASCENDING = 13\nSORT_DATE_MODIFIED_DESCENDING = 14\nSORT_ATTRIBUTES_ASCENDING = 15\nSORT_ATTRIBUTES_DESCENDING = 16\nSORT_FILE_LIST_FILENAME_ASCENDING = 17\nSORT_FILE_LIST_FILENAME_DESCENDING = 18\nSORT_RUN_COUNT_ASCENDING = 19\nSORT_RUN_COUNT_DESCENDING = 20\nSORT_DATE_RECENTLY_CHANGED_ASCENDING = 21\nSORT_DATE_RECENTLY_CHANGED_DESCENDING = 22\nSORT_DATE_ACCESSED_ASCENDING = 23\nSORT_DATE_ACCESSED_DESCENDING = 24\nSORT_DATE_RUN_ASCENDING = 25\nSORT_DATE_RUN_DESCENDING = 26\n```\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fobgnail%2Feverything_tool","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fobgnail%2Feverything_tool","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fobgnail%2Feverything_tool/lists"}