Metadata-Version: 2.4
Name: xgift
Version: 0.2.1
Summary: Python библиотека для работы с xGift API
Author-email: aiofake <g3657775@gmail.com>
License: MIT License
        
        Copyright (c) 2026 aiofake
        
        Permission is hereby granted, free of charge, to any person obtaining a copy
        of this software and associated documentation files (the "Software"), to deal
        in the Software without restriction, including without limitation the rights
        to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
        copies of the Software, and to permit persons to whom the Software is
        furnished to do so, subject to the following conditions:
        
        The above copyright notice and this permission notice shall be included in all
        copies or substantial portions of the Software.
        
        THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
        IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
        FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
        AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
        LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
        OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
        SOFTWARE.
        
Project-URL: Homepage, https://github.com/aiofake/xgift
Project-URL: Bug Tracker, https://github.com/aiofake/xgift/issues
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Operating System :: OS Independent
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: httpx
Dynamic: license-file

# xgift - Python библиотека для работы с xGift API

Простая и удобная библиотека для получения информации о NFT-гифтах на платформе xGift.

PyPI: https://pypi.org/project/xgift/

GitHub: https://github.com/aiofake/xgift
## Установка

```bash
pip install xgift
```

## Быстрое начало

### Простой пример

```python
import asyncio
from xgift import Gift

async def main():
    client = Gift()
    
    # Получаем цену гифта
    price = await client.floorPrice("PlushPepe")
    print(f"floor PlushPepe: {price} TON")
    
    await client.close()

asyncio.run(main())
```

### Класс Gift - основной клиент

```python
# Создание клиента
client = Gift()

# Получение floor price
price = await client.floorPrice("PlushPepe")  # Один гифт
prices = await client.floorPrice(["PlushPepe", "AstralShard"])  # Несколько гифтов

# Оценочная цена
estimated_ton = await client.estimatedPrice("PlushPepe-1", asset="Ton")
estimated_usd = await client.estimatedPrice("PlushPepe-1", asset="Usd")

# Получение floor элементов коллекции
models = await client.models_floor("PlushPepe")  # модели
backdrops = await client.backdrops_floor("PlushPepe")  # фоны
symbols = await client.symbols_floor("PlushPepe")  # символы

# floor + график
graph_data = await client.getFloorGraph("PlushPepe-1")

# Проверка на монохром
is_monochrome = await client.isMonochrome("PlushPepe-1")

# Закрытие соединения
await client.close()
```

### Класс GiftRaw - низкоуровневый доступ

```python
from xgift import GiftRaw

raw = GiftRaw()

# Прямые запросы к API
gift_info = await raw.GiftInfo("PlushPepe-1")
collection_info = await raw.CollectionInfo("PlushPepe")
gifts_in_collection = await raw.CollectionGifts("PlushPepe")

await raw.close()
```

### Утилиты

```python
from xgift import tonRate, nfts, lottie

# Курс TON
ton_rate = await tonRate()

# Список NFT
nft_names = await nfts("names")  # names-to-ids
nft_ids = await nfts("ids") # ids-to-names

# Lottie-анимация гифта
animation = await lottie("plushpepe-1")
```
