How pantherale0/pynintendoparental works
Project type and purpose
• This is a Python client library (“pynintendoparental”) that provides an API to connect to Nintendo Switch Parental Controls.
• It’s not a user‐facing web app or microservice; it’s a standalone SDK that your own Python code can import, authenticate with Nintendo’s servers, and manipulate parental‐control data.
File structure
• Top‐level files: configuration (.flake8, .coveragerc), CI workflows (.github/workflows), packaging (setup.py, pyproject.toml, requirements.txt), test harness (test.py), and a Justfile for local dev.
• Package directory “pynintendoparental” contains:
• api.py – orchestrates HTTP calls
• application.py – high‐level entry point
• authenticator/ – handles the authentication handshake (pairing code, tokens)
• const.py – endpoint URLs, timeouts, config defaults
• enum.py – typed enums for settings & states
• device.py, player.py – domain models mapping JSON to objects
• exceptions.py – custom error classes
README for additional insights
• Authenticate with Nintendo’s parental‐controls service
• Fetch or modify settings for consoles (“devices”) and user profiles (“players”)
Elements
– Clear labels: e.g., “Authenticator”, “API Client”, “Device Model”
• Application → Authenticator → External Service
• Application → API Client → External Service → Domain Models
• Blue rectangles for internal modules
[Application Code]
|
+--> [Authenticator Module] ---HTTP---> (Nintendo Auth Endpoint)
| |
| +--returns token-->|
|
+--> [API Client Module] ---HTTP---> (Nintendo Parental Controls API)
|
+--JSON--> [Device Model]
|
+--JSON--> [Player Model]
|
+--Errors--> [Exceptions]