Early Experimental StageThis software is in early development and may have limitations or bugs. Do not use for production.

DocumentationQuickstart

Quickstart

Get started with Pynions in 60 seconds - perfect for marketers!

Quick Setup (Just 2 Steps!)

1. Install & Configure

# Create project and enter it
mkdir my-pynions && cd my-pynions
 
# Install Pynions
pip install pynions
 
# Add your OpenAI API key
cp .env.example .env
echo "OPENAI_API_KEY=your-key-here" > .env

2. Create Your First Workflow

Create workflows/content_ideas.py and paste this complete example:

from litellm import completion
from pynions.core.config import config
import os
 
def generate_content_ideas(topic):
    """Marketing workflow for content ideation"""
    
    # Check API key
    if not config.check_api_key():
        return None
        
    print(f"šŸŽÆ Analyzing {topic}...")
    
    prompt = f"""Generate 3 content ideas for {topic}.
    Include for each:
    1. Content Type (blog, video, etc)
    2. Catchy Title
    3. Key Points (3-5)
    """
    
    try:
        response = completion(
            model="gpt-4o-mini",
            messages=[{"role": "user", "content": prompt}]
        )
        return response.choices[0].message.content
    except Exception as e:
        print(f"āŒ Error: {str(e)}")
        return None
 
def save_ideas(content):
    """Save workflow results"""
    output_folder = config.get("output_folder", "data")
    os.makedirs(output_folder, exist_ok=True)
    
    filename = f"{output_folder}/content_ideas.txt"
    with open(filename, "w") as f:
        f.write(content)
    return filename
 
def main():
    print("\nšŸŽÆ Content Idea Generator")
    print("----------------------")
    
    topic = input("\nšŸ“ What topic should we analyze? ")
    
    if result := generate_content_ideas(topic):
        print("\nšŸ’” Your Content Ideas:")
        print("-------------------")
        print(result)
        
        if config.get("save_results", True):
            filename = save_ideas(result)
            print(f"\nšŸ’¾ Ideas saved to: {filename}")
 
if __name__ == "__main__":
    main()

That's it! Run your workflow:

python workflows/content_ideas.py

What You Get

  1. AI-Powered Content Ideas: Get instant content suggestions for any topic
  2. Auto-Save: Results saved to files (optional)
  3. Simple Setup: Just one API key needed
  4. Marketing Focus: Built for content creators

Next Steps

  1. Customize Settings (Optional) Create pynions.json to customize where files are saved:

    {
        "save_results": true,
        "output_folder": "my_content"
    }
  2. Try More Examples Check out the examples folder for more marketing workflows:

    • Blog post generator
    • Social media scheduler
    • Content repurposing
    • SEO optimization
  3. Read the Docs Visit our documentation for more examples and guides.

Need Help?

Updated 1 month ago
Edit this page
Did this page help you?