Skip to main content

A modular Python SDK for document, image, and audio AI actions powered by OpenAI.

Project description

MySDK

mysdk-vijay is a modular Python SDK that wraps OpenAI behind practical AI actions for documents, images, and audio.

The goal of this SDK is to let developers call a clean Python API instead of writing raw OpenAI request code throughout their applications.

What The SDK Can Do

  • Document actions: generate text, summarize, extract keywords, analyze sentiment, answer questions from context
  • Image actions: describe images, analyze images, answer questions about an image
  • Audio actions: transcribe audio and summarize transcripts

Package Structure

The main SDK entry point is AIActions.

from mysdk import AIActions

sdk = AIActions()

After creating the SDK, the advanced modules are available as:

  • sdk.documents
  • sdk.images
  • sdk.audio

The package also keeps backward-compatible shortcuts like:

  • sdk.generate_text(...)
  • sdk.summarize(...)
  • sdk.extract_keywords(...)
  • sdk.analyze_sentiment(...)
  • sdk.answer_question(...)

Install

Install the package normally:

pip install mysdk-vijay

If you are working from the source repo locally:

pip install .

For development with tests:

pip install -e .[dev]

Environment Setup

Set your OpenAI API key before running live SDK calls.

PowerShell:

$env:OPENAI_API_KEY="your_api_key"

Command Prompt:

set OPENAI_API_KEY=your_api_key

Quick Start

from mysdk import AIActions

sdk = AIActions()

print(sdk.documents.summarize_short("Long document text"))
print(sdk.documents.extract_keywords_detailed("Python SDKs simplify AI integration."))
print(sdk.documents.answer_question(
    context="Paris is the capital of France.",
    question="What is the capital of France?",
))
print(sdk.images.describe("sample.png"))
print(sdk.audio.transcribe("meeting.wav"))

Main Modules

Documents

Use sdk.documents for text and document-style operations.

Examples:

sdk.documents.summarize("Long text")
sdk.documents.summarize_short("Long text")
sdk.documents.extract_keywords_detailed("Some content")
sdk.documents.analyze_sentiment_detailed("The SDK is practical and clear.")
sdk.documents.answer_question(
    context="The company is based in Austin.",
    question="Where is the company based?",
)

Images

Use sdk.images for image understanding.

Examples:

sdk.images.describe("photo.jpg")
sdk.images.analyze("chart.png")
sdk.images.answer_question("screenshot.png", "What does this image show?")

Audio

Use sdk.audio for audio transcription and transcript summarization.

Examples:

sdk.audio.transcribe("meeting.wav")
sdk.audio.transcribe_detailed("meeting.wav")
sdk.audio.summarize("meeting.wav")

Test The Installed Package

After installing the package on any machine, you can test document, image, and audio support with this script.

Replace the image and audio paths with real files on that machine.

from mysdk import AIActions, AIActionError

DOCUMENT_TEXT = """
OpenAI provides APIs that help developers build AI-powered applications.
Python SDKs make integration cleaner, faster, and easier to maintain.
"""

IMAGE_PATH = r"C:\path\to\your\image.jpg"
AUDIO_PATH = r"C:\path\to\your\audio.mp4"

try:
    sdk = AIActions()

    print("DOCUMENT RESULT:")
    print(sdk.documents.summarize_short(DOCUMENT_TEXT))

    print("\nIMAGE RESULT:")
    print(sdk.images.analyze(IMAGE_PATH))

    print("\nAUDIO RESULT:")
    print(sdk.audio.summarize(AUDIO_PATH))

except AIActionError as exc:
    print(f"SDK error: {exc}")

Run it with:

PowerShell:

$env:OPENAI_API_KEY="your_api_key"
python test_sdk.py

Command Prompt:

set OPENAI_API_KEY=your_api_key
python test_sdk.py

Verify The Installed Version

To confirm that the installed package includes the advanced API:

python -c "from mysdk import AIActions; sdk=AIActions(); print(hasattr(sdk, 'documents'), hasattr(sdk, 'images'), hasattr(sdk, 'audio'))"

Expected output:

True True True

Run Unit Tests

The test suite uses mocked OpenAI behavior, so it does not require a live API key.

pytest

Notes

  • Internally, the SDK uses the official OpenAI Python library.
  • The package is modular, but the top-level compatibility methods are still available for simpler usage.
  • Image and audio actions require real local file paths.
  • Current document methods operate on text content, not document file paths like PDF or DOCX.

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

openai_ai_actions_sdk-0.3.1.tar.gz (11.8 kB view details)

Uploaded Source

Built Distribution

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

openai_ai_actions_sdk-0.3.1-py3-none-any.whl (10.2 kB view details)

Uploaded Python 3

File details

Details for the file openai_ai_actions_sdk-0.3.1.tar.gz.

File metadata

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

File hashes

Hashes for openai_ai_actions_sdk-0.3.1.tar.gz
Algorithm Hash digest
SHA256 8a981a4517699c0098278438c50c098707945d875d32ca0bd0b3cdff419f4526
MD5 1cff42726c4dca77d33c3f2df0cddffa
BLAKE2b-256 37d841dc13e7ec0734d451b3d68bedf8184bde3b7ff1c28887d104ca6038625b

See more details on using hashes here.

File details

Details for the file openai_ai_actions_sdk-0.3.1-py3-none-any.whl.

File metadata

File hashes

Hashes for openai_ai_actions_sdk-0.3.1-py3-none-any.whl
Algorithm Hash digest
SHA256 8e96cba53340dbfab174d8c99a7bdc08a32aa012e76730959425678b8bc48a4b
MD5 2494327ecdd7f6e6ffd1288600f9a061
BLAKE2b-256 198c77832044f290b2b846095a5f2fe04ef61cf5288abb2a2971b1d564433d7e

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