Metadata-Version: 2.4
Name: omegavacancy-sdk
Version: 0.1.0
Summary: Python SDK for OmegaHire vacancy integration API
Project-URL: Homepage, https://omegahire.tech
Author: OmegaHire
Requires-Python: >=3.10
Requires-Dist: httpx<1.0,>=0.28
Description-Content-Type: text/markdown

# omegavacancy-sdk

Python SDK для интеграционного API OmegaHire (`/api/v1/vacancies`).

Подробная инструкция публикации в TestPyPI/PyPI: [PUBLISHING_RU.md](./PUBLISHING_RU.md).

## Install

```bash
pip install -e .
```

## Usage

```python
from omegavacancy_sdk import OmegaVacancyClient

api_key = "ovk_xxxxx_secret"

with OmegaVacancyClient(base_url="https://your-host", api_key=api_key) as client:
    created = client.create_vacancy({
        "title": "Python Developer",
        "vacancy_text": "Need FastAPI + PostgreSQL",
        "skills": ["Python", "FastAPI"],
    })
    print(created.vacancy_ids)

    for vacancy_id in created.vacancy_ids:
        deleted = client.delete_vacancy(vacancy_id)
        print(deleted.success, deleted.vacancy_id)
```

## Errors

- `OmegaVacancyAuthError` — 401/403
- `OmegaVacancyValidationError` — 422
- `OmegaVacancyServerError` — 5xx/transport
- `OmegaVacancyError` — прочие ошибки

## Какие методы доступны сейчас

### `OmegaVacancyClient`

- `create_vacancy(vacancy: dict) -> CreateVacancyResult`
- `create_vacancies(vacancies: list[dict]) -> CreateVacancyResult`
- `delete_vacancy(vacancy_id: str) -> DeleteVacancyResult`
- `close() -> None`

Контекстный менеджер:

- `__enter__()` / `__exit__(...)`
