Python SDK for Secploy security monitoring and event tracking
Project description
Secploy Python SDK
Event tracking, heartbeat monitoring, and real-time status updates for your apps — powered by Secploy.
📌 Overview
Secploy is a modern security monitoring and observability platform that helps you track events, uptime, and live statuses in real time.
With the Secploy Python SDK, you can:
- ✅ Send events from your Python applications or microservices.
- 💓 Monitor uptime & availability using heartbeats.
- 📊 Attach environment and project metadata automatically.
- 📡 Receive live project statuses in your Secploy dashboard (
Running,Idle,Shutdown).
🚀 Installation
Install directly from PyPI:
pip install secploy
Or from source:
git clone https://github.com/your-org/secploy-python-sdk.git
cd secploy-python-sdk
pip install .
⚡ Quick Start
1️⃣ Initialize the Client
from secploy import SecployClient
client = SecployClient(
api_key="your_project_api_key",
environment="production"
)
2️⃣ Send Events
client.track_event(
name="user_signup",
properties={
"user_id": 101,
"plan": "pro",
"referral": "campaign_2025"
}
)
3️⃣ Report an Incident
incident = client.create_incident(
title="High Error Rate",
description="API error rate exceeded 5% in the EU region.",
severity="critical"
)
print("Incident ID:", incident.id)
4️⃣ Monitor Heartbeats
(Ideal for background jobs, services, or scheduled tasks)
import time
while True:
client.heartbeat()
time.sleep(60) # every minute
5️⃣ Listen for Live Status Updates
(Requires WebSocket + Django Channels backend)
for status in client.listen_status():
print(f"[STATUS UPDATE] Project is now {status}")
Possible statuses:
runningidleshutdown
📌 Environments
When you create a project in Secploy, multiple environments are automatically created:
| Environment | Purpose |
|---|---|
production |
Live, customer-facing |
staging |
Pre-production testing |
development |
Local development |
Each environment has its own API key — use the matching key for the environment you’re sending data from.
📡 SDK Methods
| Method | Description |
|---|---|
track_event(name, properties) |
Send a structured event |
create_incident(title, description, severity) |
Create a new incident |
heartbeat() |
Send a heartbeat signal |
listen_status() |
Stream live project status |
set_environment(env_code) |
Switch environment dynamically |
🛡 Requirements
- Python 3.8+
requestswebsocket-client
🤝 Contributing
-
Fork the repo
-
Create your feature branch:
git checkout -b feature/my-feature
-
Commit your changes:
git commit -m "Add my feature"
-
Push to the branch and open a Pull Request
📄 License
MIT License — See LICENSE for details.
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 secploy-0.1.0.tar.gz.
File metadata
- Download URL: secploy-0.1.0.tar.gz
- Upload date:
- Size: 5.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
49c54654f8456651a187c560b5585a579f85c859cc0dab6797f3d5e1c2cf2234
|
|
| MD5 |
e511e5898b12d8e2ce80455043839c3c
|
|
| BLAKE2b-256 |
cf71d1fc2d41bc374494f3020f65733d63a6c0b2dca8b0a41f3dbb62ea671215
|
File details
Details for the file secploy-0.1.0-py3-none-any.whl.
File metadata
- Download URL: secploy-0.1.0-py3-none-any.whl
- Upload date:
- Size: 7.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
14f1ad7de2d6a4a482b68468670bd5aa188a484c417156053eec2393a3ea05eb
|
|
| MD5 |
137fb034a683924a8fb15a429d6400b4
|
|
| BLAKE2b-256 |
c1e39bb56f16d9a5b7237cee878abda067f3dfcf7d1fb3132785dd1d052649f8
|