Skip to main content

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:

  1. If dll_path is specified, use it directly
  2. Check EVERYTHING_SDK_DIR environment variable, use <SDK_DIR>/dll/Everything3_x64.dll
  3. Search all directories in PATH environment variable for Everything3_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 paths
  • match_case: Whether to match case
  • match_whole_word: Whether to match whole words
  • regex: Whether to use regular expressions
  • properties: List of PropertyID values 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 name
  • parent_path: Parent directory path
  • full_path: Full file/folder path
  • size: Size in bytes (for files; folders may show 0 - use get_folder_size instead)
  • is_folder: Boolean indicating if it's a folder
  • date_modified: FILETIME timestamp
  • date_created: FILETIME timestamp
  • date_accessed: FILETIME timestamp
  • attributes: File attribute bitmask
  • extension: File extension (without dot)

Properties:

  • type_str: "File" or "Folder"
  • modified_time: Python datetime object
  • created_time: Python datetime object
  • accessed_time: Python datetime object
  • attr_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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

everything_sdk-1.0.0.tar.gz (17.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

everything_sdk-1.0.0-py3-none-any.whl (11.5 kB view details)

Uploaded Python 3

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

Hashes for everything_sdk-1.0.0.tar.gz
Algorithm Hash digest
SHA256 7866dd982ff404f252bbd1007136ce37c34d11d54eb3e97ad0420ede9670a402
MD5 8bbb3a2f54e317eeeea78b36ee2e55c2
BLAKE2b-256 84dbd39c1f5453ccb6aa676389423074dd03bf035e7f03e4792bad3b10bf3680

See more details on using hashes here.

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

Hashes for everything_sdk-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 b7f2069c9699066fc687a0de9a0ee5c9fdd24cc1b2635849b21e2e1d6e905f96
MD5 d2e528d0bf05dd3b228a857ab31b6e53
BLAKE2b-256 b71de53ea55222e90821716ead2934210c5a67698633621ec76742ff0beaf011

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page