everything-sdk 1.0.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 firesurfing
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -0,0 +1,246 @@
1
+ Metadata-Version: 2.4
2
+ Name: everything-sdk
3
+ Version: 1.0.0
4
+ Summary: Python wrapper for the Windows Everything SDK (v3)
5
+ Home-page:
6
+ Author: kinsurfong
7
+ License: MIT
8
+ Project-URL: Homepage, https://github.com/firesurfing/everything-sdk-python
9
+ Project-URL: Documentation, https://github.com/firesurfing/everything-sdk-python#readme
10
+ Project-URL: Issues, https://github.com/firesurfing/everything-sdk-python/issues
11
+ Classifier: Programming Language :: Python :: 3
12
+ Classifier: License :: OSI Approved :: MIT License
13
+ Classifier: Operating System :: Microsoft :: Windows
14
+ Classifier: Development Status :: 4 - Beta
15
+ Classifier: Intended Audience :: Developers
16
+ Classifier: Topic :: Software Development :: Libraries :: Python Modules
17
+ Requires-Python: >=3.7
18
+ Description-Content-Type: text/markdown
19
+ License-File: LICENSE
20
+ Dynamic: license-file
21
+ Dynamic: requires-python
22
+
23
+ # Everything SDK Python
24
+
25
+ Python wrapper for the Windows Everything SDK (v3). Provides a clean, Pythonic interface to search files and folders using the [Everything](https://www.voidtools.com/) search engine.
26
+
27
+ [中文文档](README_CN.md)
28
+
29
+ ## Requirements
30
+
31
+ - Windows OS
32
+ - Python 3.7+
33
+ - [Everything](https://www.voidtools.com/) application running (v1.5.0.1409a recommended)
34
+ - Everything SDK v3 DLL (`Everything3_x64.dll`)
35
+
36
+ ### Getting the SDK
37
+
38
+ Download SDK v3 from the Everything official forum: [SDK Download](https://www.voidtools.com/forum/viewtopic.php?t=15853&sid=b9bf71c12ae48b33567ab9f8dafdaccc)
39
+
40
+ Recommended version: **Everything SDK v3** (bundled with Everything 1.5.0.1409a)
41
+
42
+ ### Getting Everything 1.5
43
+
44
+ Download Everything 1.5 from the official site: [Everything 1.5 Download](https://www.voidtools.com/everything-1.5/)
45
+
46
+ > Note: This library requires the Everything application to be running.
47
+
48
+ ## Installation
49
+
50
+ ### From source
51
+
52
+ Download or clone the project repository, then:
53
+
54
+ ```bash
55
+ cd everything-sdk-python
56
+ pip install -e .
57
+ ```
58
+
59
+ ### Direct usage
60
+
61
+ Copy the `src/everything` folder to your project and import directly.
62
+
63
+ ## Quick Start
64
+
65
+ ```python
66
+ from everything import EverythingClient, PropertyID, format_size
67
+
68
+ with EverythingClient() as client:
69
+ client.connect("1.5")
70
+ print(f"Everything version: {client.version}")
71
+
72
+ # Search files in a directory
73
+ results, total = client.search('parent:"D:\\\\test"', match_path=True)
74
+ print(f"Found {len(results)} results (total: {total})")
75
+
76
+ for r in results:
77
+ if r.is_folder:
78
+ size = client.get_folder_size(r.full_path)
79
+ else:
80
+ size = r.size
81
+ print(f"{r.name}: {format_size(size)}")
82
+ ```
83
+
84
+ ## API Reference
85
+
86
+ ### EverythingClient
87
+
88
+ #### `__init__(dll_path=None)`
89
+
90
+ Initialize the client. DLL discovery order:
91
+
92
+ 1. If `dll_path` is specified, use it directly
93
+ 2. Check `EVERYTHING_SDK_DIR` environment variable, use `<SDK_DIR>/dll/Everything3_x64.dll`
94
+ 3. Search all directories in `PATH` environment variable for `Everything3_x64.dll`
95
+
96
+ #### `connect(version="1.5a")`
97
+
98
+ Connect to the Everything application. Raises `EverythingError` if connection fails.
99
+
100
+ #### `disconnect()`
101
+
102
+ Disconnect from Everything.
103
+
104
+ #### Context Manager
105
+
106
+ Supports `with` statement for automatic connection management:
107
+
108
+ ```python
109
+ with EverythingClient() as client:
110
+ client.connect("1.5a")
111
+ # ... use client
112
+ # automatically disconnected
113
+ ```
114
+
115
+ #### `version` (property)
116
+
117
+ Returns the Everything version string, e.g., `"1.5"`.
118
+
119
+ #### `full_version` (property)
120
+
121
+ Returns the full version string including major, minor, revision and build number, e.g., `"1.5.0.1234"`.
122
+
123
+ #### `is_db_loaded()`
124
+
125
+ Check if the Everything database has finished loading.
126
+
127
+ #### `get_target_machine()`
128
+
129
+ Get the target machine architecture (x86 or x64).
130
+
131
+ #### `search(search_text, match_path=False, match_case=False, match_whole_word=False, regex=False, properties=None, sort=None, max_results=None, offset=None)`
132
+
133
+ Execute a search.
134
+
135
+ - `search_text`: Everything search query (e.g., `parent:"D:\\test"`, `*.txt`, etc.)
136
+ - `match_path`: Whether to match against full paths
137
+ - `match_case`: Whether to match case
138
+ - `match_whole_word`: Whether to match whole words
139
+ - `regex`: Whether to use regular expressions
140
+ - `properties`: List of `PropertyID` values to retrieve. Defaults to NAME, PATH, SIZE, DATE_CREATED, DATE_MODIFIED, ATTRIBUTES, EXTENSION.
141
+ - `sort`: List of `(PropertyID, ascending)` tuples for server-side sorting.
142
+ - `max_results`: Maximum number of results to return.
143
+ - `offset`: Result offset for pagination.
144
+
145
+ Returns: `(results_list, total_count)` tuple.
146
+
147
+ #### `get_folder_size(folder_path)`
148
+
149
+ Get the actual size of a folder by querying Everything. Returns size in bytes.
150
+
151
+ ### SearchResult
152
+
153
+ Represents a single search result with the following attributes:
154
+
155
+ - `name`: File/folder name
156
+ - `parent_path`: Parent directory path
157
+ - `full_path`: Full file/folder path
158
+ - `size`: Size in bytes (for files; folders may show 0 - use `get_folder_size` instead)
159
+ - `is_folder`: Boolean indicating if it's a folder
160
+ - `date_modified`: FILETIME timestamp
161
+ - `date_created`: FILETIME timestamp
162
+ - `date_accessed`: FILETIME timestamp
163
+ - `attributes`: File attribute bitmask
164
+ - `extension`: File extension (without dot)
165
+
166
+ Properties:
167
+ - `type_str`: `"File"` or `"Folder"`
168
+ - `modified_time`: Python `datetime` object
169
+ - `created_time`: Python `datetime` object
170
+ - `accessed_time`: Python `datetime` object
171
+ - `attr_str`: Human-readable attribute string (e.g., `"DA"`)
172
+
173
+ ### PropertyID
174
+
175
+ Constants for all available property IDs:
176
+
177
+ ```python
178
+ PropertyID.NAME # 0
179
+ PropertyID.PATH # 1
180
+ PropertyID.SIZE # 2
181
+ PropertyID.EXTENSION # 3
182
+ PropertyID.TYPE # 4
183
+ PropertyID.DATE_MODIFIED # 5
184
+ PropertyID.DATE_CREATED # 6
185
+ PropertyID.DATE_ACCESSED # 7
186
+ PropertyID.ATTRIBUTES # 8
187
+ # ... and more
188
+ ```
189
+
190
+ ### format_size(size_bytes)
191
+
192
+ Format bytes into human-readable string:
193
+
194
+ ```python
195
+ format_size(1024) # "1.00 KB"
196
+ format_size(1048576) # "1.00 MB"
197
+ format_size(1073741824) # "1.00 GB"
198
+ ```
199
+
200
+ ### EverythingError
201
+
202
+ Exception raised on SDK errors. Includes `error_code` attribute.
203
+
204
+ ## Advanced Usage
205
+
206
+ ### Custom Properties
207
+
208
+ ```python
209
+ results, total = client.search(
210
+ search_text='*.txt',
211
+ properties=[
212
+ PropertyID.NAME,
213
+ PropertyID.PATH,
214
+ PropertyID.SIZE,
215
+ PropertyID.DATE_MODIFIED,
216
+ ]
217
+ )
218
+ ```
219
+
220
+ ### Sorting
221
+
222
+ ```python
223
+ # Sort by size ascending, then by name descending
224
+ sort = [
225
+ (PropertyID.SIZE, True),
226
+ (PropertyID.NAME, False),
227
+ ]
228
+ results, total = client.search(
229
+ search_text='parent:"D:\\\\test"',
230
+ match_path=True,
231
+ sort=sort,
232
+ )
233
+ ```
234
+
235
+ ### Limit Results
236
+
237
+ ```python
238
+ results, total = client.search(
239
+ search_text='*.pdf',
240
+ max_results=10,
241
+ )
242
+ ```
243
+
244
+ ## License
245
+
246
+ MIT
@@ -0,0 +1,224 @@
1
+ # Everything SDK Python
2
+
3
+ Python wrapper for the Windows Everything SDK (v3). Provides a clean, Pythonic interface to search files and folders using the [Everything](https://www.voidtools.com/) search engine.
4
+
5
+ [中文文档](README_CN.md)
6
+
7
+ ## Requirements
8
+
9
+ - Windows OS
10
+ - Python 3.7+
11
+ - [Everything](https://www.voidtools.com/) application running (v1.5.0.1409a recommended)
12
+ - Everything SDK v3 DLL (`Everything3_x64.dll`)
13
+
14
+ ### Getting the SDK
15
+
16
+ Download SDK v3 from the Everything official forum: [SDK Download](https://www.voidtools.com/forum/viewtopic.php?t=15853&sid=b9bf71c12ae48b33567ab9f8dafdaccc)
17
+
18
+ Recommended version: **Everything SDK v3** (bundled with Everything 1.5.0.1409a)
19
+
20
+ ### Getting Everything 1.5
21
+
22
+ Download Everything 1.5 from the official site: [Everything 1.5 Download](https://www.voidtools.com/everything-1.5/)
23
+
24
+ > Note: This library requires the Everything application to be running.
25
+
26
+ ## Installation
27
+
28
+ ### From source
29
+
30
+ Download or clone the project repository, then:
31
+
32
+ ```bash
33
+ cd everything-sdk-python
34
+ pip install -e .
35
+ ```
36
+
37
+ ### Direct usage
38
+
39
+ Copy the `src/everything` folder to your project and import directly.
40
+
41
+ ## Quick Start
42
+
43
+ ```python
44
+ from everything import EverythingClient, PropertyID, format_size
45
+
46
+ with EverythingClient() as client:
47
+ client.connect("1.5")
48
+ print(f"Everything version: {client.version}")
49
+
50
+ # Search files in a directory
51
+ results, total = client.search('parent:"D:\\\\test"', match_path=True)
52
+ print(f"Found {len(results)} results (total: {total})")
53
+
54
+ for r in results:
55
+ if r.is_folder:
56
+ size = client.get_folder_size(r.full_path)
57
+ else:
58
+ size = r.size
59
+ print(f"{r.name}: {format_size(size)}")
60
+ ```
61
+
62
+ ## API Reference
63
+
64
+ ### EverythingClient
65
+
66
+ #### `__init__(dll_path=None)`
67
+
68
+ Initialize the client. DLL discovery order:
69
+
70
+ 1. If `dll_path` is specified, use it directly
71
+ 2. Check `EVERYTHING_SDK_DIR` environment variable, use `<SDK_DIR>/dll/Everything3_x64.dll`
72
+ 3. Search all directories in `PATH` environment variable for `Everything3_x64.dll`
73
+
74
+ #### `connect(version="1.5a")`
75
+
76
+ Connect to the Everything application. Raises `EverythingError` if connection fails.
77
+
78
+ #### `disconnect()`
79
+
80
+ Disconnect from Everything.
81
+
82
+ #### Context Manager
83
+
84
+ Supports `with` statement for automatic connection management:
85
+
86
+ ```python
87
+ with EverythingClient() as client:
88
+ client.connect("1.5a")
89
+ # ... use client
90
+ # automatically disconnected
91
+ ```
92
+
93
+ #### `version` (property)
94
+
95
+ Returns the Everything version string, e.g., `"1.5"`.
96
+
97
+ #### `full_version` (property)
98
+
99
+ Returns the full version string including major, minor, revision and build number, e.g., `"1.5.0.1234"`.
100
+
101
+ #### `is_db_loaded()`
102
+
103
+ Check if the Everything database has finished loading.
104
+
105
+ #### `get_target_machine()`
106
+
107
+ Get the target machine architecture (x86 or x64).
108
+
109
+ #### `search(search_text, match_path=False, match_case=False, match_whole_word=False, regex=False, properties=None, sort=None, max_results=None, offset=None)`
110
+
111
+ Execute a search.
112
+
113
+ - `search_text`: Everything search query (e.g., `parent:"D:\\test"`, `*.txt`, etc.)
114
+ - `match_path`: Whether to match against full paths
115
+ - `match_case`: Whether to match case
116
+ - `match_whole_word`: Whether to match whole words
117
+ - `regex`: Whether to use regular expressions
118
+ - `properties`: List of `PropertyID` values to retrieve. Defaults to NAME, PATH, SIZE, DATE_CREATED, DATE_MODIFIED, ATTRIBUTES, EXTENSION.
119
+ - `sort`: List of `(PropertyID, ascending)` tuples for server-side sorting.
120
+ - `max_results`: Maximum number of results to return.
121
+ - `offset`: Result offset for pagination.
122
+
123
+ Returns: `(results_list, total_count)` tuple.
124
+
125
+ #### `get_folder_size(folder_path)`
126
+
127
+ Get the actual size of a folder by querying Everything. Returns size in bytes.
128
+
129
+ ### SearchResult
130
+
131
+ Represents a single search result with the following attributes:
132
+
133
+ - `name`: File/folder name
134
+ - `parent_path`: Parent directory path
135
+ - `full_path`: Full file/folder path
136
+ - `size`: Size in bytes (for files; folders may show 0 - use `get_folder_size` instead)
137
+ - `is_folder`: Boolean indicating if it's a folder
138
+ - `date_modified`: FILETIME timestamp
139
+ - `date_created`: FILETIME timestamp
140
+ - `date_accessed`: FILETIME timestamp
141
+ - `attributes`: File attribute bitmask
142
+ - `extension`: File extension (without dot)
143
+
144
+ Properties:
145
+ - `type_str`: `"File"` or `"Folder"`
146
+ - `modified_time`: Python `datetime` object
147
+ - `created_time`: Python `datetime` object
148
+ - `accessed_time`: Python `datetime` object
149
+ - `attr_str`: Human-readable attribute string (e.g., `"DA"`)
150
+
151
+ ### PropertyID
152
+
153
+ Constants for all available property IDs:
154
+
155
+ ```python
156
+ PropertyID.NAME # 0
157
+ PropertyID.PATH # 1
158
+ PropertyID.SIZE # 2
159
+ PropertyID.EXTENSION # 3
160
+ PropertyID.TYPE # 4
161
+ PropertyID.DATE_MODIFIED # 5
162
+ PropertyID.DATE_CREATED # 6
163
+ PropertyID.DATE_ACCESSED # 7
164
+ PropertyID.ATTRIBUTES # 8
165
+ # ... and more
166
+ ```
167
+
168
+ ### format_size(size_bytes)
169
+
170
+ Format bytes into human-readable string:
171
+
172
+ ```python
173
+ format_size(1024) # "1.00 KB"
174
+ format_size(1048576) # "1.00 MB"
175
+ format_size(1073741824) # "1.00 GB"
176
+ ```
177
+
178
+ ### EverythingError
179
+
180
+ Exception raised on SDK errors. Includes `error_code` attribute.
181
+
182
+ ## Advanced Usage
183
+
184
+ ### Custom Properties
185
+
186
+ ```python
187
+ results, total = client.search(
188
+ search_text='*.txt',
189
+ properties=[
190
+ PropertyID.NAME,
191
+ PropertyID.PATH,
192
+ PropertyID.SIZE,
193
+ PropertyID.DATE_MODIFIED,
194
+ ]
195
+ )
196
+ ```
197
+
198
+ ### Sorting
199
+
200
+ ```python
201
+ # Sort by size ascending, then by name descending
202
+ sort = [
203
+ (PropertyID.SIZE, True),
204
+ (PropertyID.NAME, False),
205
+ ]
206
+ results, total = client.search(
207
+ search_text='parent:"D:\\\\test"',
208
+ match_path=True,
209
+ sort=sort,
210
+ )
211
+ ```
212
+
213
+ ### Limit Results
214
+
215
+ ```python
216
+ results, total = client.search(
217
+ search_text='*.pdf',
218
+ max_results=10,
219
+ )
220
+ ```
221
+
222
+ ## License
223
+
224
+ MIT
@@ -0,0 +1,30 @@
1
+ [build-system]
2
+ requires = ["setuptools>=61.0", "wheel"]
3
+ build-backend = "setuptools.build_meta"
4
+
5
+ [project]
6
+ name = "everything-sdk"
7
+ version = "1.0.0"
8
+ description = "Python wrapper for the Windows Everything SDK (v3)"
9
+ readme = "README.md"
10
+ license = {text = "MIT"}
11
+ authors = [
12
+ {name = "kinsurfong"}
13
+ ]
14
+ requires-python = ">=3.7"
15
+ classifiers = [
16
+ "Programming Language :: Python :: 3",
17
+ "License :: OSI Approved :: MIT License",
18
+ "Operating System :: Microsoft :: Windows",
19
+ "Development Status :: 4 - Beta",
20
+ "Intended Audience :: Developers",
21
+ "Topic :: Software Development :: Libraries :: Python Modules",
22
+ ]
23
+
24
+ [project.urls]
25
+ Homepage = "https://github.com/firesurfing/everything-sdk-python"
26
+ Documentation = "https://github.com/firesurfing/everything-sdk-python#readme"
27
+ Issues = "https://github.com/firesurfing/everything-sdk-python/issues"
28
+
29
+ [tool.setuptools.packages.find]
30
+ where = ["src"]
@@ -0,0 +1,4 @@
1
+ [egg_info]
2
+ tag_build =
3
+ tag_date = 0
4
+
@@ -0,0 +1,22 @@
1
+ from setuptools import setup, find_packages
2
+
3
+ with open("README.md", "r", encoding="utf-8") as f:
4
+ long_description = f.read()
5
+
6
+ setup(
7
+ name="everything-sdk",
8
+ version="1.0.0",
9
+ author="kinsurfong",
10
+ description="Python wrapper for the Windows Everything SDK (v3)",
11
+ long_description=long_description,
12
+ long_description_content_type="text/markdown",
13
+ url="",
14
+ package_dir={"": "src"},
15
+ packages=find_packages(where="src"),
16
+ python_requires=">=3.7",
17
+ classifiers=[
18
+ "Programming Language :: Python :: 3",
19
+ "License :: OSI Approved :: MIT License",
20
+ "Operating System :: Microsoft :: Windows",
21
+ ],
22
+ )
@@ -0,0 +1,29 @@
1
+ """
2
+ everything — Python wrapper for the Everything SDK v3.
3
+
4
+ Provides :class:`EverythingClient`, :class:`SearchResult`,
5
+ :class:`PropertyID`, :class:`FileAttribute`, :class:`EverythingError`,
6
+ and the :func:`format_size` utility.
7
+
8
+ Quick start::
9
+
10
+ from everything import EverythingClient, format_size
11
+
12
+ with EverythingClient() as client:
13
+ client.connect()
14
+ results, total = client.search("*.txt")
15
+ for r in results:
16
+ print(f"{r.full_path}: {format_size(r.size)}")
17
+ """
18
+
19
+ from .client import EverythingClient, EverythingError, PropertyID, FileAttribute, SearchResult, format_size
20
+
21
+ __version__ = "1.0.0"
22
+ __all__ = [
23
+ "EverythingClient",
24
+ "EverythingError",
25
+ "PropertyID",
26
+ "FileAttribute",
27
+ "SearchResult",
28
+ "format_size",
29
+ ]