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.0.tar.gz (3.4 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.0-py3-none-any.whl (3.9 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: neuroslides-0.1.0.tar.gz
  • Upload date:
  • Size: 3.4 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.0.tar.gz
Algorithm Hash digest
SHA256 ed82190e838b2f4498b3f42e09507a68e464991539bab26f50e7a4a041cdb611
MD5 7c4f89978c4650576f29a7289b364c76
BLAKE2b-256 71334a3f04d99b5a71415949b31cfd1ccc20565bf1fa01a14e6751b9d42d9955

See more details on using hashes here.

File details

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

File metadata

  • Download URL: neuroslides-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 3.9 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.0-py3-none-any.whl
Algorithm Hash digest
SHA256 98bc163ce40803d5cab34f49f589435ac2f4c0f6712deb3af1a419be63156828
MD5 a49a9a24b438ccd1cc67df6e4ac5b9e8
BLAKE2b-256 f85c08efcff7cd871dbde893d08617c1ba65dc480271c88b73ab0456473a965b

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