Back to Documentation
Python SDK
Integrate neurals into your Python applications with our easy-to-use SDK.
Installation
Install the neurals Python SDK using pip:
pip install neurals-sdkOr add it to your requirements.txt:
neurals-sdk>=1.0.0Quick Start
Get started in just a few lines of code:
from neurals import Neurals
# Initialize client
client = Neurals(api_key="your-api-key-here")
# Organize inbox
result = client.organize_inbox()
print(f"Organized {result['total_emails']} emails")
# Get draft replies
drafts = client.prepare_draft_replies(limit=10)
for draft in drafts:
print(f"Draft for: {draft['subject']}")
# Join a meeting
meeting_notes = client.join_meeting()
print(f"Meeting notes: {meeting_notes['notes']}")API Methods
organize_inbox()
Organize and categorize emails in your inbox.
result = client.organize_inbox()
# Returns: {
# 'total_emails': 42,
# 'categorized': {'important': 5, 'meetings': 3, ...}
# }prepare_draft_replies(limit=10)
Generate draft replies for emails that need responses.
drafts = client.prepare_draft_replies(limit=10)
# Returns: [
# {
# 'email_id': 'msg-123',
# 'subject': 'Re: Project Update',
# 'draft': 'Thank you for the update...'
# }
# ]join_meeting(meeting_id=None)
Join a meeting and generate notes. If meeting_id is None, joins next scheduled meeting.
notes = client.join_meeting(meeting_id="meeting-456")
# Returns: {
# 'meeting_id': 'meeting-456',
# 'notes': '# Meeting Notes: ...',
# 'notes_length': 1250
# }send_daily_briefing()
Send daily briefing to your configured email.
result = client.send_daily_briefing() # Sends briefing and returns confirmation
configure_webhook(url, events, secret=None)
Configure webhook for real-time event notifications.
client.configure_webhook(
url="https://your-app.com/webhooks/neurals",
events=["inbox.organized", "draft.created"],
secret="your-webhook-secret" # Optional
)Complete Example
from neurals import Neurals
import asyncio
# Initialize client
client = Neurals(api_key="your-api-key")
async def main():
# Organize inbox
print("Organizing inbox...")
inbox_result = await client.organize_inbox()
print(f"✓ Organized {inbox_result['total_emails']} emails")
# Prepare drafts
print("\nPreparing draft replies...")
drafts = await client.prepare_draft_replies(limit=5)
print(f"✓ Prepared {len(drafts)} draft replies")
# Get meeting notes
print("\nGetting meeting notes...")
notes = await client.join_meeting()
print(f"✓ Meeting notes: {len(notes['notes'])} characters")
# Configure webhook
print("\nConfiguring webhook...")
await client.configure_webhook(
url="https://your-app.com/webhooks",
events=["inbox.organized", "draft.created"]
)
print("✓ Webhook configured")
if __name__ == "__main__":
asyncio.run(main())