Gheymat
raw JSON → 0.3.8 verified Sat May 09 auth: no python
Gheymat is a Python library for fetching currency, gold, and coin prices from Iranian markets. Version 0.3.8 requires Python >=3.7 and is actively maintained on GitHub.
pip install gheymat Common errors
error ModuleNotFoundError: No module named 'gheymat' ↓
cause Library not installed or installed in wrong environment.
fix
Run: pip install gheymat
error AttributeError: module 'gheymat' has no attribute 'get_price' ↓
cause Using an older version (<0.3.0) or wrong import.
fix
Update gheymat: pip install --upgrade gheymat, then import correctly: from gheymat import get_price
error ConnectionError: Failed to fetch data ↓
cause Network issue or source website changed.
fix
Check internet connection and retry. If persistent, report at https://github.com/imrrobat/gheymat/issues
Warnings
breaking In version 0.3.0, the API changed from class-based to function-based. get_price replaced Gheymat().get_price(). ↓
fix Upgrade to >=0.3.0 and use from gheymat import get_price.
gotcha The library may fail or return stale data if the source website changes its structure. Always handle exceptions. ↓
fix Wrap calls in try/except and consider caching results.
deprecated The 'currency' parameter in older versions is replaced by 'symbol' in 0.3.0+. Check your calls. ↓
fix Use symbol='USD' instead of currency='USD'.
Imports
- get_price wrong
import gheymatcorrectfrom gheymat import get_price
Quickstart
from gheymat import get_price
price = get_price('USD')
print(price) # e.g., 420000