Skip to main content

A python package to generate slides for neuroslides presentations

Project description

NeuroSlides

NeuroSlides is a Python client library for generating professional PowerPoint slides using AI. It provides a simple interface to create visually appealing presentation slides with just a few lines of code.

Features

  • Generate PowerPoint slides with AI-powered content formatting
  • Support for custom titles, lessons, and key points
  • Optional slide numbering
  • Integration with Pexels for image content (optional)
  • Simple and intuitive API

Installation

You can install NeuroSlides using pip:

pip install neuroslides

Quick Start

Here's a simple example to generate a PowerPoint slide:

from neuroslides import NeuroSlidesClient
from dotenv import load_dotenv
import os

# Load environment variables (optional)
load_dotenv()

# Initialize the client
client = NeuroSlidesClient(
    api_key="your_api_key_here"  # Replace with your API key
)

# Generate a slide
pptx_content = client.generate_slide(
    title="Building Employee Wellness Programs",
    lesson="Employee wellness programs are essential for attracting and retaining talent and boosting productivity.",
    points=[
        "Effective wellness initiatives address physical, mental, emotional, and financial well-being",
        "Technology enhances the accessibility and personalization of wellness programs, promoting engagement and community."
    ],
    slide_number=9  # Optional
)

# Save the generated slide
with open("output.pptx", "wb") as f:
    f.write(pptx_content)

Authentication

NeuroSlides requires an API key for authentication. You can obtain your API key by:

  1. [Contact the development team for access]
  2. Store your API key securely (recommended to use environment variables)

Configuration

The NeuroSlidesClient can be configured with the following parameters:

  • api_key (required): Your NeuroSlides API key
  • pexels_key (optional): Pexels API key for enhanced image capabilities
  • base_url (optional): Custom API endpoint URL

API Reference

NeuroSlidesClient

generate_slide(title, lesson, points, slide_number=None)

Generates a PowerPoint slide with the specified content.

Parameters:

  • title (str): The title of the slide
  • lesson (str): The main lesson or content
  • points (list): A list of key points to include
  • slide_number (int, optional): The slide number

Returns:

  • Binary content of the generated PPTX file

Error Handling

The library includes comprehensive error handling. API errors will raise exceptions with detailed error messages:

try:
    pptx_content = client.generate_slide(...)
except Exception as e:
    print(f"Error: {e}")

Requirements

  • Python 3.6+
  • requests
  • python-dotenv (optional, for environment variable management)

License

[Add your chosen license here]

Contributing

We welcome contributions! Please feel free to submit a Pull Request.

Support

For support, please email us at muhammadsaboor119@gmail.com

Version History

  • 1.0.0 (Initial Release)
    • Basic slide generation functionality
    • Pexels integration support
    • Error handling
    • Documentation

Made with ❤️ by CutHours

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

neuroslides-0.1.1.tar.gz (3.5 kB view details)

Uploaded Source

Built Distribution

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

neuroslides-0.1.1-py3-none-any.whl (4.0 kB view details)

Uploaded Python 3

File details

Details for the file neuroslides-0.1.1.tar.gz.

File metadata

  • Download URL: neuroslides-0.1.1.tar.gz
  • Upload date:
  • Size: 3.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.0

File hashes

Hashes for neuroslides-0.1.1.tar.gz
Algorithm Hash digest
SHA256 d8068f69e7f115808d499935cac154f9a43c5aea66e5e81caa058a6d8fcaba0f
MD5 fed3bae99e65e39f5ea4e486432bd41c
BLAKE2b-256 86b18afb522bb4717510fd4d432e4f47d864a5cccd081c0688d670f02fe9ab4b

See more details on using hashes here.

File details

Details for the file neuroslides-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: neuroslides-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 4.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.0

File hashes

Hashes for neuroslides-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 589a5d6c7c4af35aa2678aa07f652abed8a4794d5d1ac844e91addbc27b11d84
MD5 8e3425b13744e70289023ff44b0e235d
BLAKE2b-256 4dabae62c6ff1a2defb5f8b3b6ded503a16ef5be4940ff63c33e139e16ae752e

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