Skip to main content

SecureLend SDK for Python

Project description

SecureLend SDK for Python PyPI version

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

Installation

pip install securelend

Quick Start

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

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

securelend-0.1.0.tar.gz (10.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

securelend-0.1.0-py3-none-any.whl (11.1 kB view details)

Uploaded Python 3

File details

Details for the file securelend-0.1.0.tar.gz.

File metadata

  • Download URL: securelend-0.1.0.tar.gz
  • Upload date:
  • Size: 10.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.3

File hashes

Hashes for securelend-0.1.0.tar.gz
Algorithm Hash digest
SHA256 3c53000319bc669d577a36352fe92b7c39856fe3ab09e1eaa6a062356ea60bc3
MD5 097e5546e7e4211c18a55e6e21f13396
BLAKE2b-256 51059f08491d3c83f725194080e9a143baa562db600afb9c5ca3f5de3be8bdf0

See more details on using hashes here.

File details

Details for the file securelend-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: securelend-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 11.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.3

File hashes

Hashes for securelend-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 8d23be3d6e493b76a5df8f57efce4b090f5724bb8023d3e2fcccbd0ab815d770
MD5 c611b76124a085b0af4ee4769e240175
BLAKE2b-256 7024244a670e11af4b9f77d714c22ef0dec3ba3306c303f046936026dd126590

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page