Python wrapper for the Windows Everything SDK (v3)
Project description
Everything SDK Python
Python wrapper for the Windows Everything SDK (v3). Provides a clean, Pythonic interface to search files and folders using the Everything search engine.
Requirements
- Windows OS
- Python 3.7+
- Everything application running (v1.5.0.1409a recommended)
- Everything SDK v3 DLL (
Everything3_x64.dll)
Getting the SDK
Download SDK v3 from the Everything official forum: SDK Download
Recommended version: Everything SDK v3 (bundled with Everything 1.5.0.1409a)
Getting Everything 1.5
Download Everything 1.5 from the official site: Everything 1.5 Download
Note: This library requires the Everything application to be running.
Installation
From source
Download or clone the project repository, then:
cd everything-sdk-python
pip install -e .
Direct usage
Copy the src/everything folder to your project and import directly.
Quick Start
from everything import EverythingClient, PropertyID, format_size
with EverythingClient() as client:
client.connect("1.5")
print(f"Everything version: {client.version}")
# Search files in a directory
results, total = client.search('parent:"D:\\\\test"', match_path=True)
print(f"Found {len(results)} results (total: {total})")
for r in results:
if r.is_folder:
size = client.get_folder_size(r.full_path)
else:
size = r.size
print(f"{r.name}: {format_size(size)}")
API Reference
EverythingClient
__init__(dll_path=None)
Initialize the client. DLL discovery order:
- If
dll_pathis specified, use it directly - Check
EVERYTHING_SDK_DIRenvironment variable, use<SDK_DIR>/dll/Everything3_x64.dll - Search all directories in
PATHenvironment variable forEverything3_x64.dll
connect(version="1.5a")
Connect to the Everything application. Raises EverythingError if connection fails.
disconnect()
Disconnect from Everything.
Context Manager
Supports with statement for automatic connection management:
with EverythingClient() as client:
client.connect("1.5a")
# ... use client
# automatically disconnected
version (property)
Returns the Everything version string, e.g., "1.5".
full_version (property)
Returns the full version string including major, minor, revision and build number, e.g., "1.5.0.1234".
is_db_loaded()
Check if the Everything database has finished loading.
get_target_machine()
Get the target machine architecture (x86 or x64).
search(search_text, match_path=False, match_case=False, match_whole_word=False, regex=False, properties=None, sort=None, max_results=None, offset=None)
Execute a search.
search_text: Everything search query (e.g.,parent:"D:\\test",*.txt, etc.)match_path: Whether to match against full pathsmatch_case: Whether to match casematch_whole_word: Whether to match whole wordsregex: Whether to use regular expressionsproperties: List ofPropertyIDvalues to retrieve. Defaults to NAME, PATH, SIZE, DATE_CREATED, DATE_MODIFIED, ATTRIBUTES, EXTENSION.sort: List of(PropertyID, ascending)tuples for server-side sorting.max_results: Maximum number of results to return.offset: Result offset for pagination.
Returns: (results_list, total_count) tuple.
get_folder_size(folder_path)
Get the actual size of a folder by querying Everything. Returns size in bytes.
SearchResult
Represents a single search result with the following attributes:
name: File/folder nameparent_path: Parent directory pathfull_path: Full file/folder pathsize: Size in bytes (for files; folders may show 0 - useget_folder_sizeinstead)is_folder: Boolean indicating if it's a folderdate_modified: FILETIME timestampdate_created: FILETIME timestampdate_accessed: FILETIME timestampattributes: File attribute bitmaskextension: File extension (without dot)
Properties:
type_str:"File"or"Folder"modified_time: Pythondatetimeobjectcreated_time: Pythondatetimeobjectaccessed_time: Pythondatetimeobjectattr_str: Human-readable attribute string (e.g.,"DA")
PropertyID
Constants for all available property IDs:
PropertyID.NAME # 0
PropertyID.PATH # 1
PropertyID.SIZE # 2
PropertyID.EXTENSION # 3
PropertyID.TYPE # 4
PropertyID.DATE_MODIFIED # 5
PropertyID.DATE_CREATED # 6
PropertyID.DATE_ACCESSED # 7
PropertyID.ATTRIBUTES # 8
# ... and more
format_size(size_bytes)
Format bytes into human-readable string:
format_size(1024) # "1.00 KB"
format_size(1048576) # "1.00 MB"
format_size(1073741824) # "1.00 GB"
EverythingError
Exception raised on SDK errors. Includes error_code attribute.
Advanced Usage
Custom Properties
results, total = client.search(
search_text='*.txt',
properties=[
PropertyID.NAME,
PropertyID.PATH,
PropertyID.SIZE,
PropertyID.DATE_MODIFIED,
]
)
Sorting
# Sort by size ascending, then by name descending
sort = [
(PropertyID.SIZE, True),
(PropertyID.NAME, False),
]
results, total = client.search(
search_text='parent:"D:\\\\test"',
match_path=True,
sort=sort,
)
Limit Results
results, total = client.search(
search_text='*.pdf',
max_results=10,
)
License
MIT
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file everything_sdk-1.0.0.tar.gz.
File metadata
- Download URL: everything_sdk-1.0.0.tar.gz
- Upload date:
- Size: 17.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7866dd982ff404f252bbd1007136ce37c34d11d54eb3e97ad0420ede9670a402
|
|
| MD5 |
8bbb3a2f54e317eeeea78b36ee2e55c2
|
|
| BLAKE2b-256 |
84dbd39c1f5453ccb6aa676389423074dd03bf035e7f03e4792bad3b10bf3680
|
File details
Details for the file everything_sdk-1.0.0-py3-none-any.whl.
File metadata
- Download URL: everything_sdk-1.0.0-py3-none-any.whl
- Upload date:
- Size: 11.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b7f2069c9699066fc687a0de9a0ee5c9fdd24cc1b2635849b21e2e1d6e905f96
|
|
| MD5 |
d2e528d0bf05dd3b228a857ab31b6e53
|
|
| BLAKE2b-256 |
b71de53ea55222e90821716ead2934210c5a67698633621ec76742ff0beaf011
|