Skip to main content

AI-powered Python assistant for natural language coding with CLI and web interface

Project description

๐Ÿš€ OrionAI Python - Your AI Coding Companion

PyPI version Python License: MIT Streamlit

OrionAI Python transforms the way you write code by letting you describe what you want in plain English. Whether you're analyzing data, building machine learning models, or creating visualizations, just tell OrionAI what you need and watch it generate and execute the code for you.

What makes OrionAI special?

๐ŸŽฏ Just describe what you want - No need to remember complex syntax or library details. Want to "analyze sales data and create a dashboard"? Just say it.

๐Ÿง  Multiple AI providers - Choose from Google Gemini, OpenAI, or Anthropic models based on your preferences and needs.

๐ŸŽ“ Learn while you code - Our Python tutor explains every concept with practical examples, making it perfect for beginners and experts alike.

๐ŸŽจ Beautiful web interface - Test features, experiment with code, and learn interactively through our Streamlit interface.

๐Ÿ”ง Handles the boring stuff - Automatically installs packages, manages dependencies, and organizes your outputs so you can focus on the fun parts.

Quick Start

from orionai.python import AIPython

# Initialize your AI assistant
ai = AIPython()

# Just tell it what you want to do
ai.ask("Load the sales.csv file and show me the top 10 customers by revenue")

# Create visualizations with natural language
ai.ask("Make a bar chart showing monthly sales trends")

# Get help with any Python concept
ai.ask("Explain how list comprehensions work with examples")

Want to try the interactive interface? Just run:

from orionai.python import ui
ui()  # Opens a web interface at http://localhost:8501

Or use the powerful CLI for terminal-based coding:

orionai  # Launch interactive CLI with LLM chat and code execution

Installation

# Install OrionAI
pip install orionai

# Or install with development dependencies
pip install orionai[dev]

Set up your API key:

# For Google Gemini (recommended - it's free!)
export GOOGLE_API_KEY="your-api-key-here"

# Or for OpenAI
export OPENAI_API_KEY="your-api-key-here"

# Or for Anthropic
export ANTHROPIC_API_KEY="your-api-key-here"

What can OrionAI do?

๐Ÿ“Š Data Analysis & Visualization

ai.ask("Load my sales data and create a dashboard showing key metrics")
ai.ask("Find correlation between customer age and purchase amount")
ai.ask("Generate a heatmap of sales by region and month")

๐Ÿค– Machine Learning Made Simple

ai.ask("Build a classifier to predict customer churn using my dataset")
ai.ask("Create a time series forecast for next quarter's sales")
ai.ask("Train a model to detect fraud in transactions")

๐Ÿ Python Learning Assistant

from orionai.python import SimplePythonChat

chat = SimplePythonChat()
chat.ask("How do I work with dates in Python?")
chat.explain_code("lambda x: x**2 if x > 0 else 0")
chat.get_examples("decorators")

๐Ÿ’ฌ Interactive Programming

from orionai.python import InteractiveCodeChat

code_chat = InteractiveCodeChat(session_name="my_project")
code_chat.chat("I need to analyze customer behavior patterns")
code_chat.chat_with_code("Load the dataset and show basic statistics")

๐Ÿ–ฅ๏ธ Command Line Interface (CLI)

OrionAI includes a powerful CLI for terminal-based development with LLM integration:

# Launch the interactive CLI
orionai

CLI Features:

  • ๐Ÿค– Multi-provider LLM chat - Google Gemini, OpenAI, Anthropic
  • ๐Ÿ”ง Live code execution - Run Python code with real-time output
  • ๐Ÿ“Š Automatic plot saving - Matplotlib/Seaborn plots saved to session folders
  • ๐Ÿ’พ Session management - Save and restore conversation history
  • โšก Instant startup - Optimized lazy loading for fast performance
  • ๐Ÿ› ๏ธ Error recovery - LLM automatically fixes syntax errors

CLI Workflow Example:

$ orionai
๐Ÿš€ OrionAI Interactive Chat
Select session or create new...

You: Generate random data and create a line plot
๐Ÿค– OrionAI: I'll create random data and visualize it for you.

๐Ÿ’ป Generated Code:
import numpy as np
import matplotlib.pyplot as plt

# Generate random data
x = np.linspace(0, 10, 100)
y = np.random.randn(100).cumsum()

# Create plot
plt.figure(figsize=(10, 6))
plt.plot(x, y)
plt.title("Random Data Line Plot")
plt.show()

๐Ÿ“Š Plot saved: ~/.orionai/sessions/abc123/images/plot_20250902_143022.png
โฑ๏ธ Execution time: 2.34s

You: Now add a trend line to that plot
๐Ÿค– OrionAI: I'll add a polynomial trend line to the existing data...

CLI Configuration:

# Configure LLM provider
orionai config

# View session statistics  
orionai stats

# List all sessions
orionai sessions

What can OrionAI do?


### ๐ŸŒ Web & API Operations
```python
ai.ask("Scrape product prices from this e-commerce site")
ai.ask("Call this REST API and analyze the response")
ai.ask("Download and process data from multiple URLs")

๐Ÿ”’ Security & Encryption

ai.ask("Generate secure passwords and hash them")
ai.ask("Encrypt this sensitive data file")
ai.ask("Validate and sanitize user inputs")

Features by Category

๐Ÿ“ˆ Data Science (15+ features)
  • Pandas operations and analysis
  • Statistical computations with NumPy
  • Data visualization with matplotlib/seaborn
  • CSV/JSON data processing
  • Missing data handling
  • Feature engineering
  • Data cleaning and transformation
๐Ÿค– Machine Learning (10+ features)
  • Scikit-learn model building
  • Model evaluation and metrics
  • Feature selection and engineering
  • Cross-validation and hyperparameter tuning
  • Classification and regression
  • Clustering analysis
  • Performance visualization
๐ŸŒ Web & Network (8+ features)
  • HTTP requests and API calls
  • Web scraping and data extraction
  • JSON/XML processing
  • URL validation and parsing
  • Rate limiting and retry logic
  • Authentication handling
  • Response processing
๐Ÿ’ป System & Performance (7+ features)
  • Memory usage monitoring
  • Performance profiling
  • Process management
  • Environment variables
  • File system operations
  • Resource optimization
  • Timing and benchmarking
๐Ÿ” Security & Encryption (5+ features)
  • Password generation and validation
  • Data encryption/decryption
  • Input sanitization
  • Secure file handling
  • Authentication helpers
๐Ÿ“ File Operations (5+ features)
  • File reading/writing
  • Directory management
  • Archive creation/extraction
  • Format conversions
  • Batch file processing

Interactive Web Interface

Launch the Streamlit interface to explore all features:

from orionai.python import ui
ui()

The web interface includes:

  • ๐Ÿ”ง LLM Configuration - Switch between providers and models
  • ๐Ÿค– AI Assistant - General Python tasks and code generation
  • ๐Ÿ Python Learning - Interactive Python tutor
  • ๐Ÿ’ฌ Code Chat - Conversational programming with memory
  • ๐Ÿงช Feature Tests - Try out specific capabilities
  • ๐Ÿ“š Examples - Ready-to-run code samples
  • ๐Ÿ“– Documentation - Built-in guides and API reference

Configuration Options

from orionai.python import AIPython

# Basic usage (uses Google Gemini by default)
ai = AIPython()

# Specify provider and model
ai = AIPython(
    provider="openai",
    model="gpt-4",
    api_key="your-key",
    verbose=True,
    auto_install=True
)

# Advanced configuration
ai = AIPython(
    provider="anthropic",
    model="claude-3-sonnet-20240229",
    max_retries=5,
    workspace_dir="./my_outputs",
    save_outputs=True,
    ask_permission=False
)

Examples & Use Cases

Real-World Scenarios

๐Ÿ“Š Business Analytics

ai.ask("Analyze our Q3 sales data and identify trends, top products, and underperforming regions")

๐Ÿ” Research & Analysis

ai.ask("Process this survey data, calculate significance tests, and create publication-ready charts")

๐Ÿš€ Rapid Prototyping

ai.ask("Build a simple web scraper for job postings and save results to a database")

๐Ÿ“š Learning & Teaching

chat.ask("Show me different ways to handle errors in Python with real examples")

Why Choose OrionAI?

โœ… Zero Learning Curve - Start coding with natural language immediately
โœ… Production Ready - Robust error handling and enterprise features
โœ… Educational - Learn Python concepts while getting work done
โœ… Flexible - Works with your existing code and workflows
โœ… Secure - No code execution without your permission
โœ… Open Source - Transparent, community-driven development

Getting Help

License

OrionAI is released under the MIT License. See LICENSE for details.

What's Next?

We're actively working on:

  • ๐Ÿš€ More LLM provider integrations
  • ๐Ÿ“ฑ Mobile-responsive UI improvements
  • ๐Ÿ”Œ Plugin system for custom extensions
  • ๐ŸŒ Multi-language support
  • โšก Performance optimizations
  • ๐Ÿง  Advanced AI reasoning capabilities

Ready to revolutionize your Python coding experience? Install OrionAI today and start building with the power of AI!

pip install orionai

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

orionai-1.0.0.tar.gz (126.8 kB view details)

Uploaded Source

Built Distribution

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

orionai-1.0.0-py3-none-any.whl (96.8 kB view details)

Uploaded Python 3

File details

Details for the file orionai-1.0.0.tar.gz.

File metadata

  • Download URL: orionai-1.0.0.tar.gz
  • Upload date:
  • Size: 126.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.5

File hashes

Hashes for orionai-1.0.0.tar.gz
Algorithm Hash digest
SHA256 cede906c5e8be86a3777bafaba1b2c15fe080abb4b2c7c8f3b36967259ae2ed2
MD5 6f7e17f42d67a14bd1a4fa4efc20941f
BLAKE2b-256 af6a0a648df894b9302b2fadb56ca58d7cffdc4a81b0be0d03c0e18e341f39a9

See more details on using hashes here.

File details

Details for the file orionai-1.0.0-py3-none-any.whl.

File metadata

  • Download URL: orionai-1.0.0-py3-none-any.whl
  • Upload date:
  • Size: 96.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.5

File hashes

Hashes for orionai-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 e62329b3dbfd8fb25edae4c9dc62e0d59bac387453305a756c159f83c82ee50f
MD5 47294d28249e4e6c2647814e92b47e4c
BLAKE2b-256 1af33394afe625b2a0c02297751b317e680b260d6a24ba52ac9e1d77ec917139

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