From the course: Advanced Python: Object-Oriented Programming
Unlock the full course today
Join today to access over 24,700 courses taught by industry experts.
Challenge: Event from JSON - Python Tutorial
From the course: Advanced Python: Object-Oriented Programming
Challenge: Event from JSON
(upbeat music) - [Instructor] For this challenge, I would like you to take this LoginEvent, which gets a login and has a notify_loaded method, and also the AccessEvent, which has a login and a uri, and also a notify method and change them a bit. I would like to add the ability to load events from JSON data, which is a string, and use a Mixin class for that. Also, make sure that the events have notify_loaded method using an abstract base class. And if you need JSON data to test with, here's a data for LoginEvent, and here's a data for an AccessEvent.