Welcome to the platform team. Our services need a small in-memory database for session and settings data. Its public API in database/database.py is agreed and stubbed out, and the rules are in README.md.
Welcome to the platform team. Our services need a small in-memory database for session and settings data. Its public API in database/database.py is agreed and stubbed out, and the rules are in README.md.
Build levels 1 and 2 below in 30 minutes. The checks are graded one by one, so every method you get working counts even if the rest is not done.
set stores a value and get reads it back. get returns None for a missing key or field.compare_and_set replaces a value only when it matches expected_value, returns True or False, and never creates a field.compare_and_delete removes a field only when its value matches.scan(timestamp, key) lists every field as "field(value)", sorted by field name in plain string order.scan_by_prefix keeps only the fields whose name starts with the prefix.[].pytest tests/visible. The hidden checks call the same methods with longer sequences of calls.Visible test command
pytest tests/visibleThe repository’s own tests. Run all tests includes them, and so does every submission.
Repository
in-memory-database-records-and-scans
Changes under src/ are evaluated.