Companies Home Search Profile

Using sleep() to Code a Python Uptime Bot

Focused View

Martin Breuss

22:30

194 View
  • 455 - 01-introduction.mp4
    02:49
  • 455 - 02-basic-sleep.mp4
    02:00
  • 455 - 03-timeit-time.mp4
    03:43
  • 455 - 04-uptime-bot-initial.mp4
    05:14
  • 455 - 05-uptime-bot-refactor.mp4
    03:29
  • 455 - 06-tame-the-bot.mp4
    02:30
  • 455 - 07-next-steps.mp4
    01:33
  • 455 - 08-summary.mp4
    01:12
  • python sleep code.zip
  • python sleep course slides.pdf
  • Description


    Have you ever needed to make your Python program wait for something? You might use a Python sleep() call to simulate a delay in your program. Perhaps you need to wait for a file to upload or download, or for a graphic to load or be drawn to the screen. You might even need to pause between calls to a web API, or between queries to a database. Adding Python sleep() calls to your program can help in each of these cases, and many more!

    In this course, you’ll learn:

    What You'll Learn?


    • The basics of time.sleep()
    • How you can use timeit to measure your code’s execution time
    • How to use time.sleep() to build an uptime bot

    More details


    User Reviews
    Rating
    0
    0
    0
    0
    0
    average 0
    Total votes0
    Focused display
    Category
    Martin Breuss
    Martin Breuss
    Instructor's Courses

    As someone who learned programming primarily through online resources, I feel that I have a good understanding of how important high quality learning material is.

    With a background in education, I worked as a coding mentor, code reviewer, curriculum developer, and bootcamp instructor. Quality education and figuring out how to have fun while learning unfamiliar topics effectively has always been a big topic in my life. Real Python provides all that, and I’m happy that I can contribute.

    In my day job I create online courses and teach on-site bootcamps around the world with CodingNomads. This position keeps me traveling, teaching, learning, discovering new places and new aspects of Python, as well as getting to know interesting and motivated students year-round.

    When you learn to program, you’re learning to instruct a universal tool. People have described programming as the literacy of the 21st century, and I think that there’s something to that idea.

    That doesn’t mean that you need to become a full-time software developer to apply your programming skills productively. Most likely there is way how your interests can benefit from being able to skillfully instruct your personal universal tool. And Python is a great language to get started with and also to keep going.

    I’m happy to help out with thoughts and resources as well as encouragement.

    If you’re stuck, remember that everyone gets stuck and if you feel you don’t know much, keep in mind that most of us feel that way quite often. Take a break, maybe go on a walk outside or do what it takes for you to keep yourself feeling good.

    It’s easier to stick with something for the long term when you’re finding enjoyment in what you do. Remember that learning anything new is more of a marathon than a sprint. :)

    Learn Python online: Python tutorials for developers of all skill levels, Python books and courses, Python news, code examples, articles, and more.
    • language english
    • Training sessions 8
    • duration 22:30
    • Release Date 2023/01/05