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.12.tar.gz (46.8 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.12-py3-none-any.whl (14.6 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for syft_awake-0.1.12.tar.gz
Algorithm Hash digest
SHA256 5b3331165196d71d4cfc471d7893d8a431107dad530ec64726481c6f2c9971d7
MD5 77b07f659ed1d958cba95ba817225abe
BLAKE2b-256 b1153e9b52a02aa863ba66e89f90efaebb8731c5caa9e0a25fd5fc2149e60e3f

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for syft_awake-0.1.12-py3-none-any.whl
Algorithm Hash digest
SHA256 968dc7b3643e7a708d6051a3da1cbcd32036154c12a486e58b1681f70915d04b
MD5 1b47149cda1924bea1f94331b7196181
BLAKE2b-256 c4f39067a95b821a74594948630defebf70b592f1de7c827519472c5105826ca

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