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) -> StatsFetches 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:
Statsobject containing all website statistics
- Parameters:
-
update_stats(domain: str) -> boolManually triggers a statistics update for a domain if the data is outdated.
- Parameters:
domain- The domain name to update - Returns:
Trueif update was initiated,Falseif statistics are current or update unavailable
- Parameters:
Stats Class
Data class holding website statistics.
Attributes
rank(int): Global rank of the websiteglobal_internet_users(float): Percentage of global internet usersimpressions(int): Number of daily impressionsvisitor_countries(list[str]): List of visitor countriesdaily_revenue(float): Daily revenue estimate in USDestimated_value(float): Estimated value of the website in USDdaily_visitors(int): Number of daily visitorsmonthly_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
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 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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a27904537273ca6fc9f6500f0f2cc50ec4e906bcb92a7af4e9160df65cf07cd2
|
|
| MD5 |
c2c295e9a193280481e1debccf5eeaee
|
|
| BLAKE2b-256 |
7eae9ebd537f7a44d1c5619c776a36887723d0270227dcf12b5532474ecaacde
|
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a076619b28bb70d5422e95c0dd4590bbc5d5c938d9560a1a7b9440fe75470040
|
|
| MD5 |
c8093b983016204602e017f5a1643ad9
|
|
| BLAKE2b-256 |
bc74a0eba13c1dd22b8b40a2c51970dc0fc73092e6270a3cbd5fa8354cba05e5
|