Metadata-Version: 2.4
Name: uphunt
Version: 0.1.0
Summary: Official UpHunt SDK — auto-apply to Upwork jobs, fetch archived job & client data, and generate AI proposals.
Project-URL: Homepage, https://uphunt.io
Project-URL: Documentation, https://uphunt.io/docs
Project-URL: Source, https://github.com/ffucucuoglu/uphunt-v2/tree/main/packages/uphunt-python
Project-URL: Issues, https://uphunt.io/docs
Author: UpHunt
License: MIT
License-File: LICENSE
Keywords: api-client,auto-apply,freelance,proposals,sdk,uphunt,upwork,upwork-api
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
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: Typing :: Typed
Requires-Python: >=3.9
Requires-Dist: httpx>=0.24
Description-Content-Type: text/markdown

# uphunt

Official **UpHunt** SDK for Python — auto-apply to Upwork jobs, fetch archived job & client data, and generate AI proposals, all from your own stack.

- 📚 Full API docs: **https://uphunt.io/docs**
- 🔑 Get an API key: **Dashboard → Auto-Apply → API & Webhooks**

## Install

```bash
pip install uphunt
```

Requires Python 3.9+.

## Quickstart

```python
from uphunt import UpHunt

client = UpHunt(api_key="...")  # or set UPHUNT_API_KEY in the environment

# Apply to a job
result = client.apply(
    job_id="~022053140178050136031",
    cover_letter="Hi — I'd love to help with this project…",
    proposal={"hourlyRate": 65, "timeline": "1 to 3 months"},
)
print(result["queueId"])

# Poll status
status = client.status(queue_id=result["queueId"])
print(status["applicationStatus"])  # 'processing' | 'applied' | …
```

Use it as a context manager to close the connection pool automatically:

```python
with UpHunt() as client:
    jobs = client.applied_jobs(limit=10, status="applied")
```

## Methods

| Method | REST endpoint |
|---|---|
| `apply(...)` | `POST /api/auto-apply-v2/apply` |
| `status(queue_id=, job_id=)` | `GET /api/auto-apply-v2/status` |
| `applied_jobs(limit=, offset=, status=)` | `GET /api/auto-apply-v2/applied-jobs` |
| `generate_proposal(...)` | `POST /api/auto-apply-v2/generate-proposal` |
| `freelancers()` | `GET /api/auto-apply-v2/freelancers` |
| `get_job(ciphertext)` | `GET /api/jobs/by-ciphertext` |
| `get_client_jobs(company_id)` | `GET /api/clients/:companyId/jobs` |

## Error handling

Any non-2xx response raises `UpHuntError` with `.status_code` and `.body`:

```python
from uphunt import UpHunt, UpHuntError

try:
    client.apply(job_id="~01abc", cover_letter="…")
except UpHuntError as err:
    print(err.status_code, err, err.body)
```

## Generate a proposal, then apply

```python
gen = client.generate_proposal(job_id="~01abc", reasoning_effort="medium")
client.apply(job_id="~01abc", cover_letter=gen["proposal"])
```

## License

MIT © UpHunt
