Metadata-Version: 2.4
Name: radarbg
Version: 0.1.0
Summary: Tiny client for Radar APIs: IBAN, EU VAT (VIES), SEPA XML, HS codes, PDF and 140 more. 25 free calls a day, no key.
License: MIT
Project-URL: Homepage, https://radarbg.com/?ref=pypi
Project-URL: Documentation, https://radarbg.com/docs?ref=pypi
Keywords: iban,vat,vies,sepa,hs-code,api,pdf
Classifier: Programming Language :: Python :: 3
Classifier: License :: OSI Approved :: MIT License
Classifier: Topic :: Office/Business :: Financial
Requires-Python: >=3.8
Description-Content-Type: text/markdown
License-File: LICENSE
Dynamic: license-file

# radarbg

Tiny Python client (no dependencies) for the [Radar APIs](https://radarbg.com/?ref=pypi): IBAN checks, EU VAT numbers via VIES, HS tariff codes, SEPA, currency rates, PDF and about 140 more.

- No key: 25 calls a day per IP.
- Free key (500 calls a month): `POST https://radarbg.com/v1/signup {"email": "..."}`, then `Client(api_key="...")` or set `RADARBG_API_KEY`.

```
pip install radarbg
```

## 1. Check IBANs before you pay a supplier

```python
from radarbg import Client
r = Client().call("iban-validator", ibans=["DE89 3704 0044 0532 0130 00", "GB00 WEST 1234 5698 7654 32"])
for it in r["items"]:
    print(it.get("iban"), it.get("valid"), it.get("bankName"))
```

## 2. Look up an HS tariff code

```python
from radarbg import Client
c = Client()
print(c.hs_code_tariff_lookup(mode="search", q="cotton socks"))   # same as c.call("hs-code-tariff-lookup", q=...)
```

## 3. See every API

```python
from radarbg import Client
for name, summary in Client().apis():
    print(name, "-", summary)
```

Errors raise `radarbg.RadarError` with the HTTP status and the API's message. Full docs: https://radarbg.com/docs?ref=pypi
