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:
- [Contact the development team for access]
- 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 keypexels_key(optional): Pexels API key for enhanced image capabilitiesbase_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 slidelesson(str): The main lesson or contentpoints(list): A list of key points to includeslide_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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d8068f69e7f115808d499935cac154f9a43c5aea66e5e81caa058a6d8fcaba0f
|
|
| MD5 |
fed3bae99e65e39f5ea4e486432bd41c
|
|
| BLAKE2b-256 |
86b18afb522bb4717510fd4d432e4f47d864a5cccd081c0688d670f02fe9ab4b
|
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
589a5d6c7c4af35aa2678aa07f652abed8a4794d5d1ac844e91addbc27b11d84
|
|
| MD5 |
8e3425b13744e70289023ff44b0e235d
|
|
| BLAKE2b-256 |
4dabae62c6ff1a2defb5f8b3b6ded503a16ef5be4940ff63c33e139e16ae752e
|