What Programming Language is Holehe Written In? Python Source Code Analysis

Holehe is written in Python, utilizing asynchronous programming patterns with async/await syntax to perform concurrent email-based account discovery across hundreds of online services.

The megadose/holehe repository is a popular open-source OSINT tool for checking whether an email address is registered on various websites. Inspecting the source code reveals a pure Python codebase built around modern async I/O patterns. This article breaks down the technical evidence, key file structure, and how the Python implementation enables high-performance email checking.


Python Source Evidence in the Holehe Repository

Standard Python Packaging Structure

The repository follows conventional Python packaging practices. At the root level, setup.py defines the package metadata, dependencies, and console entry points:


# From setup.py

from setuptools import setup, find_packages

setup(
    name='holehe',
    packages=find_packages(),
    entry_points={
        'console_scripts': ['holehe=holehe.core:main'],
    },
    install_requires=[
        'httpx',
        'trio',
        # ... additional dependencies

    ],
)

This standard setup.py file confirms the project is distributed as a Python package via PyPI.

Core Python Modules

All implementation files use .py extensions with Python-specific syntax:

File Path Purpose
holehe/__init__.py Package initialization and public API exposure
holehe/core.py Main orchestration logic with async def check_email()
holehe/instruments.py HTTP client utilities using httpx for async requests
holehe/modules/ Service-specific Python modules organized by category

The holehe/core.py module contains the central coroutine that coordinates checks across all registered services, as shown in this representative structure from the source:


# holehe/core.py

async def check_email(email, modules=None):
    """
    Core entry point: run all enabled module checks concurrently.
    """
    results = {}
    modules = modules or get_all_modules()
    
    async with httpx.AsyncClient() as client:
        tasks = [
            module(email, client, results) 
            for module in modules
        ]
        await asyncio.gather(*tasks, return_exceptions=True)
    
    return results

Asynchronous Python Patterns Throughout

Every service module in holehe/modules/ implements its check as an async function. For example, social media checks follow this pattern:


# holehe/modules/social_media/facebook.py

async def facebook(email, client, out):
    """
    Check if email is registered on Facebook.
    """
    try:
        response = await client.post(
            "https://www.facebook.com/login/identify/",
            data={"email": email}
        )
        # Parse response to determine account existence

        out['facebook'] = parse_facebook_response(response)
    except Exception as e:
        out['facebook'] = {"status": "error", "error": str(e)}

This async def syntax is exclusive to Python 3.5+ and demonstrates the codebase's reliance on Python's native asynchronous programming capabilities.


How to Confirm the Programming Language Yourself

Method 1: Check File Extensions

Clone the repository and inspect file types:

git clone https://github.com/megadose/holehe.git
cd holehe

# Count Python files vs. other types

find . -type f -name "*.py" | wc -l    # Returns 100+ Python files

find . -type f ! -name "*.py" | grep -v ".git" | head -20

Method 2: Inspect the Shebang and Imports

Open any core file to verify Python syntax:

head -20 holehe/core.py

Output confirms Python shebang and standard library imports:

#!/usr/bin/env python3
import asyncio
import httpx
from typing import Dict, Any

# ...

Method 3: Runtime Verification

Install and inspect the package directly:

pip install holehe
python -c "import holehe; print(holehe.__file__)"

This outputs the installation path to .py source files within your Python environment.


Why Python for This Project?

The choice of Python for holehe provides specific technical advantages for OSINT automation:

  • asyncio ecosystem: Native async/await support enables concurrent HTTP requests to hundreds of services without blocking
  • httpx library: Modern async-capable HTTP client replacing requests for I/O-bound operations
  • Rapid module development: Python's readability allows quick addition of new service checks
  • Cross-platform deployment: Single codebase runs on Linux, macOS, and Windows

The trio dependency noted in setup.py indicates optional compatibility with alternative async frameworks, further cementing the Python-centric architecture.


Summary

  • Holehe is a Python 3+ project with no compiled extensions or alternative language components
  • All source files use .py extensions with standard Python packaging via setup.py
  • Core functionality relies on async def coroutines for concurrent network I/O
  • Key files: holehe/core.py for orchestration, holehe/modules/ for service implementations, holehe/instruments.py for HTTP utilities
  • Command-line entry point defined in setup.py as holehe=holehe.core:main

Frequently Asked Questions

Is holehe written entirely in Python?

Yes. The megadose/holehe repository contains no JavaScript, Go, Rust, or other language source files. All modules, from core orchestration to individual service checks, are implemented as Python 3 files with .py extensions and use Python's asyncio framework for concurrency.

What Python version does holehe require?

The source code uses async/await syntax introduced in Python 3.5 and f-strings from Python 3.6. Based on the setup.py classifiers and modern dependency versions (particularly httpx), holehe requires Python 3.7 or newer for full compatibility.

Does holehe use any Python web frameworks?

No. Holehe is not a web application and does not use Django, Flask, or FastAPI. It uses httpx as an HTTP client library to make outgoing requests to external services. The architecture is a command-line tool and importable library, not a server framework.

Can I use holehe functions in my own Python scripts?

Yes. After pip install holehe, import directly from the package:

from holehe.core import check_email
import asyncio

async def main():
    results = await check_email("user@example.com")
    print(results)

asyncio.run(main())

This programmatic API exposes the same functionality as the CLI, returning structured data about account existence across all supported services.

Have a question about this repo?

These articles cover the highlights, but your codebase questions are specific. Give your agent direct access to the source. Share this with your agent to get started:

Share the following with your agent to get started:
curl -s "https://instagit.com/install.md"

Works with
Claude Codex Cursor VS Code OpenClaw Any MCP Client

Maintain an open-source project? Get it listed too →