Gheymat
A simple Python package for getting live prices of currencies, cryptocurrencies, gold, coins, and precious metals.
If this package is useful for you, you can support me with a coffee ☕😁
https://www.coffeebede.com/mrrobat
Installation
pip install gheymat
Supported Prices
Currencies
| Currency | Symbol |
|---|---|
| US Dollar | USD |
| British Pound | GBP |
| Euro | EUR |
| Turkish Lira | TRY |
| UAE Dirham | AED |
| Chinese Yuan | CNY |
| Indian Rupee | INR |
| Swedish Krona | SEK |
| Omani Rial | OMR |
Cryptocurrencies
| Cryptocurrency | Symbol |
|---|---|
| Bitcoin | BTC |
| Ethereum | ETH |
| Dogecoin | DOGE |
| Solana | SOL |
| Tron | TRON |
| Ripple | RIPP |
| Dash | DASH |
| Litecoin | LITE |
| Stellar | STELL |
| Toncoin | TON |
Gold, Coins, and Metals
| Item | Symbol |
|---|---|
| 18K Gold | GOLD18 |
| 24K Gold | GOLD24 |
| Used Gold | USED_GOLD |
| Emami Coin | SEKE_EMAM |
| Bahar Azadi Coin | SEKE_BAHAR |
| 999 Silver | SILVER |
Usage
Get Currency Prices
You can use the new get_price() function to get the price of any supported currency.
from gheymat.currency import get_price
Get US Dollar Price in Toman
dollar_price = get_price("usd", toman=True)
print(dollar_price)
Get Euro Price in Rial
euro_price = get_price("eur", toman=False)
print(euro_price)
Get Pound Price With Commas
pound_price = get_price("gbp", toman=True, beauty=True)
print(pound_price)
# Example output:
# 1,520,000
The currency name is not case-sensitive:
get_price("usd")
get_price("USD")
get_price("Usd")
All of them work the same.
get_price() Parameters
| Parameter | Default | Description |
|---|---|---|
currency |
"usd" |
Currency symbol. Example: "usd", "eur", "gbp", or "aed". |
toman |
True |
If True, returns the price in Toman. If False, returns the price in Rial. |
beauty |
False |
If True, returns the price as a formatted string with commas. |
Supported currency values:
usd, gbp, eur, try, aed, cny, inr, sek, omr
Old Currency Functions
The old functions are still available and will continue to work.
from gheymat.currency import USD, EUR
dollar_price = USD(toman=True, beauty=False)
euro_price = EUR(toman=False, beauty=True)
print(dollar_price)
print(euro_price)
For new projects, using get_price() is recommended.
Cryptocurrency Prices
You can get cryptocurrency prices with their own functions.
from gheymat.crypto import BTC, ETH, DOGE
bitcoin_price = BTC(toman=True, beauty=True)
ethereum_price = ETH(toman=False)
dogecoin_price = DOGE(toman=True)
print(bitcoin_price)
print(ethereum_price)
print(dogecoin_price)
Cryptocurrency Function Parameters
| Parameter | Default | Description |
|---|---|---|
toman |
True |
If True, returns the price in Toman. If False, returns the price in USD. |
beauty |
False |
If True, returns a formatted string with commas. |
Gold and Metal Prices
from gheymat.metal import GOLD18, GOLD24, SEKE_EMAM, SILVER
gold_18_price = GOLD18(toman=True, beauty=True)
gold_24_price = GOLD24(toman=True)
emami_coin_price = SEKE_EMAM(toman=True, beauty=True)
silver_price = SILVER(toman=False)
print(gold_18_price)
print(gold_24_price)
print(emami_coin_price)
print(silver_price)
Gold and Metal Function Parameters
| Parameter | Default | Description |
|---|---|---|
toman |
True |
If True, returns the price in Toman. If False, returns the price in Rial. |
beauty |
False |
If True, returns a formatted string with commas. |
Notes
- Prices are collected from online sources and may change at any time.
- This package depends on the structure of source websites. If a source website changes its HTML structure, some functions may need an update.
- Use the returned prices for informational purposes only.
- When
beauty=True, the returned value is astr. - When
beauty=False, the returned value is usually anintorfloat.
Support
If you like this package and want to support its development, you can buy me a coffee ☕😁 https://www.coffeebede.com/mrrobat
License
This project is available under the MIT License.
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 gheymat-0.3.9.tar.gz.
File metadata
- Download URL: gheymat-0.3.9.tar.gz
- Upload date:
- Size: 7.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via:
twine/7.0.0 CPython/3.13.11
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
65bc516a3386282ba098ac7c46da14feb162b25982a32f0d33277ca1dcad321c
|
|
| MD5 |
3d49be2b4e6704b2a796712b17ed94d0
|
|
| BLAKE2b-256 |
8734b4eee9927120a0659c603bea4061622a3820da28e568ae94b1a1052c3de8
|
File details
Details for the file gheymat-0.3.9-py3-none-any.whl.
File metadata
- Download URL: gheymat-0.3.9-py3-none-any.whl
- Upload date:
- Size: 6.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via:
twine/7.0.0 CPython/3.13.11
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c785cf6f745accaaae9b3c84fab581f10990bcd7a93457e32a503a4657b1a0da
|
|
| MD5 |
cd3527fa02e80d881bc47f6f3272ad7e
|
|
| BLAKE2b-256 |
956aaf6e58c388863615e26370f509073d299c6bec9431ad8e08ca3eacd1732b
|