Skip to main content

Reckomate Python SDK

Project description

🚀 Reckomate SDK

Reckomate SDK is an official Python SDK for securely interacting with the Reckomate backend platform.
It supports admin APIs, user APIs, MCQ workflows, Excel ingestion, scheduling, and gateway-based secure access.

This SDK is designed to be:

  • 🔐 Secure (gateway + project identity enforced)
  • 📦 Modular (service-based architecture)
  • 🚀 Production-ready
  • 🔄 Future-proof (easy to add new services)

📦 Installation

pip install recko-ai-sdk

⚙️ Quickstart (gateway)

1. Create the project folder,
        - Register with project name 
http://52.87.148.155:8000/project/register
 
2. Create the Virtual Environment 
	-  python -m venv reckovenv
 
3. Activate our Virtual Environment
        - .\reckovenv\Scripts\activate 

4. Install sdk with following with below command
	 # pip install recko-ai-sdk==1.0.7

5. create one file main.py with below code.
 
#main.py

import os
from fastapi import FastAPI, Request
from fastapi.responses import JSONResponse
from dotenv import load_dotenv
from reckomate_sdk.client import ReckomateClient
 
# Load .env
load_dotenv()
 
PROJECT_NAME = os.getenv("RECKOMATE_PROJECT_NAME")
MAIN_BACKEND = os.getenv("RECKOMATE_MAIN_BACKEND")
 
if not PROJECT_NAME:
    raise RuntimeError("RECKOMATE_PROJECT_NAME is missing in .env")
 
if not MAIN_BACKEND:
    raise RuntimeError("RECKOMATE_MAIN_BACKEND is missing in .env")
 
app = FastAPI(title=f"{PROJECT_NAME.upper()} Gateway")
 
# SDK low-level client
client = ReckomateClient(base_url=MAIN_BACKEND)
 
 
@app.get("/health")
def health():
    return {
        "status": "gateway-ok",
        "project": PROJECT_NAME
    }
 
 
@app.api_route("/{path:path}", methods=["GET", "POST", "PUT", "PATCH", "DELETE"])
async def proxy_all(path: str, request: Request):
    try:
        headers = dict(request.headers)
        headers.pop("host", None)
        headers.pop("content-length", None)
 
        # 🔐 Project identity (checked by gateway_guard.py)
        headers["x-internal-proxy"] = PROJECT_NAME
 
        body = await request.body()
 
        resp = client.proxy_request(
            method=request.method,
            path=f"/{path}",
            headers=headers,
            body=body,
            params=dict(request.query_params),
        )
 
        return JSONResponse(
            status_code=resp.status_code,
            content=resp.json() if resp.content else None
        )
 
    except Exception as e:
        return JSONResponse(
            status_code=500,
            content={
                "error": "GATEWAY_ERROR",
                "message": str(e)
            }
        )
 
 
6. Create .env file into project folder 

#.env 
# =====================================
# Project Identity (MANDATORY)
# MUST match the name registered via
# POST /project/register on main backend
# =====================================
RECKOMATE_PROJECT_NAME=inobeta

# =====================================
# Main Backend URL (MANDATORY)
# Main Reckomate backend (8000)
# =====================================
RECKOMATE_MAIN_BACKEND=http://52.87.148.155:8000 
 
# =====================================
# Gateway URL (PUBLIC ENTRY POINT)
# Used by Postman / React Native / Flutter
# =====================================
RECKOMATE_GATEWAY_URL=http://52.87.148.155:5000

 
 
6. After that, needs to install three packages
          # pip install uvicorn fastapi dotenv
 
7. After run the project using command 
          # uvicorn main:app --host 0.0.0.0 --port 5000

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

recko_ai_sdk-1.0.9.tar.gz (11.0 kB view details)

Uploaded Source

Built Distribution

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

recko_ai_sdk-1.0.9-py3-none-any.whl (20.1 kB view details)

Uploaded Python 3

File details

Details for the file recko_ai_sdk-1.0.9.tar.gz.

File metadata

  • Download URL: recko_ai_sdk-1.0.9.tar.gz
  • Upload date:
  • Size: 11.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.9

File hashes

Hashes for recko_ai_sdk-1.0.9.tar.gz
Algorithm Hash digest
SHA256 123608f48ab0e6ca4d2e9cb8267efe98e954d2040b1782de8e7b7889e3b6805f
MD5 9861815abe3b80847edfb32ac3a0ef04
BLAKE2b-256 37abdf6a39e6c2c22e3cd5e1153110b40fa33fc9bc73f2459189f3f8111bbc23

See more details on using hashes here.

File details

Details for the file recko_ai_sdk-1.0.9-py3-none-any.whl.

File metadata

  • Download URL: recko_ai_sdk-1.0.9-py3-none-any.whl
  • Upload date:
  • Size: 20.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.9

File hashes

Hashes for recko_ai_sdk-1.0.9-py3-none-any.whl
Algorithm Hash digest
SHA256 43777735cbfb72e2e23c05050352bb108327b5230149d618f34017604254fcc1
MD5 270046f20aa654f938164c70f5274993
BLAKE2b-256 5ceaa338805d112b51c457d1d89ea3e7340d7cf392cdc47db9298cbab1785ecc

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