diff --git a/sources/importdemo.py b/sources/importdemo.py new file mode 100644 index 0000000..08eeb2d --- /dev/null +++ b/sources/importdemo.py @@ -0,0 +1,20 @@ +""" +Demonstrates the behavior of imports in sources. +""" +# Standard library imports +from datetime import datetime +import random + +# Environment import +import flask + +# Local import +from importdemohelper import secret + +def fetch_new(state): + return [{ + 'source': 'importdemo', + 'id': '{:x}'.format(random.getrandbits(16 * 4)), + 'title': f'The secret is "{secret}"', + 'body': f'And flask\'s name is "{flask.__name__}"', + }] diff --git a/sources/importdemohelper.py b/sources/importdemohelper.py new file mode 100644 index 0000000..7e68e7f --- /dev/null +++ b/sources/importdemohelper.py @@ -0,0 +1,6 @@ +""" +Demonstrates the behavior of imports in sources. +This python file is not a source and will not +""" + +secret = f'This string is from {__file__}'