Skip to main content

A Python package to fetch website statistics from Hypestat.com

Project description

hypestat

A Python package to fetch website statistics from Hypestat.com.

Overview

hypestat provides a simple interface to scrape and retrieve comprehensive website statistics from Hypestat.com, including traffic data, rankings, revenue estimates, and visitor information.

Installation

pip install hypestat

Features

  • Fetch website statistics including:
    • Global rank
    • Percentage of global internet users
    • Daily impressions
    • Visitor countries
    • Daily revenue estimates
    • Estimated website value
    • Daily visitors
    • Monthly visits
  • Automatic update of outdated statistics
  • Session-based requests for efficient data fetching

Usage

Basic Example

from hypestat import HypeStat

# Create an instance
hs = HypeStat()

# Get statistics for a domain
stats = hs.get_stats("example.com")

# Access the statistics
print(f"Global Rank: #{stats.rank}")
print(f"Daily Visitors: {stats.daily_visitors}")
print(f"Monthly Visits: {stats.monthly_visits}")
print(f"Daily Revenue: ${stats.daily_revenue}")
print(f"Estimated Value: ${stats.estimated_value}")
print(f"Global Internet Users: {stats.global_internet_users}%")
print(f"Daily Impressions: {stats.impressions}")
print(f"Visitor Countries: {', '.join(stats.visitor_countries)}")

API Reference

HypeStat Class

Main class for interacting with Hypestat.com.

Methods

  • get_stats(domain: str) -> Stats

    Fetches and returns comprehensive statistics for the specified domain. Automatically attempts to update statistics if they're outdated.

    • Parameters: domain - The domain name to fetch statistics for (e.g., "example.com")
    • Returns: Stats object containing all website statistics
  • update_stats(domain: str) -> bool

    Manually triggers a statistics update for a domain if the data is outdated.

    • Parameters: domain - The domain name to update
    • Returns: True if update was initiated, False if statistics are current or update unavailable

Stats Class

Data class holding website statistics.

Attributes

  • rank (int): Global rank of the website
  • global_internet_users (float): Percentage of global internet users
  • impressions (int): Number of daily impressions
  • visitor_countries (list[str]): List of visitor countries
  • daily_revenue (float): Daily revenue estimate in USD
  • estimated_value (float): Estimated value of the website in USD
  • daily_visitors (int): Number of daily visitors
  • monthly_visits (int): Number of monthly visits

License

This project is licensed under the GPLv3 License - see the LICENSE file for details.

Disclaimer

This package scrapes data from Hypestat.com. Please be respectful of their terms of service and use this tool responsibly. The accuracy of the data depends on Hypestat.com's own data collection and estimation methods.

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

hypestat-0.0.1.tar.gz (16.6 kB view details)

Uploaded Source

Built Distribution

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

hypestat-0.0.1-py3-none-any.whl (16.7 kB view details)

Uploaded Python 3

File details

Details for the file hypestat-0.0.1.tar.gz.

File metadata

  • Download URL: hypestat-0.0.1.tar.gz
  • Upload date:
  • Size: 16.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.2

File hashes

Hashes for hypestat-0.0.1.tar.gz
Algorithm Hash digest
SHA256 a27904537273ca6fc9f6500f0f2cc50ec4e906bcb92a7af4e9160df65cf07cd2
MD5 c2c295e9a193280481e1debccf5eeaee
BLAKE2b-256 7eae9ebd537f7a44d1c5619c776a36887723d0270227dcf12b5532474ecaacde

See more details on using hashes here.

File details

Details for the file hypestat-0.0.1-py3-none-any.whl.

File metadata

  • Download URL: hypestat-0.0.1-py3-none-any.whl
  • Upload date:
  • Size: 16.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.2

File hashes

Hashes for hypestat-0.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 a076619b28bb70d5422e95c0dd4590bbc5d5c938d9560a1a7b9440fe75470040
MD5 c8093b983016204602e017f5a1643ad9
BLAKE2b-256 bc74a0eba13c1dd22b8b40a2c51970dc0fc73092e6270a3cbd5fa8354cba05e5

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