Metadata-Version: 2.4
Name: discolike
Version: 0.1.0
Summary: Official Python SDK for the DiscoLike API
Project-URL: Homepage, https://www.discolike.com
Project-URL: Documentation, https://docs.discolike.com
Project-URL: Repository, https://github.com/Discolike/discolike-python
Author-email: DiscoLike <support@discolike.com>
License-Expression: MIT
Keywords: business-data,discolike,enrichment,sdk
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
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
Requires-Python: >=3.10
Requires-Dist: httpx>=0.27
Requires-Dist: pydantic>=2.7
Provides-Extra: cli
Requires-Dist: discolike-cli>=0.1.0; extra == 'cli'
Description-Content-Type: text/markdown

# discolike

Official Python SDK for the [DiscoLike API](https://www.discolike.com) — discover lookalike companies, enrich domain lists, match company names to domains, and find contacts, from typed Python.

For the terminal, see [`discolike-cli`](https://pypi.org/project/discolike-cli/) (`pip install discolike-cli` or `uvx --from discolike-cli discolike`).

## Installation

```bash
pip install discolike
```

Requires Python 3.10+.

## Authentication

```bash
export DISCOLIKE_API_KEY="dl_..."
```

Create a key at [app.discolike.com/account/management/keys](https://app.discolike.com/account/management/keys). You can also pass `api_key=...` explicitly to `Discolike()`.

## Quickstart

```python
from discolike import Discolike

client = Discolike()

companies = client.discover(
    icp_text="Cybersecurity for SMBs, managed IT services, endpoint protection",
    country=["US"],
    max_records=25,
)
for company in companies:
    print(company.domain, company.name, company.similarity)
```

The client is a context manager if you want deterministic cleanup:

```python
with Discolike() as client:
    ...
```

### Async

Every resource has an async twin on `AsyncDiscolike`:

```python
import asyncio
from discolike import AsyncDiscolike

async def main() -> None:
    async with AsyncDiscolike() as client:
        companies = await client.discover(icp_text="B2B SaaS for logistics", max_records=10)
        print([c.domain for c in companies])

asyncio.run(main())
```

### Long-running jobs

Bulk operations (`match.bulk`, `segment`, `validate_icp`, `contacts.bulk_match`) return a `Job` handle instead of blocking:

```python
job = client.segment(domains=["stripe.com", "adyen.com", "checkout.com"])
result = job.wait()
```

`Job.status()` polls without blocking, `Job.cancel()` aborts, and `wait()` raises `JobFailedError` / `JobTimeoutError` on failure.

## Links

- **API documentation**: [docs.discolike.com](https://docs.discolike.com)
- **Source**: [github.com/Discolike/discolike-python](https://github.com/Discolike/discolike-python)

## License

[MIT](https://github.com/Discolike/discolike-python/blob/main/LICENSE)
