Results for “json”

9 results

  1. Challenge

    JSON out

    Turn the day's mission summary dict into JSON text with json.dumps() and indent=2, see what True, False and None become, then keep the station's Polish letters readable and sort the keys so the files…

    Write the code Easy 2 stages json json.dumps modules import
  2. Challenge

    Real JSON

    …worked on a ready-made dict, but the API really sends JSON text. Turn it into a dict with json.loads(), see what false and null become, then handle a response cut off in transfer.

    Write the code Easy 2 stages json json.loads modules import
  3. Challenge

    Config loader

    Load the downlink module's JSON settings over a copy of the defaults, check each value's type and range and report every problem in one go, then wrap it all in a load_config() that never crashes, even…

    Write the code Hard 3 stages project json configuration validation
  4. Challenge

    Launch schedule digest

    Parse the launch schedule from JSON, keep the launches still to come, sort them by their window and print a digest line for each with the time left and any hold, then switch the digest to the live…

    Write the code Medium 3 stages project json datetime timedelta
  5. Challenge

    API response

    …has a web API. Ask it about a launch and it answers with JSON, which Python's json module turns into a dict in one line. The mission planners' dashboard only needs three of its fields. Read those…

    Write the code Easy 2 stages dictionaries keys items JSON
  6. Challenge

    Nested response

    Print the rocket's name and the first mission patch URL from a nested launch response by chaining keys and indexes, then add the operator and orbit and cope with a launch that has no patches yet.

    Write the code Easy 2 stages dictionaries nested data lists JSON
  7. Article Mini projects

    Medical dispenser - Don’t trust the user

    …Time from datetime import datetime, timedelta import json class NaiveMedicationDispenser: """The Hail Mary's original dispenser - easily hackable""" def __init__(self): self.dose_history = []…