Skip to main content

FastAPI integration for LTFI-WSAP (Layered Transformer Framework Intelligence - Web System Alignment Protocol) by Kief Studio

Project description

Kief Studio Kief Studio      LTFI LTFI

FastAPI LTFI-WSAP Integration

PyPI version License: MIT LTFI-WSAP Kief Studio

Official FastAPI Integration for LTFI-WSAP (Layered Transformer Framework Intelligence - Web System Alignment Protocol) by Kief Studio.

Part of the LTFI EcosystemWSAP Protocol

📦 Installation

pip install fastapi-ltfi-wsap

🚀 Quick Start

1. Basic Setup

from fastapi import FastAPI
from fastapi_ltfi_wsap import WSAPApp

# Create WSAP-enabled FastAPI app
app = WSAPApp(
    api_key="your-api-key-here",
    entity_id="your-entity-id",
    title="My API",
    description="API with WSAP integration"
)

# Access the FastAPI instance
fastapi_app = app.app

# Or use the convenience function
from fastapi_ltfi_wsap import create_wsap_app

app = create_wsap_app(
    api_key="your-api-key-here",
    entity_id="your-entity-id"
)

2. With Existing FastAPI App

from fastapi import FastAPI
from fastapi_ltfi_wsap import WSAPMiddleware, wsap_router

app = FastAPI()

# Add WSAP middleware
app.add_middleware(
    WSAPMiddleware,
    api_key="your-api-key-here",
    entity_id="your-entity-id"
)

# Include WSAP router
app.include_router(wsap_router, prefix="/wsap", tags=["wsap"])

3. Configuration with Environment Variables

import os
from fastapi_ltfi_wsap import create_wsap_app

app = create_wsap_app(
    api_key=os.getenv("WSAP_API_KEY"),
    entity_id=os.getenv("WSAP_ENTITY_ID"),
    base_url=os.getenv("WSAP_BASE_URL", "https://api.ltfi.ai")
)

4. Using Dependencies

from fastapi import FastAPI, Depends
from fastapi_ltfi_wsap import get_wsap_client, require_wsap_auth

app = FastAPI()

@app.get("/protected")
async def protected_route(auth = Depends(require_wsap_auth)):
    return {"message": "WSAP authenticated"}

@app.get("/entity/{entity_id}")
async def get_entity(entity_id: str, client = Depends(get_wsap_client)):
    return await client.get_entity(entity_id)

🎯 Features

  • FastAPI Integration: Seamless integration with FastAPI applications
  • WSAP Application Class: Pre-configured FastAPI app with WSAP support
  • Middleware: Automatic WSAP header injection and endpoint handling
  • Router: Ready-to-use router with dashboard and API endpoints
  • Dependencies: Reusable dependencies for authentication and client access
  • Domain Verification: DNS TXT record verification for domain ownership
  • Progressive Disclosure: Multiple disclosure levels for information control
  • Entity Management: Support for various entity types
  • Async Support: Full async/await support throughout

📚 Documentation

📄 License

MIT License - This SDK is open source and free to use.

See LICENSE for full terms.

LTFI-WSAP Service Usage

While this SDK is open source, the LTFI-WSAP service has the following usage terms:

  • FREE for personal use, open source projects, and small businesses
  • FREE for most users and use cases
  • 💳 Paid plans required for:
    • Enterprises with annual revenue exceeding $1M USD
    • Organizations managing more than 100 domains
    • High-volume API usage

For pricing details: wsap.ltfi.ai/pricing



Kief Studio Kief Studio

Built with ❤️ by Kief Studio

Part of the LTFI EcosystemWSAP Protocol

© 2025 Kief Studio, MA. All rights reserved.

Open Source SDK - Service usage subject to terms

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

fastapi_ltfi_wsap-2.0.0.tar.gz (18.8 kB view details)

Uploaded Source

Built Distribution

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

fastapi_ltfi_wsap-2.0.0-py3-none-any.whl (18.7 kB view details)

Uploaded Python 3

File details

Details for the file fastapi_ltfi_wsap-2.0.0.tar.gz.

File metadata

  • Download URL: fastapi_ltfi_wsap-2.0.0.tar.gz
  • Upload date:
  • Size: 18.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.2

File hashes

Hashes for fastapi_ltfi_wsap-2.0.0.tar.gz
Algorithm Hash digest
SHA256 212ba37ceecaf892cfc202790b9c24f4d29b368b2aa3def813092d409ceda6d8
MD5 f8a2ee4bec73abb4dc8b897c89e63dcb
BLAKE2b-256 3c37b04e0e3b9d4dbd143a6c493883e14eae30682e1b14c60a28276fe1ebf724

See more details on using hashes here.

File details

Details for the file fastapi_ltfi_wsap-2.0.0-py3-none-any.whl.

File metadata

File hashes

Hashes for fastapi_ltfi_wsap-2.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 83d4a21d0e33c986f26542c7a77603d39f5ec4aed5d54560f7de6d4ee041b8ad
MD5 7dab4f62e5e5d9ab53425a99117f89b7
BLAKE2b-256 75fb7dd2376f2bd8025c115f7d1448187e38621ad067177db911f1d80b52cbf5

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