Skip to main content

Fast, secure network awakeness monitoring for SyftBox - ping members to see who's online and ready for interactive queries

Project description

Syft Awake 🚀

Fast, secure network awakeness monitoring for SyftBox - ping network members to see who's online and ready for interactive queries.

Quick Start

Installation

pip install syft-awake

Usage

import syft_awake as sa

# Ping a specific user
response = sa.ping_user("friend@example.com", "Are you free for a call?")
if response and response.status == sa.AwakeStatus.AWAKE:
    print(f"{response.responder} is awake: {response.message}")

# Scan the entire network (auto-discovers users with syft-awake)
summary = sa.ping_network()
print(f"Network awakeness: {summary.awakeness_ratio:.1%}")
for user in summary.awake_users:
    print(f"✅ {user} is awake")

What It Does

Auto-Installation: Simply importing the library automatically installs the SyftBox app to respond to pings.

Network Discovery: Automatically finds other SyftBox users who have syft-awake installed by scanning the local datasites directory.

Real-time Status: Get detailed availability info including status (awake/busy/sleeping), workload level, and capabilities.

API

Core Functions

ping_user(email, message="ping") - Ping a specific user
ping_network(user_emails=None) - Ping multiple users (auto-discovers if no list provided)

Status Types

  • AwakeStatus.AWAKE - Available for interaction
  • AwakeStatus.BUSY - Available but occupied
  • AwakeStatus.SLEEPING - Not available

Use Cases

Team Collaboration

# Check if team is available before starting a meeting
team_emails = ["alice@company.com", "bob@company.com"]  
summary = sa.ping_network(user_emails=team_emails)
if summary.awakeness_ratio > 0.5:
    print("Enough people online for the meeting!")

Distributed Computing

# Find available compute nodes
summary = sa.ping_network()
light_workload_users = [
    user for user in summary.awake_users 
    if sa.ping_user(user).workload == "light"
]

How It Works

  • Server: Each user runs a small SyftBox app that responds to awakeness pings
  • Client: Use this Python library to ping users and scan the network
  • Security: Uses SyftBox's authenticated, file-based RPC system
  • Discovery: Automatically finds users by scanning /SyftBox/datasites/*/app_data/syft-awake

License

Apache 2.0

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

syft_awake-0.1.9.tar.gz (54.2 kB view details)

Uploaded Source

Built Distribution

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

syft_awake-0.1.9-py3-none-any.whl (23.8 kB view details)

Uploaded Python 3

File details

Details for the file syft_awake-0.1.9.tar.gz.

File metadata

  • Download URL: syft_awake-0.1.9.tar.gz
  • Upload date:
  • Size: 54.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.4.20

File hashes

Hashes for syft_awake-0.1.9.tar.gz
Algorithm Hash digest
SHA256 ce691dbe8b160065ff9317013d865b656e0576a7c47c48d91a05c39f1422b7ed
MD5 dd3d3920e6c54f1f997c5ee84e13b391
BLAKE2b-256 d4efead1b4482e50f0f749f861c93c145ddcfb775dcb517d65ba86e18ae3dd51

See more details on using hashes here.

File details

Details for the file syft_awake-0.1.9-py3-none-any.whl.

File metadata

  • Download URL: syft_awake-0.1.9-py3-none-any.whl
  • Upload date:
  • Size: 23.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.4.20

File hashes

Hashes for syft_awake-0.1.9-py3-none-any.whl
Algorithm Hash digest
SHA256 ced5c13004bbce4d68b2a16eed99651e30429dfc766ad368735900322188e0e6
MD5 0aeb7cf6c5bb10f176857378db5c42da
BLAKE2b-256 9b3a0162b542b3768adb3d2c662a71273c585eae5965021219c9c7a73d9eadcb

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