{"library":"pyric","title":"Pyric - Python Wireless Library","description":"Pyric is a Python library designed to simplify interaction with wireless network interfaces on Linux. It provides tools to manage wireless devices, query their status, and control modes like monitor mode. The current version is 0.1.6.3, and it appears to be actively maintained with recent commits, though new releases are infrequent.","language":"python","status":"active","last_verified":"Fri Apr 17","install":{"commands":["pip install pyric"],"cli":null},"imports":["from pyric import pyw","from pyric import wireless"],"auth":{"required":false,"env_vars":[]},"quickstart":{"code":"import os\nfrom pyric import pyw\n\n# Check for root privileges - Pyric often requires root to interact with wireless interfaces\nif os.geteuid() != 0:\n    print(\"Warning: This script should ideally be run as root for full functionality.\\nProceeding, but some operations might fail due to permissions.\")\n\n# List all wireless interfaces\ntry:\n    interfaces = pyw.winterfaces()\n    if interfaces:\n        print(f\"Found wireless interfaces: {', '.join(interfaces)}\")\n        for iface in interfaces:\n            print(f\"  - Interface: {iface}, Driver: {pyw.driverinfo(iface)}, PHY: {pyw.phynum(iface)}\")\n    else:\n        print(\"No wireless interfaces found. Ensure adapter is enabled and drivers are loaded.\")\nexcept Exception as e:\n    print(f\"An error occurred while listing interfaces: {e}\")\n    print(\"Ensure you have proper permissions (run as root) and that wireless drivers are loaded.\")","lang":"python","description":"This quickstart demonstrates how to import `pyw` and list available wireless interfaces on your system, including a crucial check for root privileges which are often required for Pyric operations. It also shows how to get basic information like driver and PHY number for detected interfaces.","tag":null,"tag_description":null,"last_tested":null,"results":[]},"compatibility":null}