Metadata-Version: 2.4
Name: securelend
Version: 0.1.0
Summary: SecureLend SDK for Python
License-Expression: MIT
Project-URL: Homepage, https://github.com/SecureLend/sdk/tree/main/packages/python
Project-URL: Bug Tracker, https://github.com/SecureLend/sdk/issues
Classifier: Programming Language :: Python :: 3
Classifier: Operating System :: OS Independent
Requires-Python: >=3.8
Description-Content-Type: text/markdown
Requires-Dist: mcp>=1.2.0
Requires-Dist: httpx>=0.27.0
Requires-Dist: pydantic>=2.0
Provides-Extra: test
Requires-Dist: pytest>=7.0; extra == "test"
Requires-Dist: pytest-asyncio>=0.20; extra == "test"

# SecureLend SDK for Python [![PyPI version](https://img.shields.io/pypi/v/securelend.svg)](https://pypi.org/project/securelend/)

The official Python SDK for SecureLend - Financial services infrastructure for AI assistants.

## Installation

```bash
pip install securelend
```

## Quick Start

```python
import asyncio
import os
from securelend import SecureLend

async def main():
    # The API server is public and does not require an API key.
    # A key can optionally be provided for usage tracking.
    async with SecureLend(api_key=os.environ.get("SECURELEND_API_KEY")) as securelend:
        response = await securelend.compare_business_loans({
            "loanAmount": 200000,
            "purpose": "equipment",
            "annualRevenue": 1200000,
        })

        print(f"Found {response.summary.total_offers} loan offers.")

        if response.offers:
            top_offer = response.offers[0]
            apr = top_offer.terms.interest_rate.apr * 100
            print(f"Top offer from {top_offer.lender.name} with {apr:.2f}% APR.")

            # Calculate payment details for the top offer
            payment_details = await securelend.calculate_loan_payment({
                "loanAmount": top_offer.terms.amount.amount,
                "interestRate": apr,
                "loanTermInMonths": top_offer.terms.term_months,
            })
            print(f"  - Estimated Monthly Payment: ${payment_details.monthly_payment:,.2f}")


if __name__ == "__main__":
    asyncio.run(main())
```

## Documentation

- [Full Documentation](https://docs.securelend.ai)
- [API Reference](https://docs.securelend.ai/api)
- [Guides](https://docs.securelend.ai/guides)
