Metadata-Version: 2.4
Name: luranta
Version: 0.2.1
Summary: Official Python SDK for the Luranta API.
Project-URL: Documentation, https://docs.luranta.com
Project-URL: Source, https://github.com/luranta/sdk-python
Author-email: Luranta <support@luranta.com>
License-Expression: MIT
License-File: LICENSE
Classifier: Development Status :: 2 - Pre-Alpha
Classifier: License :: OSI Approved :: MIT License
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: Programming Language :: Python :: 3.14
Classifier: Typing :: Typed
Requires-Python: <3.15,>=3.10
Requires-Dist: pydantic-core==2.46.4
Requires-Dist: pydantic==2.13.4
Requires-Dist: typing-extensions==4.16.0
Description-Content-Type: text/markdown

# luranta

Official Python client for the [Luranta API](https://docs.luranta.com). Search current jobs and companies from a trusted server.

API keys belong in server-side secrets. Do not put them in browsers, mobile apps, or other public clients.

Requires Python 3.10–3.14.

## Install

```bash
pip install luranta
```

## Quick start

Create a key in [Settings](https://luranta.com/settings), then:

```python
import os
from luranta import Client

client = Client(api_key=os.environ["LURANTA_API_KEY"])

page = client.jobs.list({
    "roles": ["software-engineering"],
    "locations": ["London"],
    "experience": {"min": 3, "max": 8},
    "work_arrangements": ["hybrid", "remote"],
})

for job in page.data:
    print(job.title, job.company.name)
```

## Jobs

List returns one page of summaries. Iterate walks every page. Retrieve loads a full listing.

```python
for job in client.jobs.iterate({
    "roles": ["software-engineering"],
    "locations": ["London"],
}):
    print(job.title)

listing = client.jobs.retrieve("018f1f8a-4d6e-7a6b-8a2b-7f3e8d1c9a10")
print(listing.description_markdown)
```

Location filters accept place names, the same way search works on luranta.com.

## Companies

```python
companies = client.companies.list({
    "query": "Luranta",
    "countries": ["GB"],
})
```

`jobs` and `companies` both expose `list`, `retrieve`, `iterate`, and `with_raw_response`.

```python
raw = client.jobs.with_raw_response.list({
    "roles": ["software-engineering"],
})
print(raw.request_id, raw.cost_usd)
```

## Errors

Failed requests raise `LurantaProblemError`. Network failures without a usable HTTP response raise `TransportError`.

```python
from luranta import Client, LurantaProblemError

try:
    client.jobs.list({"locations": ["Atlantis"]})
except LurantaProblemError as error:
    print(error.status, error.request_id)
    for issue in error.errors:
        print(issue.code, issue.message, issue.pointer)
```

## Webhooks

```python
import os
from luranta import Client

client = Client(api_key=os.environ["LURANTA_API_KEY"])

def handle(raw_body: bytes, headers: dict[str, str]) -> None:
    event = client.webhooks.construct_event(
        raw_body,
        headers,
        os.environ["LURANTA_WEBHOOK_SECRET"],
    )
    if event["event_type"] == "signals.monitor.delivery":
        return
    if event["event_type"] == "integration.test":
        return
```

## Documentation

- [Guides](https://docs.luranta.com/documentation/python-sdk)
- [API reference](https://docs.luranta.com/reference)
- [GitHub](https://github.com/luranta/sdk-python)

MIT
