Metadata-Version: 2.4
Name: pointify
Version: 0.1.0
Summary: Official Python client for the Pointify Travel API.
Project-URL: Homepage, https://pointifytravels.com/developers
Project-URL: Documentation, https://pointifytravels.com/developers
Project-URL: Repository, https://github.com/Pointify-Travel-Technologies/pointify-travel-search-and-booking
Author-email: Pointify Travel Technologies <ops@pointifytravels.com>
License: MIT
Keywords: api,flights,pointify,points,travel
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Requires-Python: >=3.10
Requires-Dist: httpx>=0.27.0
Requires-Dist: pydantic>=2.0
Provides-Extra: dev
Requires-Dist: mypy>=1.10; extra == 'dev'
Requires-Dist: pytest-asyncio>=0.23; extra == 'dev'
Requires-Dist: pytest-httpx>=0.35; extra == 'dev'
Requires-Dist: pytest>=8.0; extra == 'dev'
Requires-Dist: ruff>=0.7; extra == 'dev'
Description-Content-Type: text/markdown

# Pointify Travel — Python Client

Official Python SDK for the Pointify Travel API. Typed, async-friendly, pydantic-validated.

## Install

```bash
pip install pointify
```

Requires Python 3.10+.

## Quickstart

```python
from pointify import PointifyClient

client = PointifyClient(api_key="pt_live_...")

results = client.search_flights(
    origin="LAX",
    destination="NRT",
    departure_date="2026-10-15",
    cabin_class="business",
)

for deal in results.deals:
    first = deal.segments[0]
    print(f"{first.carrier} {first.flight_number}: ${deal.price_cash}")
```

## Async

```python
import asyncio
from pointify import AsyncPointifyClient

async def main():
    async with AsyncPointifyClient(api_key="pt_live_...") as client:
        return await client.optimize_points(
            origin="JFK",
            destination="LHR",
            departure_date="2026-10-15",
            programs=["chase_ur", "amex_mr"],
        )

print(asyncio.run(main()))
```

## Endpoints

| Method | Purpose |
|---|---|
| `search_flights` | Aggregated flight search (Duffel + scraper + awards) |
| `search_calendar` | Lowest fares across a date range |
| `get_prediction` | Buy / wait / neutral signal |
| `get_hidden_city` | Hidden-city ticketing opportunities |
| `get_geo_pricing` | Compare fares across geographic markets |
| `optimize_points` | Best transfer-partner routing |
| `create_api_key` / `list_api_keys` / `revoke_api_key` | Key management |

## Errors

Every non-2xx response raises `pointify.PointifyApiError`:

```python
from pointify import PointifyClient, PointifyApiError

try:
    client.search_flights(origin="XYZ", destination="NRT", departure_date="2026-10-15")
except PointifyApiError as err:
    print(err.status, err.body)
```

## Get an API key

Sign in at [pointifytravels.com/developers](https://pointifytravels.com/developers) and generate a live key. Free tier: 1,000 requests/day.
