Metadata-Version: 2.5
Name: vbd-api
Version: 0.1.1
Summary: Official Python client for the Veteran Benefit Desk API: structured, source linked VA benefits data with permanent VBD IDs and provenance.
Project-URL: Homepage, https://veteranbenefitdesk.com/developers
Project-URL: Documentation, https://veteranbenefitdesk.com/developers
Project-URL: Registry, https://veteranbenefitdesk.com/developers/registry
Author-email: Veteran Benefit Desk <support@veteranbenefitdesk.com>
License: MIT
Keywords: api,benefits,disability,va,vbd,veterans
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Requires-Python: >=3.8
Requires-Dist: requests>=2.28
Description-Content-Type: text/markdown

# vbd-api

Official Python client for the [Veteran Benefit Desk API](https://veteranbenefitdesk.com/developers): structured, source linked VA benefits data with permanent VBD IDs, provenance in every response, and honest review tiers.

You are only charged credits for successful responses. Errors and not found lookups are always free.

## Install

```bash
pip install vbd-api
```

## Quickstart

```python
from vbd_api import VBD

client = VBD(api_key="vbd_sbx_...")  # free key at https://veteranbenefitdesk.com/developers/signup

# Diagnostic codes
ptsd = client.get_diagnostic_code("9411")
print(ptsd["data"]["title"])                 # PTSD
print(ptsd["vbd"]["id"])                     # VBD:DC:9411
print(ptsd["provenance"]["sources"])         # 38 CFR Part 4 ...
print(ptsd["citation_text"])                 # ready to paste attribution line

# Conditions
client.search_conditions(q="knee", limit=10)
client.get_condition("tinnitus")

# VA forms
client.search_forms(q="disability")
client.get_form("21-526EZ")

# State benefits (2 credits)
client.get_state_benefits("TX", category="property_tax")

# Source check: verify a general statement against the corpus (paid plans, 10 credits)
check = client.source_check("PTSD is rated under diagnostic code 9411")
print(check["verdict"], check["sources"])    # supported [...]

# Your usage (free)
client.usage()

# Metering info from the last call
print(client.last_receipt_id, client.credits_remaining)
```

## Errors

All API errors raise `vbd_api.VBDError` with `.status` and `.detail`:

```python
from vbd_api import VBD, VBDError

try:
    client.get_diagnostic_code("99999")
except VBDError as e:
    print(e.status, e.detail)  # 404 Unknown diagnostic code... (not billed)
```

## Notes

- Veteran Benefit Desk is independent and not affiliated with the U.S. Department of Veterans Affairs or any government agency.
- Data is general educational information from public sources. It is not legal, medical, individualized claims, or representative advice.
- License: commercial use with attribution ("Data via Veteran Benefit Desk"). Training rights are not granted by default.
