Metadata-Version: 2.5
Name: langchain-veille
Version: 0.1.0
Summary: LangChain tools for Veille: check emails, domains, IP addresses, phone numbers, EU VAT numbers and IBANs for fraud and validity.
Project-URL: Homepage, https://www.veille.io
Project-URL: Documentation, https://github.com/veilleio/langchain-veille#readme
Project-URL: Repository, https://github.com/veilleio/langchain-veille
Project-URL: Issues, https://github.com/veilleio/langchain-veille/issues
Author-email: Veille <contact@veille.io>
License-Expression: MIT
License-File: LICENSE
Keywords: agents,email-validation,fraud,iban,ip-reputation,langchain,phone-validation,tools,vat,veille
Classifier: Intended Audience :: Developers
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3 :: Only
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 :: Internet :: WWW/HTTP
Classifier: Typing :: Typed
Requires-Python: >=3.10
Requires-Dist: httpx<1,>=0.27
Requires-Dist: langchain-core<2,>=0.3.15
Provides-Extra: test
Requires-Dist: langchain-tests>=0.3.5; extra == 'test'
Requires-Dist: pytest-asyncio>=0.24; extra == 'test'
Requires-Dist: pytest>=8.3; extra == 'test'
Requires-Dist: ruff<1,>=0.8; extra == 'test'
Description-Content-Type: text/markdown

# langchain-veille

[LangChain](https://www.langchain.com) integration for [Veille](https://www.veille.io): check emails, domains, IP addresses, phone numbers, EU VAT numbers and IBANs for fraud and validity.

## Installation

```bash
pip install -U langchain-veille
export VEILLE_API_KEY="your-api-key"
```

Get an API key at [app.veille.io](https://app.veille.io).

## Tools

| Class | Tool name | What it does |
| --- | --- | --- |
| `VeilleEmailCheck` | `veille_email_check` | Check an email address through Veille. |
| `VeilleDomainCheck` | `veille_domain_check` | Check a domain through Veille. |
| `VeilleIPCheck` | `veille_ip_check` | Check an IP address through Veille. |
| `VeillePhoneCheck` | `veille_phone_check` | Check a phone number through Veille. |
| `VeilleVATCheck` | `veille_vat_check` | Validate an EU VAT number through Veille. |
| `VeilleIBANCheck` | `veille_iban_check` | Validate an IBAN through Veille. |

Each tool takes `api_key` (defaults to `VEILLE_API_KEY`), `base_url` and `timeout`, plus the settings shown in its docstring. Errors (invalid key, no credits, rate limit, timeout) come back to the model as a `ToolException` message, without the API key. Every tool has an async version.

```python
from langchain_veille import VeilleEmailCheck

tool = VeilleEmailCheck()
print(tool.invoke({"email": "john@example.com"}))
```

### In an agent

```python
from langchain.agents import create_agent
from langchain_veille import VeilleEmailCheck, VeilleDomainCheck, VeilleIPCheck

agent = create_agent("openai:gpt-4.1-mini", tools=[VeilleEmailCheck(), VeilleDomainCheck(), VeilleIPCheck()])
result = agent.invoke({"messages": [{"role": "user", "content": "..."}]})
```

## Development

```bash
pip install -e ".[test]"
pytest tests/unit_tests
```

## License

MIT
