Python intermediate: classes, files, errors and testing
Write programs that last: classes and dataclasses, files and JSON, exceptions, virtual environments and tests with pytest.
- 1Classes and dataclassesBundle data and behaviour, and let dataclasses write the boilerplate.11 min
- 2Files, JSON and pathlibRead and write text and JSON safely and handle paths without string tricks.11 min
- 3Exceptions and error handlingCatch the errors you can handle, let the others fail loudly and raise your own.10 min
- 4Virtual environments and packagesKeep each project’s dependencies separate and reproducible.10 min
- 5Testing with pytestWrite small tests that prove your code works and keep working.11 min
Your certificate
Sign in to save your progress across devices and get a certificate with a public verification link. It is free.
Finish all 5 lessons, passing every exercise, to unlock your certificate of completion.
You completed Python intermediate: classes, files, errors and testing. Put your name on a certificate you can download and share.
Your name is saved with your certificate so anyone with its link can verify it. You can delete your account and certificates at any time.
Share your achievement
Post it and tag the creator. Pick a network to get the text with the right mention.
This is a self-paced completion certificate. Your browser issues it when you pass the exercises. It is not an accredited qualification or a verified credential.
Ready for more? Continue with the Advanced level: Python advanced: generators, decorators, typing and asyncio. Each level has its own certificate that shows its level.