the code should be broken up into as many functions as needed, and guarded.
an obvious benefit of this well be improved maintainability.
this will also give us the opportunity to run specific database update procedures rather than update all of the database at once (this will also help when we implement cli arguments).
example from the refactoring thread on the numbeo-scraping-dev mailing list:
# ... def main(): one_of_many_functions() if __name__ == '__main__': main()