Metadata-Version: 2.4
Name: pxm2
Version: 1.0.0
Summary: Official Python client and proxy rotator for PXM2 4G/5G mobile proxies.
Author-email: PXM2 Team <support@pxm2.io>
Project-URL: Homepage, https://pxm2.io/
Project-URL: Documentation, https://pxm2.io/guides/
Project-URL: Mobile Proxies, https://pxm2.io/proxy-types/rotating-mobile-proxies/
Project-URL: Bug Tracker, https://pxm2.io/contact/
Classifier: Programming Language :: Python :: 3
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Classifier: Topic :: Internet :: Proxy Servers
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Requires-Python: >=3.8
Description-Content-Type: text/markdown

# PXM2 Python Client & Proxy Rotator

[![PyPI version](https://img.shields.io/pypi/v/pxm2.svg)](https://pypi.org/project/pxm2/)
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)

Official lightweight Python helper for [PXM2](https://pxm2.io/) dedicated 4G and 5G mobile proxies.

Easily integrate rotating mobile proxies into **Requests**, **HTTPX**, **Playwright**, and **Selenium** with instant 1-click IP rotation webhooks.

---

## Installation

```bash
pip install pxm2
```

---

## Quickstart

### 1. Configure Proxy & Rotate IP

```python
from pxm2 import PXM2Proxy
import requests

# Initialize your PXM2 mobile proxy
proxy = PXM2Proxy(
    host="proxy.pxm2.io",
    port=10001,
    username="pxm_user",
    password="pxm_password",
    rotation_url="https://api.pxm2.io/rotate/user_token_here"
)

# 1. Use with requests
resp = requests.get("https://httpbin.org/ip", proxies=proxy.for_requests())
print("Current IP:", resp.json())

# 2. Trigger instant IP rotation on physical 4G/5G modem
result = proxy.rotate_ip()
print("Rotation result:", result)
```

### 2. Integration with Playwright

```python
from playwright.sync_api import sync_playwright
from pxm2 import PXM2Proxy

proxy = PXM2Proxy(
    host="proxy.pxm2.io",
    port=10001,
    username="pxm_user",
    password="pxm_password"
)

with sync_playwright() as p:
    browser = p.chromium.launch(
        proxy=proxy.for_playwright(),
        headless=False
    )
    page = browser.new_page()
    page.goto("https://browserleaks.com/ip")
    browser.close()
```

---

## Why PXM2?

[PXM2](https://pxm2.io/) provides dedicated physical cellular SIM modems with carrier CGNAT IP pools:
- 100% genuine mobile IPs (AT&T, Verizon, Vodafone, Movistar, Orange, EE).
- Instant hardware rotation (under 8 seconds).
- Unmetered bandwidth with zero data caps.
- Learn more at [PXM2 Rotating Mobile Proxies](https://pxm2.io/proxy-types/rotating-mobile-proxies/).

---

## Documentation & Guides

- Official Website: [https://pxm2.io/](https://pxm2.io/)
- Integration Guides: [https://pxm2.io/guides/](https://pxm2.io/guides/)
- API Reference: [https://pxm2.io/docs/](https://pxm2.io/docs/)
