siambhau 1.0.1
Free Fire Info Python Module — from siambhau import bhauxffinfo
Requires Python: >=3.8
Keywords: freefire, ff, siambhau, bhauxffinfo, garena

# siambhau

**Free Fire Info Python Module by SiamBhau**

[![PyPI](https://img.shields.io/pypi/v/siambhau)](https://pypi.org/project/siambhau)
[![Python](https://img.shields.io/pypi/pyversions/siambhau)](https://pypi.org/project/siambhau)
[![Telegram](https://img.shields.io/badge/Telegram-SiamBhau-blue)](https://t.me/SiamBhau)

---

## Installation

```bash
pip install siambhau
```

---

## Quick Start

```python
from siambhau import bhauxffinfo

client = bhauxffinfo.FFClient()

# Get player info
info = client.get_player_info(uid="4147917569", region="IND")
print(info)

# Get player stats
stats = client.get_player_stats(uid="4147917569", region="IND", matchmode="CAREER")
print(stats)

# Search player by name
results = client.search_player(keyword="SiamBhau", region="IND")
print(results)
```

---

## Methods

### `get_player_info(uid, region)`

Returns full player profile information.

| Parameter | Type | Description |
|-----------|------|-------------|
| `uid` | str / int | Player UID |
| `region` | str | Server region (e.g. `IND`, `BD`, `SG`) |

```python
info = client.get_player_info(uid="4147917569", region="IND")

basic = info.get("basicInfo", {})
print(basic.get("nickname"))   # Player name
print(basic.get("level"))      # Player level
print(basic.get("liked"))      # Total likes
print(basic.get("exp"))        # Experience points
print(basic.get("region"))     # Server region
```

---

### `get_player_stats(uid, region, matchmode)`

Returns player battle statistics.

| Parameter | Type | Description |
|-----------|------|-------------|
| `uid` | str / int | Player UID |
| `region` | str | Server region |
| `matchmode` | str | `CAREER`, `NORMAL`, or `RANKED` (default: `CAREER`) |

```python
stats = client.get_player_stats(uid="4147917569", region="IND", matchmode="RANKED")
print(stats)
```

---

### `search_player(keyword, region)`

Search players by name.

| Parameter | Type | Description |
|-----------|------|-------------|
| `keyword` | str | Player name or keyword |
| `region` | str | Server region |

```python
results = client.search_player(keyword="SiamBhau", region="IND")
for player in results.get("accountList", []):
    print(player.get("nickname"), player.get("accountId"))
```

---

### `refresh_tokens(regions=None)`

Manually refresh JWT tokens.

```python
client.refresh_tokens()                      # Refresh all regions
client.refresh_tokens(["IND", "BD", "SG"])  # Refresh specific regions
```

---

### `get_supported_regions()`

Returns all supported server regions.

```python
regions = bhauxffinfo.FFClient.get_supported_regions()
print(regions)
# {'IND', 'BD', 'SG', 'BR', 'US', 'NA', 'SAC', 'RU', 'ID', 'TW', 'VN', 'TH', 'ME', 'PK', 'CIS', 'EUROPE'}
```

---

## Async Usage

```python
import asyncio
from siambhau import bhauxffinfo

client = bhauxffinfo.FFClient()

async def main():
    # Fetch multiple requests at the same time (much faster)
    info, stats, search = await asyncio.gather(
        client.async_get_player_info(uid="4147917569", region="IND"),
        client.async_get_player_stats(uid="4147917569", region="IND", matchmode="RANKED"),
        client.async_search_player(keyword="SiamBhau", region="IND"),
    )
    print(info)
    print(stats)
    print(search)

asyncio.run(main())
```

---

## Supported Regions

| Code | Server |
|------|--------|
| `IND` | India |
| `BD` | Bangladesh |
| `SG` | Singapore |
| `BR` | Brazil |
| `US` | United States |
| `NA` | North America |
| `SAC` | South America |
| `RU` | Russia |
| `ID` | Indonesia |
| `TW` | Taiwan |
| `VN` | Vietnam |
| `TH` | Thailand |
| `ME` | Middle East |
| `PK` | Pakistan |
| `CIS` | CIS |
| `EUROPE` | Europe |

---

## Developer

**SiamBhau**
Telegram: [t.me/SiamBhau](https://t.me/SiamBhau)