Official Python SDK for Oxinion Marketing Exchange - Multi-channel marketing automation with push notifications, email, geotriggers, beacons, and webhooks
This project has been archived.
The maintainers of this project have marked this project as archived. No new releases are expected.
Project description
OMX SDK for Python
Python SDK for Oxinion Marketing Exchange (OMX) - A comprehensive toolkit for multi-channel marketing automation, geotrigger management, push notifications, email campaigns, webhook integration, workflow automation, analytics insights, audience segmentation, and event tracking.
Installation
pip install omx-sdk
Quick Start
import asyncio
import os
from omx_sdk import OMXClient
async def main():
# Recommended: Use async context manager (auto-cleanup)
async with OMXClient(
client_id=os.getenv("OMX_CLIENT_ID"),
secret_key=os.getenv("OMX_SECRET_KEY")
) as omx:
# Send push notification (Pythonic style with keyword arguments)
result = await omx.notification.send(
title="Special Offer",
message="Get 20% off your next purchase!",
recipients=["user123", "user456"],
data={"coupon_code": "SAVE20"}
)
print(f"Notification sent: {result.message_id}")
# Create geofence
geofence = await omx.geo_trigger.create(
name="Downtown Store",
location={"lat": 40.7128, "lng": -74.006},
radius=100,
events=["enter", "exit"]
)
print(f"Geofence created: {geofence.id}")
# Send email
email = await omx.email.send(
to="customer@example.com",
subject="Welcome!",
template="welcome_template",
variables={"first_name": "John"}
)
print(f"Email sent: {email.message_id}")
# Create webhook
webhook = await omx.webhook.create(
url="https://your-app.com/webhooks/omx",
events=["geofence.enter", "notification.sent"],
secret="your_webhook_secret"
)
print(f"Webhook created: {webhook.id}")
if __name__ == "__main__":
asyncio.run(main())
Features
- 📱 Push Notifications - Send targeted push notifications with deep linking
- 🌍 GeoTrigger Management - Create and manage location-based automation
- 📧 Email Marketing - Send transactional emails and email campaigns
- 📡 Beacon Management - Bluetooth beacon proximity marketing
- 🔗 Webhook Integration - Real-time event notifications and webhooks
- 🎯 Campaign Automation - Multi-channel marketing campaigns
- 🔄 Workflow Automation - Visual workflow automation with complex logic
- 📊 Analytics & Insights - Performance analytics and reporting
- 👥 Audience Segmentation - Advanced user segmentation and targeting
- 📝 Event Tracking - Comprehensive user behavior tracking
- 🔐 Secure Authentication - Automatic token management
- ⚡ Async Support - Built with httpx for high-performance async/await
All Available Modules
Notification Module
# Send push notifications
await omx.notification.send(
title="Hello",
message="Welcome!",
recipients=["user123"]
)
# Send to audience segment
await omx.notification.send_to_segment(
title="Sale Alert",
message="50% off today!",
segment="vip_customers"
)
# Get notification history
history = await omx.notification.get_history(limit=50, status="delivered")
Email Module
# Send transactional email
await omx.email.send(
to="user@example.com",
subject="Welcome!",
template="welcome_template",
variables={"name": "John"}
)
# Create email campaign
campaign = await omx.email.create_campaign(
name="Monthly Newsletter",
subject="Special Offers",
template="newsletter",
recipients=["segment:all_users"]
)
GeoTrigger Module
# Create circular geofence
geofence = await omx.geo_trigger.create(
name="Store Location",
location={"lat": 40.7128, "lng": -74.006},
radius=100,
events=["enter", "exit"]
)
# Check if location is inside geofence
is_inside = await omx.geo_trigger.check_location(
geofence_id="fence_123",
latitude=40.7128,
longitude=-74.006
)
Beacon Module
# Register beacon
beacon = await omx.beacon.register(
uuid="550e8400-e29b-41d4-a716-446655440000",
major=1,
minor=1,
name="Store Entrance"
)
# Get nearby beacons
beacons = await omx.beacon.get_nearby(
latitude=40.7128,
longitude=-74.006,
radius=50
)
Webhook Module
# Create webhook
webhook = await omx.webhook.create(
url="https://yourapp.com/webhook",
events=["geofence.enter", "notification.sent"],
secret="your_secret"
)
# Get delivery logs
deliveries = await omx.webhook.get_deliveries(
webhook_id="webhook_123",
status="failed"
)
Campaign Module
# Create multi-channel campaign
campaign = await omx.campaign.create(
name="Summer Sale",
description="Seasonal promotion",
channels=["email", "push_notification"],
schedule={"start_date": "2024-06-01T00:00:00Z"},
targeting={"segments": ["active_users"]}
)
# Execute campaign
await omx.campaign.execute(
campaign.id,
trigger_data={"user_id": "user_123"}
)
Workflow Module
# Create visual workflow
workflow = await omx.workflow.create_workflow(
name="Customer Onboarding",
description="Automated welcome sequence",
config={
"triggers": ["user_signup"],
"actions": [
{"type": "send_email", "template": "welcome"},
{"type": "wait", "duration": 3600},
{"type": "send_notification", "title": "Complete Profile"}
]
}
)
# Execute workflow
result = await omx.workflow.run_workflow(workflow.id)
Analytics Module
# Get geotrigger analytics
analytics = await omx.analytics.get_geotrigger_stats(
geotrigger_id="store_001",
time_range="30d"
)
print(f"Total entries: {analytics.metrics['total_entries']}")
print(f"Conversion rate: {analytics.metrics['conversion_rate']}%")
Segment Module
# Create audience segment
segment = await omx.segment.create_segment(
name="High Value Customers",
description="Customers with high lifetime value",
criteria={
"total_spent": {"$gte": 1000},
"last_purchase": {"$gte": "2024-01-01"}
}
)
# Get users in segment
users = await omx.segment.get_segment_users(segment.id)
Events Module
# Track user event
await omx.events.track_event(
user_id="user_123",
event_type="purchase",
data={
"product_id": "prod_456",
"amount": 99.99,
"currency": "USD"
}
)
# Get user event timeline
timeline = await omx.events.get_event_timeline(
user_id="user_123",
limit=50
)
Configuration
Set your credentials as environment variables:
export OMX_CLIENT_ID="your_client_id"
export OMX_SECRET_KEY="your_secret_key"
Documentation
For detailed documentation and API reference, visit: https://github.com/oxinion/omx-sdk
License
This project is licensed under the MIT License - see the LICENSE file for details.
Support
- 📧 Email: support@oxinion.com
- 🐛 Issues: https://github.com/oxinion/omx-sdk/issues
- 📖 Documentation: https://github.com/oxinion/omx-sdk#readme
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 omx_sdk-0.2.0.tar.gz.
File metadata
- Download URL: omx_sdk-0.2.0.tar.gz
- Upload date:
- Size: 12.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c31f1cacf0609c384ea970eedc4b5d83a6e8200570f8932c404ec4c0c33943c3
|
|
| MD5 |
1847a31a2ac5b31db2705bf8bc6647f6
|
|
| BLAKE2b-256 |
4d7230505df5fc4a8360adf891fa98509621bcfe3e3718f22090c6230a48933d
|
File details
Details for the file omx_sdk-0.2.0-py3-none-any.whl.
File metadata
- Download URL: omx_sdk-0.2.0-py3-none-any.whl
- Upload date:
- Size: 12.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
55b0a6e26a061c80689e2fcff5de322ba2b354db8cca9bed79fa3caac75df4c8
|
|
| MD5 |
3ff90b7d24906981d2c620175167a9c9
|
|
| BLAKE2b-256 |
bb237f94eeb013798bc7bbcf247bc2450d238ea70aa70bf4174ed115229c3718
|