`_.
+
+View the official docs at http://packages.python.org/Flask-WhooshAlchemy/.
+
+Install
+-------
+
+::
+
+ pip install flask_whooshalchemy
+
+Or:
+
+::
+
+ git clone https://github.com/gyllstromk/Flask-WhooshAlchemy.git
+
+Quickstart
+----------
+
+Let's set up the environment and create our model:
+
+::
+
+ import flask.ext.whooshalchemy
+
+ # set the location for the whoosh index
+ app.config['WHOOSH_BASE'] = 'path/to/whoosh/base'
+
+
+ class BlogPost(db.Model):
+ __tablename__ = 'blogpost'
+ __searchable__ = ['title', 'content'] # these fields will be indexed by whoosh
+
+ id = app.db.Column(app.db.Integer, primary_key=True)
+ title = app.db.Column(app.db.Unicode) # Indexed fields are either String,
+ content = app.db.Column(app.db.Text) # Unicode, or Text
+ created = db.Column(db.DateTime, default=datetime.datetime.utcnow)
+
+Only two steps to get started:
+
+1) Set the ``WHOOSH_BASE`` to the path for the whoosh index. If not set, it will default to a directory called 'whoosh_index' in the directory from which the application is run.
+2) Add a ``__searchable__`` field to the model which specifies the fields (as ``str`` s) to be indexed .
+
+Let's create a post:
+
+::
+
+ db.session.add(
+ BlogPost(title='My cool title', content='This is the first post.')
+ ); db.session.commit()
+
+After the session is committed, our new ``BlogPost`` is indexed. Similarly, if the post is deleted, it will be removed from the Whoosh index.
+
+Text Searching
+--------------
+
+To execute a simple search:
+
+::
+
+ results = BlogPost.query.whoosh_search('cool')
+
+This will return all ``BlogPost`` instances in which at least one indexed field (i.e., 'title' or 'content') is a text match to the query. Results are ranked according to their relevance score, with the best match appearing first when iterating. The result of this call is a (subclass of) :class:`sqlalchemy.orm.query.Query` object, so you can chain other SQL operations. For example::
+
+ two_days_ago = datetime.date.today() - datetime.timedelta(2)
+ recent_matches = BlogPost.query.whoosh_search('first').filter(
+ BlogPost.created >= two_days_ago)
+
+Or, in alternative (likely slower) order::
+
+ recent_matches = BlogPost.query.filter(
+ BlogPost.created >= two_days_ago).whoosh_search('first')
+
+We can limit results::
+
+ # get 2 best results:
+ results = BlogPost.query.whoosh_search('cool', limit=2)
+
+By default, the search is executed on all of the indexed fields as an OR conjunction. For example, if a model has 'title' and 'content' indicated as ``__searchable__``, a query will be checked against both fields, returning any instance whose title or content are a content match for the query. To specify particular fields to be checked, populate the ``fields`` parameter with the desired fields::
+
+ results = BlogPost.query.whoosh_search('cool', fields=('title',))
+
+By default, results will only be returned if they contain all of the query terms (AND). To switch to an OR grouping, set the ``or_`` parameter to ``True``::
+
+ results = BlogPost.query.whoosh_search('cool', or_=True)
+
+
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/Flask_WhooshAlchemy-0.56.dist-info/RECORD b/Assignments/microblog/flask/lib/python2.7/site-packages/Flask_WhooshAlchemy-0.56.dist-info/RECORD
new file mode 100644
index 0000000..5111a03
--- /dev/null
+++ b/Assignments/microblog/flask/lib/python2.7/site-packages/Flask_WhooshAlchemy-0.56.dist-info/RECORD
@@ -0,0 +1,9 @@
+flask_whooshalchemy.py,sha256=B9gRQlgIZj1qigAHBK0p1muAor0qQWHiTDtCm9iV4OQ,9076
+Flask_WhooshAlchemy-0.56.dist-info/DESCRIPTION.rst,sha256=p93nKEcs3waBFl2QDCpvmdsKmvwUrfx5kndtLGyvqp4,3529
+Flask_WhooshAlchemy-0.56.dist-info/METADATA,sha256=2vurKMJ9gyy6i0XGNQi7eJAxDTOduF4hP4KlkxiIb9k,4258
+Flask_WhooshAlchemy-0.56.dist-info/RECORD,,
+Flask_WhooshAlchemy-0.56.dist-info/WHEEL,sha256=BtVfdXUcEYLcFjOkbIrCFRyXU4qszVPt-E9o3RWkSNw,93
+Flask_WhooshAlchemy-0.56.dist-info/metadata.json,sha256=EnrzIaPxxHKOgrRfpOH28tS3CPo1Al0V7FxvUIUreCk,944
+Flask_WhooshAlchemy-0.56.dist-info/top_level.txt,sha256=boSrEtF7b41isJb9N5JZhAOJ_Dq5rRKK5sV3nGg6_Ns,20
+Flask_WhooshAlchemy-0.56.dist-info/INSTALLER,sha256=zuuue4knoyJ-UwPPXg8fezS7VCrXJQrAP7zeNuwvFQg,4
+flask_whooshalchemy.pyc,,
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/Flask_WhooshAlchemy-0.56.dist-info/WHEEL b/Assignments/microblog/flask/lib/python2.7/site-packages/Flask_WhooshAlchemy-0.56.dist-info/WHEEL
new file mode 100644
index 0000000..5a93381
--- /dev/null
+++ b/Assignments/microblog/flask/lib/python2.7/site-packages/Flask_WhooshAlchemy-0.56.dist-info/WHEEL
@@ -0,0 +1,5 @@
+Wheel-Version: 1.0
+Generator: bdist_wheel (0.29.0)
+Root-Is-Purelib: true
+Tag: cp27-none-any
+
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/Flask_WhooshAlchemy-0.56.dist-info/metadata.json b/Assignments/microblog/flask/lib/python2.7/site-packages/Flask_WhooshAlchemy-0.56.dist-info/metadata.json
new file mode 100644
index 0000000..be15a3f
--- /dev/null
+++ b/Assignments/microblog/flask/lib/python2.7/site-packages/Flask_WhooshAlchemy-0.56.dist-info/metadata.json
@@ -0,0 +1 @@
+{"classifiers": ["Environment :: Web Environment", "Intended Audience :: Developers", "License :: OSI Approved :: BSD License", "Operating System :: OS Independent", "Programming Language :: Python", "Topic :: Internet :: WWW/HTTP :: Dynamic Content", "Topic :: Software Development :: Libraries :: Python Modules"], "extensions": {"python.details": {"contacts": [{"email": "karl.gyllstrom+code@gmail.com", "name": "Karl Gyllstrom", "role": "author"}], "document_names": {"description": "DESCRIPTION.rst"}, "project_urls": {"Home": "https://github.com/gyllstromk/Flask-WhooshAlchemy"}}}, "extras": [], "generator": "bdist_wheel (0.29.0)", "license": "BSD", "metadata_version": "2.0", "name": "Flask-WhooshAlchemy", "platform": "any", "run_requires": [{"requires": ["Flask-SQLAlchemy", "SQLAlchemy", "Whoosh", "blinker"]}], "summary": "Whoosh extension to Flask/SQLAlchemy", "test_requires": [{"requires": ["Flask-Testing"]}], "version": "0.56"}
\ No newline at end of file
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/Flask_WhooshAlchemy-0.56.dist-info/top_level.txt b/Assignments/microblog/flask/lib/python2.7/site-packages/Flask_WhooshAlchemy-0.56.dist-info/top_level.txt
new file mode 100644
index 0000000..d94d71a
--- /dev/null
+++ b/Assignments/microblog/flask/lib/python2.7/site-packages/Flask_WhooshAlchemy-0.56.dist-info/top_level.txt
@@ -0,0 +1 @@
+flask_whooshalchemy
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/Jinja2-2.8.dist-info/DESCRIPTION.rst b/Assignments/microblog/flask/lib/python2.7/site-packages/Jinja2-2.8.dist-info/DESCRIPTION.rst
new file mode 100644
index 0000000..4421f04
--- /dev/null
+++ b/Assignments/microblog/flask/lib/python2.7/site-packages/Jinja2-2.8.dist-info/DESCRIPTION.rst
@@ -0,0 +1,36 @@
+Jinja2
+~~~~~~
+
+Jinja2 is a template engine written in pure Python. It provides a
+`Django`_ inspired non-XML syntax but supports inline expressions and
+an optional `sandboxed`_ environment.
+
+Nutshell
+--------
+
+Here a small example of a Jinja template::
+
+ {% extends 'base.html' %}
+ {% block title %}Memberlist{% endblock %}
+ {% block content %}
+
+ {% endblock %}
+
+Philosophy
+----------
+
+Application logic is for the controller but don't try to make the life
+for the template designer too hard by giving him too few functionality.
+
+For more informations visit the new `Jinja2 webpage`_ and `documentation`_.
+
+.. _sandboxed: http://en.wikipedia.org/wiki/Sandbox_(computer_security)
+.. _Django: http://www.djangoproject.com/
+.. _Jinja2 webpage: http://jinja.pocoo.org/
+.. _documentation: http://jinja.pocoo.org/2/documentation/
+
+
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/Jinja2-2.8.dist-info/INSTALLER b/Assignments/microblog/flask/lib/python2.7/site-packages/Jinja2-2.8.dist-info/INSTALLER
new file mode 100644
index 0000000..a1b589e
--- /dev/null
+++ b/Assignments/microblog/flask/lib/python2.7/site-packages/Jinja2-2.8.dist-info/INSTALLER
@@ -0,0 +1 @@
+pip
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/Jinja2-2.8.dist-info/METADATA b/Assignments/microblog/flask/lib/python2.7/site-packages/Jinja2-2.8.dist-info/METADATA
new file mode 100644
index 0000000..304d7c9
--- /dev/null
+++ b/Assignments/microblog/flask/lib/python2.7/site-packages/Jinja2-2.8.dist-info/METADATA
@@ -0,0 +1,63 @@
+Metadata-Version: 2.0
+Name: Jinja2
+Version: 2.8
+Summary: A small but fast and easy to use stand-alone template engine written in pure python.
+Home-page: http://jinja.pocoo.org/
+Author: Armin Ronacher
+Author-email: armin.ronacher@active-4.com
+License: BSD
+Platform: UNKNOWN
+Classifier: Development Status :: 5 - Production/Stable
+Classifier: Environment :: Web Environment
+Classifier: Intended Audience :: Developers
+Classifier: License :: OSI Approved :: BSD License
+Classifier: Operating System :: OS Independent
+Classifier: Programming Language :: Python
+Classifier: Programming Language :: Python :: 2
+Classifier: Programming Language :: Python :: 2.6
+Classifier: Programming Language :: Python :: 2.7
+Classifier: Programming Language :: Python :: 3
+Classifier: Programming Language :: Python :: 3.3
+Classifier: Topic :: Internet :: WWW/HTTP :: Dynamic Content
+Classifier: Topic :: Software Development :: Libraries :: Python Modules
+Classifier: Topic :: Text Processing :: Markup :: HTML
+Requires-Dist: MarkupSafe
+Provides-Extra: i18n
+Requires-Dist: Babel (>=0.8); extra == 'i18n'
+
+Jinja2
+~~~~~~
+
+Jinja2 is a template engine written in pure Python. It provides a
+`Django`_ inspired non-XML syntax but supports inline expressions and
+an optional `sandboxed`_ environment.
+
+Nutshell
+--------
+
+Here a small example of a Jinja template::
+
+ {% extends 'base.html' %}
+ {% block title %}Memberlist{% endblock %}
+ {% block content %}
+
+ {% endblock %}
+
+Philosophy
+----------
+
+Application logic is for the controller but don't try to make the life
+for the template designer too hard by giving him too few functionality.
+
+For more informations visit the new `Jinja2 webpage`_ and `documentation`_.
+
+.. _sandboxed: http://en.wikipedia.org/wiki/Sandbox_(computer_security)
+.. _Django: http://www.djangoproject.com/
+.. _Jinja2 webpage: http://jinja.pocoo.org/
+.. _documentation: http://jinja.pocoo.org/2/documentation/
+
+
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/Jinja2-2.8.dist-info/RECORD b/Assignments/microblog/flask/lib/python2.7/site-packages/Jinja2-2.8.dist-info/RECORD
new file mode 100644
index 0000000..1bdcdbc
--- /dev/null
+++ b/Assignments/microblog/flask/lib/python2.7/site-packages/Jinja2-2.8.dist-info/RECORD
@@ -0,0 +1,54 @@
+jinja2/__init__.py,sha256=c59bnaAFo63I7lYUZlO2UKHj8LPG3JACKnCrwWgvjGY,2326
+jinja2/_compat.py,sha256=O4FnYOMi4HRBfoCKkX137tt3sR6HvpnQNcwqg8ARYog,3109
+jinja2/_stringdefs.py,sha256=SFObWX5vSMeGNc_aSO3_B2EEmScCstFWtjS4K0YFBXk,404291
+jinja2/bccache.py,sha256=EMN9fsvOpwK3DfxQ9F1lmWoxU2Qlo6AnNhPXTsMrw84,12793
+jinja2/compiler.py,sha256=nQmoS6HpGwgDIC8UXkSdjPYiAjbVqZ-Gf4odO-SAR6E,63846
+jinja2/constants.py,sha256=DCr-oKC2xQO-fkOQO3kXRJW7rEYgmcsMRNpPnM66YSU,1626
+jinja2/debug.py,sha256=GEGHM8vFsNFF-kGc0_fwyj1ftMtuyaH4r0nyG-XA9Z8,11553
+jinja2/defaults.py,sha256=eLMOE7JC52QwZBu5Gz4TPZqzoJy9IgV5EynL_pW7MUw,1057
+jinja2/environment.py,sha256=jzJmujSFtxb1HvITO4TdUCOOA-hSZx0gHrxeDZ2VE-M,48120
+jinja2/exceptions.py,sha256=Q9yZOUif-lhVj5BRw0ELjfBvEdBsB7xZobgOvC2qGy4,4428
+jinja2/ext.py,sha256=X-1zCiut1cuxIteKPkJr3jb6odlVE1jciO8RnrMniPE,25072
+jinja2/filters.py,sha256=R4x2flPfyzIjrtItzpGpK4LzBvx-NOlEXH9wD-ZBWtU,30115
+jinja2/lexer.py,sha256=QyiQwAQVEE2YREZJLcA04F3yqv0XOwBbSlWaFW4xJ20,28425
+jinja2/loaders.py,sha256=BgDCvmiB0gH_zPMf-6TMemqtJdrck3IyJ8g0kWUvFa0,17380
+jinja2/meta.py,sha256=cxAOtMuSWWSQX2H8zhYsAtjNwRcNB8Zvs06Y-JlWnbk,4198
+jinja2/nodes.py,sha256=YN6hfFa0WlfToG2r-Q-yhUkAUp0O9l8KulK53mOAVUo,28954
+jinja2/optimizer.py,sha256=bNNKbo5SC5FBUm9dvP-I3GkiXZYBYIER7_g9hK77ZVI,2302
+jinja2/parser.py,sha256=pjLfkZDg2IKJKt_ixNosV-RzwAja5GWYuVeBQumIRns,35442
+jinja2/runtime.py,sha256=Ct36Q9-gVmKer45syS4j3thQ15T_DnLDh6CqvTcnPwQ,22530
+jinja2/sandbox.py,sha256=qgH4CoBsF5NwGj0krqsCOw8sg2mXmfpZKnvmZEE-da4,13327
+jinja2/tests.py,sha256=znB0L_k6wdKp_lQJvxboXwUXDy1HhFe5SSA888tHt_w,4131
+jinja2/utils.py,sha256=pjbOhQJ5NYexu2MbjA66nBibudUkYcQRZbxvbYE0tFk,16560
+jinja2/visitor.py,sha256=3hEAYD26xS_JiJBf4RfcqYPpiuR6efOH8Hh6om59eU8,3316
+Jinja2-2.8.dist-info/DESCRIPTION.rst,sha256=CXIS1UnPSk5_lZBS6Lb8ko-3lqGfjsiUwNBLXCTj2lc,975
+Jinja2-2.8.dist-info/entry_points.txt,sha256=NdzVcOrqyNyKDxD09aERj__3bFx2paZhizFDsKmVhiA,72
+Jinja2-2.8.dist-info/METADATA,sha256=Vio5F8qaEVcGzaCV1rl8tIWEKsHUFSSSAfL0u9oMmGk,2061
+Jinja2-2.8.dist-info/metadata.json,sha256=4TsqsSBwGwy0C2xF_uRZHYsRn2W5Lv4NUMBjTnXPldM,1275
+Jinja2-2.8.dist-info/RECORD,,
+Jinja2-2.8.dist-info/top_level.txt,sha256=PkeVWtLb3-CqjWi1fO29OCbj55EhX_chhKrCdrVe_zs,7
+Jinja2-2.8.dist-info/WHEEL,sha256=AvR0WeTpDaxT645bl5FQxUK6NPsTls2ttpcGJg3j1Xg,110
+Jinja2-2.8.dist-info/INSTALLER,sha256=zuuue4knoyJ-UwPPXg8fezS7VCrXJQrAP7zeNuwvFQg,4
+jinja2/_compat.pyc,,
+jinja2/sandbox.pyc,,
+jinja2/_stringdefs.pyc,,
+jinja2/environment.pyc,,
+jinja2/ext.pyc,,
+jinja2/runtime.pyc,,
+jinja2/utils.pyc,,
+jinja2/parser.pyc,,
+jinja2/debug.pyc,,
+jinja2/bccache.pyc,,
+jinja2/visitor.pyc,,
+jinja2/lexer.pyc,,
+jinja2/defaults.pyc,,
+jinja2/nodes.pyc,,
+jinja2/compiler.pyc,,
+jinja2/exceptions.pyc,,
+jinja2/__init__.pyc,,
+jinja2/constants.pyc,,
+jinja2/meta.pyc,,
+jinja2/loaders.pyc,,
+jinja2/optimizer.pyc,,
+jinja2/filters.pyc,,
+jinja2/tests.pyc,,
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/Jinja2-2.8.dist-info/WHEEL b/Assignments/microblog/flask/lib/python2.7/site-packages/Jinja2-2.8.dist-info/WHEEL
new file mode 100644
index 0000000..9dff69d
--- /dev/null
+++ b/Assignments/microblog/flask/lib/python2.7/site-packages/Jinja2-2.8.dist-info/WHEEL
@@ -0,0 +1,6 @@
+Wheel-Version: 1.0
+Generator: bdist_wheel (0.24.0)
+Root-Is-Purelib: true
+Tag: py2-none-any
+Tag: py3-none-any
+
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/Jinja2-2.8.dist-info/entry_points.txt b/Assignments/microblog/flask/lib/python2.7/site-packages/Jinja2-2.8.dist-info/entry_points.txt
new file mode 100644
index 0000000..32e6b75
--- /dev/null
+++ b/Assignments/microblog/flask/lib/python2.7/site-packages/Jinja2-2.8.dist-info/entry_points.txt
@@ -0,0 +1,4 @@
+
+ [babel.extractors]
+ jinja2 = jinja2.ext:babel_extract[i18n]
+
\ No newline at end of file
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/Jinja2-2.8.dist-info/metadata.json b/Assignments/microblog/flask/lib/python2.7/site-packages/Jinja2-2.8.dist-info/metadata.json
new file mode 100644
index 0000000..f5b1ffa
--- /dev/null
+++ b/Assignments/microblog/flask/lib/python2.7/site-packages/Jinja2-2.8.dist-info/metadata.json
@@ -0,0 +1 @@
+{"license": "BSD", "name": "Jinja2", "metadata_version": "2.0", "generator": "bdist_wheel (0.24.0)", "summary": "A small but fast and easy to use stand-alone template engine written in pure python.", "run_requires": [{"requires": ["Babel (>=0.8)"], "extra": "i18n"}, {"requires": ["MarkupSafe"]}], "version": "2.8", "extensions": {"python.details": {"project_urls": {"Home": "http://jinja.pocoo.org/"}, "document_names": {"description": "DESCRIPTION.rst"}, "contacts": [{"role": "author", "email": "armin.ronacher@active-4.com", "name": "Armin Ronacher"}]}, "python.exports": {"babel.extractors": {"jinja2": "jinja2.ext:babel_extract [i18n]"}}}, "classifiers": ["Development Status :: 5 - Production/Stable", "Environment :: Web Environment", "Intended Audience :: Developers", "License :: OSI Approved :: BSD License", "Operating System :: OS Independent", "Programming Language :: Python", "Programming Language :: Python :: 2", "Programming Language :: Python :: 2.6", "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.3", "Topic :: Internet :: WWW/HTTP :: Dynamic Content", "Topic :: Software Development :: Libraries :: Python Modules", "Topic :: Text Processing :: Markup :: HTML"], "extras": ["i18n"]}
\ No newline at end of file
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/Jinja2-2.8.dist-info/top_level.txt b/Assignments/microblog/flask/lib/python2.7/site-packages/Jinja2-2.8.dist-info/top_level.txt
new file mode 100644
index 0000000..7f7afbf
--- /dev/null
+++ b/Assignments/microblog/flask/lib/python2.7/site-packages/Jinja2-2.8.dist-info/top_level.txt
@@ -0,0 +1 @@
+jinja2
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/MarkupSafe-0.23-py2.7.egg-info/PKG-INFO b/Assignments/microblog/flask/lib/python2.7/site-packages/MarkupSafe-0.23-py2.7.egg-info/PKG-INFO
new file mode 100644
index 0000000..12aa93e
--- /dev/null
+++ b/Assignments/microblog/flask/lib/python2.7/site-packages/MarkupSafe-0.23-py2.7.egg-info/PKG-INFO
@@ -0,0 +1,119 @@
+Metadata-Version: 1.1
+Name: MarkupSafe
+Version: 0.23
+Summary: Implements a XML/HTML/XHTML Markup safe string for Python
+Home-page: http://github.com/mitsuhiko/markupsafe
+Author: Armin Ronacher
+Author-email: armin.ronacher@active-4.com
+License: BSD
+Description: MarkupSafe
+ ==========
+
+ Implements a unicode subclass that supports HTML strings:
+
+ >>> from markupsafe import Markup, escape
+ >>> escape("")
+ Markup(u'<script>alert(document.cookie);</script>')
+ >>> tmpl = Markup("%s")
+ >>> tmpl % "Peter > Lustig"
+ Markup(u'Peter > Lustig')
+
+ If you want to make an object unicode that is not yet unicode
+ but don't want to lose the taint information, you can use the
+ `soft_unicode` function. (On Python 3 you can also use `soft_str` which
+ is a different name for the same function).
+
+ >>> from markupsafe import soft_unicode
+ >>> soft_unicode(42)
+ u'42'
+ >>> soft_unicode(Markup('foo'))
+ Markup(u'foo')
+
+ HTML Representations
+ --------------------
+
+ Objects can customize their HTML markup equivalent by overriding
+ the `__html__` function:
+
+ >>> class Foo(object):
+ ... def __html__(self):
+ ... return 'Nice'
+ ...
+ >>> escape(Foo())
+ Markup(u'Nice')
+ >>> Markup(Foo())
+ Markup(u'Nice')
+
+ Silent Escapes
+ --------------
+
+ Since MarkupSafe 0.10 there is now also a separate escape function
+ called `escape_silent` that returns an empty string for `None` for
+ consistency with other systems that return empty strings for `None`
+ when escaping (for instance Pylons' webhelpers).
+
+ If you also want to use this for the escape method of the Markup
+ object, you can create your own subclass that does that::
+
+ from markupsafe import Markup, escape_silent as escape
+
+ class SilentMarkup(Markup):
+ __slots__ = ()
+
+ @classmethod
+ def escape(cls, s):
+ return cls(escape(s))
+
+ New-Style String Formatting
+ ---------------------------
+
+ Starting with MarkupSafe 0.21 new style string formats from Python 2.6 and
+ 3.x are now fully supported. Previously the escape behavior of those
+ functions was spotty at best. The new implementations operates under the
+ following algorithm:
+
+ 1. if an object has an ``__html_format__`` method it is called as
+ replacement for ``__format__`` with the format specifier. It either
+ has to return a string or markup object.
+ 2. if an object has an ``__html__`` method it is called.
+ 3. otherwise the default format system of Python kicks in and the result
+ is HTML escaped.
+
+ Here is how you can implement your own formatting::
+
+ class User(object):
+
+ def __init__(self, id, username):
+ self.id = id
+ self.username = username
+
+ def __html_format__(self, format_spec):
+ if format_spec == 'link':
+ return Markup('{1}').format(
+ self.id,
+ self.__html__(),
+ )
+ elif format_spec:
+ raise ValueError('Invalid format spec')
+ return self.__html__()
+
+ def __html__(self):
+ return Markup('{0}').format(self.username)
+
+ And to format that user:
+
+ >>> user = User(1, 'foo')
+ >>> Markup('User: {0:link}').format(user)
+ Markup(u'
User: foo')
+
+Platform: UNKNOWN
+Classifier: Development Status :: 5 - Production/Stable
+Classifier: Environment :: Web Environment
+Classifier: Intended Audience :: Developers
+Classifier: License :: OSI Approved :: BSD License
+Classifier: Operating System :: OS Independent
+Classifier: Programming Language :: Python
+Classifier: Programming Language :: Python :: 3
+Classifier: Topic :: Internet :: WWW/HTTP :: Dynamic Content
+Classifier: Topic :: Software Development :: Libraries :: Python Modules
+Classifier: Topic :: Text Processing :: Markup :: HTML
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/MarkupSafe-0.23-py2.7.egg-info/SOURCES.txt b/Assignments/microblog/flask/lib/python2.7/site-packages/MarkupSafe-0.23-py2.7.egg-info/SOURCES.txt
new file mode 100644
index 0000000..dfeb82b
--- /dev/null
+++ b/Assignments/microblog/flask/lib/python2.7/site-packages/MarkupSafe-0.23-py2.7.egg-info/SOURCES.txt
@@ -0,0 +1,17 @@
+AUTHORS
+LICENSE
+MANIFEST.in
+README.rst
+setup.cfg
+setup.py
+MarkupSafe.egg-info/PKG-INFO
+MarkupSafe.egg-info/SOURCES.txt
+MarkupSafe.egg-info/dependency_links.txt
+MarkupSafe.egg-info/not-zip-safe
+MarkupSafe.egg-info/top_level.txt
+markupsafe/__init__.py
+markupsafe/_compat.py
+markupsafe/_constants.py
+markupsafe/_native.py
+markupsafe/_speedups.c
+markupsafe/tests.py
\ No newline at end of file
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/MarkupSafe-0.23-py2.7.egg-info/dependency_links.txt b/Assignments/microblog/flask/lib/python2.7/site-packages/MarkupSafe-0.23-py2.7.egg-info/dependency_links.txt
new file mode 100644
index 0000000..8b13789
--- /dev/null
+++ b/Assignments/microblog/flask/lib/python2.7/site-packages/MarkupSafe-0.23-py2.7.egg-info/dependency_links.txt
@@ -0,0 +1 @@
+
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/MarkupSafe-0.23-py2.7.egg-info/installed-files.txt b/Assignments/microblog/flask/lib/python2.7/site-packages/MarkupSafe-0.23-py2.7.egg-info/installed-files.txt
new file mode 100644
index 0000000..403ff3c
--- /dev/null
+++ b/Assignments/microblog/flask/lib/python2.7/site-packages/MarkupSafe-0.23-py2.7.egg-info/installed-files.txt
@@ -0,0 +1,16 @@
+../markupsafe/_constants.py
+../markupsafe/_compat.py
+../markupsafe/_native.py
+../markupsafe/__init__.py
+../markupsafe/tests.py
+../markupsafe/_speedups.c
+../markupsafe/_constants.pyc
+../markupsafe/_compat.pyc
+../markupsafe/_native.pyc
+../markupsafe/__init__.pyc
+../markupsafe/tests.pyc
+dependency_links.txt
+top_level.txt
+not-zip-safe
+PKG-INFO
+SOURCES.txt
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/MarkupSafe-0.23-py2.7.egg-info/not-zip-safe b/Assignments/microblog/flask/lib/python2.7/site-packages/MarkupSafe-0.23-py2.7.egg-info/not-zip-safe
new file mode 100644
index 0000000..8b13789
--- /dev/null
+++ b/Assignments/microblog/flask/lib/python2.7/site-packages/MarkupSafe-0.23-py2.7.egg-info/not-zip-safe
@@ -0,0 +1 @@
+
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/MarkupSafe-0.23-py2.7.egg-info/top_level.txt b/Assignments/microblog/flask/lib/python2.7/site-packages/MarkupSafe-0.23-py2.7.egg-info/top_level.txt
new file mode 100644
index 0000000..75bf729
--- /dev/null
+++ b/Assignments/microblog/flask/lib/python2.7/site-packages/MarkupSafe-0.23-py2.7.egg-info/top_level.txt
@@ -0,0 +1 @@
+markupsafe
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/MarkupSafe-0.23.dist-info/DESCRIPTION.rst b/Assignments/microblog/flask/lib/python2.7/site-packages/MarkupSafe-0.23.dist-info/DESCRIPTION.rst
new file mode 100644
index 0000000..67256b9
--- /dev/null
+++ b/Assignments/microblog/flask/lib/python2.7/site-packages/MarkupSafe-0.23.dist-info/DESCRIPTION.rst
@@ -0,0 +1,101 @@
+MarkupSafe
+==========
+
+Implements a unicode subclass that supports HTML strings:
+
+>>> from markupsafe import Markup, escape
+>>> escape("")
+Markup(u'<script>alert(document.cookie);</script>')
+>>> tmpl = Markup("%s")
+>>> tmpl % "Peter > Lustig"
+Markup(u'Peter > Lustig')
+
+If you want to make an object unicode that is not yet unicode
+but don't want to lose the taint information, you can use the
+`soft_unicode` function. (On Python 3 you can also use `soft_str` which
+is a different name for the same function).
+
+>>> from markupsafe import soft_unicode
+>>> soft_unicode(42)
+u'42'
+>>> soft_unicode(Markup('foo'))
+Markup(u'foo')
+
+HTML Representations
+--------------------
+
+Objects can customize their HTML markup equivalent by overriding
+the `__html__` function:
+
+>>> class Foo(object):
+... def __html__(self):
+... return 'Nice'
+...
+>>> escape(Foo())
+Markup(u'Nice')
+>>> Markup(Foo())
+Markup(u'Nice')
+
+Silent Escapes
+--------------
+
+Since MarkupSafe 0.10 there is now also a separate escape function
+called `escape_silent` that returns an empty string for `None` for
+consistency with other systems that return empty strings for `None`
+when escaping (for instance Pylons' webhelpers).
+
+If you also want to use this for the escape method of the Markup
+object, you can create your own subclass that does that::
+
+ from markupsafe import Markup, escape_silent as escape
+
+ class SilentMarkup(Markup):
+ __slots__ = ()
+
+ @classmethod
+ def escape(cls, s):
+ return cls(escape(s))
+
+New-Style String Formatting
+---------------------------
+
+Starting with MarkupSafe 0.21 new style string formats from Python 2.6 and
+3.x are now fully supported. Previously the escape behavior of those
+functions was spotty at best. The new implementations operates under the
+following algorithm:
+
+1. if an object has an ``__html_format__`` method it is called as
+ replacement for ``__format__`` with the format specifier. It either
+ has to return a string or markup object.
+2. if an object has an ``__html__`` method it is called.
+3. otherwise the default format system of Python kicks in and the result
+ is HTML escaped.
+
+Here is how you can implement your own formatting::
+
+ class User(object):
+
+ def __init__(self, id, username):
+ self.id = id
+ self.username = username
+
+ def __html_format__(self, format_spec):
+ if format_spec == 'link':
+ return Markup('{1}').format(
+ self.id,
+ self.__html__(),
+ )
+ elif format_spec:
+ raise ValueError('Invalid format spec')
+ return self.__html__()
+
+ def __html__(self):
+ return Markup('{0}').format(self.username)
+
+And to format that user:
+
+>>> user = User(1, 'foo')
+>>> Markup('
User: {0:link}').format(user)
+Markup(u'
User: foo')
+
+
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/MarkupSafe-0.23.dist-info/INSTALLER b/Assignments/microblog/flask/lib/python2.7/site-packages/MarkupSafe-0.23.dist-info/INSTALLER
new file mode 100644
index 0000000..a1b589e
--- /dev/null
+++ b/Assignments/microblog/flask/lib/python2.7/site-packages/MarkupSafe-0.23.dist-info/INSTALLER
@@ -0,0 +1 @@
+pip
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/MarkupSafe-0.23.dist-info/METADATA b/Assignments/microblog/flask/lib/python2.7/site-packages/MarkupSafe-0.23.dist-info/METADATA
new file mode 100644
index 0000000..d06751b
--- /dev/null
+++ b/Assignments/microblog/flask/lib/python2.7/site-packages/MarkupSafe-0.23.dist-info/METADATA
@@ -0,0 +1,121 @@
+Metadata-Version: 2.0
+Name: MarkupSafe
+Version: 0.23
+Summary: Implements a XML/HTML/XHTML Markup safe string for Python
+Home-page: http://github.com/mitsuhiko/markupsafe
+Author: Armin Ronacher
+Author-email: armin.ronacher@active-4.com
+License: BSD
+Platform: UNKNOWN
+Classifier: Development Status :: 5 - Production/Stable
+Classifier: Environment :: Web Environment
+Classifier: Intended Audience :: Developers
+Classifier: License :: OSI Approved :: BSD License
+Classifier: Operating System :: OS Independent
+Classifier: Programming Language :: Python
+Classifier: Programming Language :: Python :: 3
+Classifier: Topic :: Internet :: WWW/HTTP :: Dynamic Content
+Classifier: Topic :: Software Development :: Libraries :: Python Modules
+Classifier: Topic :: Text Processing :: Markup :: HTML
+
+MarkupSafe
+==========
+
+Implements a unicode subclass that supports HTML strings:
+
+>>> from markupsafe import Markup, escape
+>>> escape("")
+Markup(u'<script>alert(document.cookie);</script>')
+>>> tmpl = Markup("%s")
+>>> tmpl % "Peter > Lustig"
+Markup(u'Peter > Lustig')
+
+If you want to make an object unicode that is not yet unicode
+but don't want to lose the taint information, you can use the
+`soft_unicode` function. (On Python 3 you can also use `soft_str` which
+is a different name for the same function).
+
+>>> from markupsafe import soft_unicode
+>>> soft_unicode(42)
+u'42'
+>>> soft_unicode(Markup('foo'))
+Markup(u'foo')
+
+HTML Representations
+--------------------
+
+Objects can customize their HTML markup equivalent by overriding
+the `__html__` function:
+
+>>> class Foo(object):
+... def __html__(self):
+... return 'Nice'
+...
+>>> escape(Foo())
+Markup(u'Nice')
+>>> Markup(Foo())
+Markup(u'Nice')
+
+Silent Escapes
+--------------
+
+Since MarkupSafe 0.10 there is now also a separate escape function
+called `escape_silent` that returns an empty string for `None` for
+consistency with other systems that return empty strings for `None`
+when escaping (for instance Pylons' webhelpers).
+
+If you also want to use this for the escape method of the Markup
+object, you can create your own subclass that does that::
+
+ from markupsafe import Markup, escape_silent as escape
+
+ class SilentMarkup(Markup):
+ __slots__ = ()
+
+ @classmethod
+ def escape(cls, s):
+ return cls(escape(s))
+
+New-Style String Formatting
+---------------------------
+
+Starting with MarkupSafe 0.21 new style string formats from Python 2.6 and
+3.x are now fully supported. Previously the escape behavior of those
+functions was spotty at best. The new implementations operates under the
+following algorithm:
+
+1. if an object has an ``__html_format__`` method it is called as
+ replacement for ``__format__`` with the format specifier. It either
+ has to return a string or markup object.
+2. if an object has an ``__html__`` method it is called.
+3. otherwise the default format system of Python kicks in and the result
+ is HTML escaped.
+
+Here is how you can implement your own formatting::
+
+ class User(object):
+
+ def __init__(self, id, username):
+ self.id = id
+ self.username = username
+
+ def __html_format__(self, format_spec):
+ if format_spec == 'link':
+ return Markup('{1}').format(
+ self.id,
+ self.__html__(),
+ )
+ elif format_spec:
+ raise ValueError('Invalid format spec')
+ return self.__html__()
+
+ def __html__(self):
+ return Markup('{0}').format(self.username)
+
+And to format that user:
+
+>>> user = User(1, 'foo')
+>>> Markup('
User: {0:link}').format(user)
+Markup(u'
User: foo')
+
+
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/MarkupSafe-0.23.dist-info/RECORD b/Assignments/microblog/flask/lib/python2.7/site-packages/MarkupSafe-0.23.dist-info/RECORD
new file mode 100644
index 0000000..933507c
--- /dev/null
+++ b/Assignments/microblog/flask/lib/python2.7/site-packages/MarkupSafe-0.23.dist-info/RECORD
@@ -0,0 +1,18 @@
+MarkupSafe-0.23.dist-info/DESCRIPTION.rst,sha256=VnEbwPneiOkqh-nzxb0DUiGlcVGHuaDQjsNBLi-yNYw,3091
+MarkupSafe-0.23.dist-info/METADATA,sha256=g-KikeSr9J7vagkJoCt0ViT2ORy9O4NYV7XtRu1Pni8,3879
+MarkupSafe-0.23.dist-info/RECORD,,
+MarkupSafe-0.23.dist-info/WHEEL,sha256=BtVfdXUcEYLcFjOkbIrCFRyXU4qszVPt-E9o3RWkSNw,93
+MarkupSafe-0.23.dist-info/metadata.json,sha256=y9yFyMJYU3UIRc5KfHIY6A3Z6nvJ2lXva5-7Ts2lsvY,901
+MarkupSafe-0.23.dist-info/top_level.txt,sha256=qy0Plje5IJuvsCBjejJyhDCjEAdcDLK_2agVcex8Z6U,11
+markupsafe/__init__.py,sha256=zFQpANILi3mCCALiPd6ZJdlW6ibu_hTKzikMXKXVtaM,10338
+markupsafe/_compat.py,sha256=r1HE0CpcAZeb-AiTV9wITR91PeLHn0CzZ_XHkYoozpI,565
+markupsafe/_constants.py,sha256=U_xybFQsyXKCgHSfranJnFzo-z9nn9fuBeSk243sE5Q,4795
+markupsafe/_native.py,sha256=E2Un1ysOf-w45d18YCj8UelT5UP7Vt__IuFPYJ7YRIs,1187
+markupsafe/_speedups.c,sha256=gZwPEM_0zcbAzJjPuPYXk97R67QR1uUGtDvOPsvirCA,5939
+markupsafe/tests.py,sha256=RLI4eYI0ICNZwkoN638VHXf_fDu4d_jnvbGr22j58Ng,6107
+MarkupSafe-0.23.dist-info/INSTALLER,sha256=zuuue4knoyJ-UwPPXg8fezS7VCrXJQrAP7zeNuwvFQg,4
+markupsafe/_constants.pyc,,
+markupsafe/_compat.pyc,,
+markupsafe/__init__.pyc,,
+markupsafe/_native.pyc,,
+markupsafe/tests.pyc,,
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/MarkupSafe-0.23.dist-info/WHEEL b/Assignments/microblog/flask/lib/python2.7/site-packages/MarkupSafe-0.23.dist-info/WHEEL
new file mode 100644
index 0000000..5a93381
--- /dev/null
+++ b/Assignments/microblog/flask/lib/python2.7/site-packages/MarkupSafe-0.23.dist-info/WHEEL
@@ -0,0 +1,5 @@
+Wheel-Version: 1.0
+Generator: bdist_wheel (0.29.0)
+Root-Is-Purelib: true
+Tag: cp27-none-any
+
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/MarkupSafe-0.23.dist-info/metadata.json b/Assignments/microblog/flask/lib/python2.7/site-packages/MarkupSafe-0.23.dist-info/metadata.json
new file mode 100644
index 0000000..21fcd69
--- /dev/null
+++ b/Assignments/microblog/flask/lib/python2.7/site-packages/MarkupSafe-0.23.dist-info/metadata.json
@@ -0,0 +1 @@
+{"classifiers": ["Development Status :: 5 - Production/Stable", "Environment :: Web Environment", "Intended Audience :: Developers", "License :: OSI Approved :: BSD License", "Operating System :: OS Independent", "Programming Language :: Python", "Programming Language :: Python :: 3", "Topic :: Internet :: WWW/HTTP :: Dynamic Content", "Topic :: Software Development :: Libraries :: Python Modules", "Topic :: Text Processing :: Markup :: HTML"], "extensions": {"python.details": {"contacts": [{"email": "armin.ronacher@active-4.com", "name": "Armin Ronacher", "role": "author"}], "document_names": {"description": "DESCRIPTION.rst"}, "project_urls": {"Home": "http://github.com/mitsuhiko/markupsafe"}}}, "generator": "bdist_wheel (0.29.0)", "license": "BSD", "metadata_version": "2.0", "name": "MarkupSafe", "summary": "Implements a XML/HTML/XHTML Markup safe string for Python", "version": "0.23"}
\ No newline at end of file
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/MarkupSafe-0.23.dist-info/top_level.txt b/Assignments/microblog/flask/lib/python2.7/site-packages/MarkupSafe-0.23.dist-info/top_level.txt
new file mode 100644
index 0000000..75bf729
--- /dev/null
+++ b/Assignments/microblog/flask/lib/python2.7/site-packages/MarkupSafe-0.23.dist-info/top_level.txt
@@ -0,0 +1 @@
+markupsafe
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/SQLAlchemy-1.0.13-py2.7.egg-info/PKG-INFO b/Assignments/microblog/flask/lib/python2.7/site-packages/SQLAlchemy-1.0.13-py2.7.egg-info/PKG-INFO
new file mode 100644
index 0000000..6705ec2
--- /dev/null
+++ b/Assignments/microblog/flask/lib/python2.7/site-packages/SQLAlchemy-1.0.13-py2.7.egg-info/PKG-INFO
@@ -0,0 +1,155 @@
+Metadata-Version: 1.1
+Name: SQLAlchemy
+Version: 1.0.13
+Summary: Database Abstraction Library
+Home-page: http://www.sqlalchemy.org
+Author: Mike Bayer
+Author-email: mike_mp@zzzcomputing.com
+License: MIT License
+Description: SQLAlchemy
+ ==========
+
+ The Python SQL Toolkit and Object Relational Mapper
+
+ Introduction
+ -------------
+
+ SQLAlchemy is the Python SQL toolkit and Object Relational Mapper
+ that gives application developers the full power and
+ flexibility of SQL. SQLAlchemy provides a full suite
+ of well known enterprise-level persistence patterns,
+ designed for efficient and high-performing database
+ access, adapted into a simple and Pythonic domain
+ language.
+
+ Major SQLAlchemy features include:
+
+ * An industrial strength ORM, built
+ from the core on the identity map, unit of work,
+ and data mapper patterns. These patterns
+ allow transparent persistence of objects
+ using a declarative configuration system.
+ Domain models
+ can be constructed and manipulated naturally,
+ and changes are synchronized with the
+ current transaction automatically.
+ * A relationally-oriented query system, exposing
+ the full range of SQL's capabilities
+ explicitly, including joins, subqueries,
+ correlation, and most everything else,
+ in terms of the object model.
+ Writing queries with the ORM uses the same
+ techniques of relational composition you use
+ when writing SQL. While you can drop into
+ literal SQL at any time, it's virtually never
+ needed.
+ * A comprehensive and flexible system
+ of eager loading for related collections and objects.
+ Collections are cached within a session,
+ and can be loaded on individual access, all
+ at once using joins, or by query per collection
+ across the full result set.
+ * A Core SQL construction system and DBAPI
+ interaction layer. The SQLAlchemy Core is
+ separate from the ORM and is a full database
+ abstraction layer in its own right, and includes
+ an extensible Python-based SQL expression
+ language, schema metadata, connection pooling,
+ type coercion, and custom types.
+ * All primary and foreign key constraints are
+ assumed to be composite and natural. Surrogate
+ integer primary keys are of course still the
+ norm, but SQLAlchemy never assumes or hardcodes
+ to this model.
+ * Database introspection and generation. Database
+ schemas can be "reflected" in one step into
+ Python structures representing database metadata;
+ those same structures can then generate
+ CREATE statements right back out - all within
+ the Core, independent of the ORM.
+
+ SQLAlchemy's philosophy:
+
+ * SQL databases behave less and less like object
+ collections the more size and performance start to
+ matter; object collections behave less and less like
+ tables and rows the more abstraction starts to matter.
+ SQLAlchemy aims to accommodate both of these
+ principles.
+ * An ORM doesn't need to hide the "R". A relational
+ database provides rich, set-based functionality
+ that should be fully exposed. SQLAlchemy's
+ ORM provides an open-ended set of patterns
+ that allow a developer to construct a custom
+ mediation layer between a domain model and
+ a relational schema, turning the so-called
+ "object relational impedance" issue into
+ a distant memory.
+ * The developer, in all cases, makes all decisions
+ regarding the design, structure, and naming conventions
+ of both the object model as well as the relational
+ schema. SQLAlchemy only provides the means
+ to automate the execution of these decisions.
+ * With SQLAlchemy, there's no such thing as
+ "the ORM generated a bad query" - you
+ retain full control over the structure of
+ queries, including how joins are organized,
+ how subqueries and correlation is used, what
+ columns are requested. Everything SQLAlchemy
+ does is ultimately the result of a developer-
+ initiated decision.
+ * Don't use an ORM if the problem doesn't need one.
+ SQLAlchemy consists of a Core and separate ORM
+ component. The Core offers a full SQL expression
+ language that allows Pythonic construction
+ of SQL constructs that render directly to SQL
+ strings for a target database, returning
+ result sets that are essentially enhanced DBAPI
+ cursors.
+ * Transactions should be the norm. With SQLAlchemy's
+ ORM, nothing goes to permanent storage until
+ commit() is called. SQLAlchemy encourages applications
+ to create a consistent means of delineating
+ the start and end of a series of operations.
+ * Never render a literal value in a SQL statement.
+ Bound parameters are used to the greatest degree
+ possible, allowing query optimizers to cache
+ query plans effectively and making SQL injection
+ attacks a non-issue.
+
+ Documentation
+ -------------
+
+ Latest documentation is at:
+
+ http://www.sqlalchemy.org/docs/
+
+ Installation / Requirements
+ ---------------------------
+
+ Full documentation for installation is at
+ `Installation `_.
+
+ Getting Help / Development / Bug reporting
+ ------------------------------------------
+
+ Please refer to the `SQLAlchemy Community Guide `_.
+
+ License
+ -------
+
+ SQLAlchemy is distributed under the `MIT license
+ `_.
+
+
+Platform: UNKNOWN
+Classifier: Development Status :: 5 - Production/Stable
+Classifier: Intended Audience :: Developers
+Classifier: License :: OSI Approved :: MIT License
+Classifier: Programming Language :: Python
+Classifier: Programming Language :: Python :: 3
+Classifier: Programming Language :: Python :: Implementation :: CPython
+Classifier: Programming Language :: Python :: Implementation :: Jython
+Classifier: Programming Language :: Python :: Implementation :: PyPy
+Classifier: Topic :: Database :: Front-Ends
+Classifier: Operating System :: OS Independent
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/SQLAlchemy-1.0.13-py2.7.egg-info/SOURCES.txt b/Assignments/microblog/flask/lib/python2.7/site-packages/SQLAlchemy-1.0.13-py2.7.egg-info/SOURCES.txt
new file mode 100644
index 0000000..f69f69f
--- /dev/null
+++ b/Assignments/microblog/flask/lib/python2.7/site-packages/SQLAlchemy-1.0.13-py2.7.egg-info/SOURCES.txt
@@ -0,0 +1,786 @@
+AUTHORS
+CHANGES
+LICENSE
+MANIFEST.in
+README.dialects.rst
+README.rst
+README.unittests.rst
+setup.cfg
+setup.py
+sqla_nose.py
+tox.ini
+doc/contents.html
+doc/copyright.html
+doc/genindex.html
+doc/glossary.html
+doc/index.html
+doc/intro.html
+doc/search.html
+doc/searchindex.js
+doc/_images/sqla_arch_small.png
+doc/_images/sqla_engine_arch.png
+doc/_modules/index.html
+doc/_modules/examples/adjacency_list/adjacency_list.html
+doc/_modules/examples/association/basic_association.html
+doc/_modules/examples/association/dict_of_sets_with_default.html
+doc/_modules/examples/association/proxied_association.html
+doc/_modules/examples/custom_attributes/custom_management.html
+doc/_modules/examples/custom_attributes/listen_for_events.html
+doc/_modules/examples/dogpile_caching/advanced.html
+doc/_modules/examples/dogpile_caching/caching_query.html
+doc/_modules/examples/dogpile_caching/environment.html
+doc/_modules/examples/dogpile_caching/fixture_data.html
+doc/_modules/examples/dogpile_caching/helloworld.html
+doc/_modules/examples/dogpile_caching/local_session_caching.html
+doc/_modules/examples/dogpile_caching/model.html
+doc/_modules/examples/dogpile_caching/relationship_caching.html
+doc/_modules/examples/dynamic_dict/dynamic_dict.html
+doc/_modules/examples/elementtree/adjacency_list.html
+doc/_modules/examples/elementtree/optimized_al.html
+doc/_modules/examples/elementtree/pickle.html
+doc/_modules/examples/generic_associations/discriminator_on_association.html
+doc/_modules/examples/generic_associations/generic_fk.html
+doc/_modules/examples/generic_associations/table_per_association.html
+doc/_modules/examples/generic_associations/table_per_related.html
+doc/_modules/examples/graphs/directed_graph.html
+doc/_modules/examples/inheritance/concrete.html
+doc/_modules/examples/inheritance/joined.html
+doc/_modules/examples/inheritance/single.html
+doc/_modules/examples/join_conditions/cast.html
+doc/_modules/examples/join_conditions/threeway.html
+doc/_modules/examples/large_collection/large_collection.html
+doc/_modules/examples/materialized_paths/materialized_paths.html
+doc/_modules/examples/nested_sets/nested_sets.html
+doc/_modules/examples/performance/__main__.html
+doc/_modules/examples/performance/bulk_inserts.html
+doc/_modules/examples/performance/bulk_updates.html
+doc/_modules/examples/performance/large_resultsets.html
+doc/_modules/examples/performance/short_selects.html
+doc/_modules/examples/performance/single_inserts.html
+doc/_modules/examples/postgis/postgis.html
+doc/_modules/examples/sharding/attribute_shard.html
+doc/_modules/examples/versioned_history/history_meta.html
+doc/_modules/examples/versioned_history/test_versioning.html
+doc/_modules/examples/versioned_rows/versioned_map.html
+doc/_modules/examples/versioned_rows/versioned_rows.html
+doc/_modules/examples/vertical/dictlike-polymorphic.html
+doc/_modules/examples/vertical/dictlike.html
+doc/_static/basic.css
+doc/_static/changelog.css
+doc/_static/comment-bright.png
+doc/_static/comment-close.png
+doc/_static/comment.png
+doc/_static/detectmobile.js
+doc/_static/docs.css
+doc/_static/doctools.js
+doc/_static/down-pressed.png
+doc/_static/down.png
+doc/_static/file.png
+doc/_static/init.js
+doc/_static/jquery-1.11.1.js
+doc/_static/jquery.js
+doc/_static/minus.png
+doc/_static/plus.png
+doc/_static/pygments.css
+doc/_static/searchtools.js
+doc/_static/sphinx_paramlinks.css
+doc/_static/underscore-1.3.1.js
+doc/_static/underscore.js
+doc/_static/up-pressed.png
+doc/_static/up.png
+doc/_static/websupport.js
+doc/build/Makefile
+doc/build/conf.py
+doc/build/contents.rst
+doc/build/copyright.rst
+doc/build/corrections.py
+doc/build/glossary.rst
+doc/build/index.rst
+doc/build/intro.rst
+doc/build/requirements.txt
+doc/build/sqla_arch_small.png
+doc/build/changelog/changelog_01.rst
+doc/build/changelog/changelog_02.rst
+doc/build/changelog/changelog_03.rst
+doc/build/changelog/changelog_04.rst
+doc/build/changelog/changelog_05.rst
+doc/build/changelog/changelog_06.rst
+doc/build/changelog/changelog_07.rst
+doc/build/changelog/changelog_08.rst
+doc/build/changelog/changelog_09.rst
+doc/build/changelog/changelog_10.rst
+doc/build/changelog/index.rst
+doc/build/changelog/migration_04.rst
+doc/build/changelog/migration_05.rst
+doc/build/changelog/migration_06.rst
+doc/build/changelog/migration_07.rst
+doc/build/changelog/migration_08.rst
+doc/build/changelog/migration_09.rst
+doc/build/changelog/migration_10.rst
+doc/build/core/api_basics.rst
+doc/build/core/compiler.rst
+doc/build/core/connections.rst
+doc/build/core/constraints.rst
+doc/build/core/custom_types.rst
+doc/build/core/ddl.rst
+doc/build/core/defaults.rst
+doc/build/core/dml.rst
+doc/build/core/engines.rst
+doc/build/core/engines_connections.rst
+doc/build/core/event.rst
+doc/build/core/events.rst
+doc/build/core/exceptions.rst
+doc/build/core/expression_api.rst
+doc/build/core/functions.rst
+doc/build/core/index.rst
+doc/build/core/inspection.rst
+doc/build/core/interfaces.rst
+doc/build/core/internals.rst
+doc/build/core/metadata.rst
+doc/build/core/pooling.rst
+doc/build/core/reflection.rst
+doc/build/core/schema.rst
+doc/build/core/selectable.rst
+doc/build/core/serializer.rst
+doc/build/core/sqla_engine_arch.png
+doc/build/core/sqlelement.rst
+doc/build/core/tutorial.rst
+doc/build/core/type_api.rst
+doc/build/core/type_basics.rst
+doc/build/core/types.rst
+doc/build/dialects/firebird.rst
+doc/build/dialects/index.rst
+doc/build/dialects/mssql.rst
+doc/build/dialects/mysql.rst
+doc/build/dialects/oracle.rst
+doc/build/dialects/postgresql.rst
+doc/build/dialects/sqlite.rst
+doc/build/dialects/sybase.rst
+doc/build/faq/connections.rst
+doc/build/faq/index.rst
+doc/build/faq/metadata_schema.rst
+doc/build/faq/ormconfiguration.rst
+doc/build/faq/performance.rst
+doc/build/faq/sessions.rst
+doc/build/faq/sqlexpressions.rst
+doc/build/orm/backref.rst
+doc/build/orm/basic_relationships.rst
+doc/build/orm/cascades.rst
+doc/build/orm/classical.rst
+doc/build/orm/collections.rst
+doc/build/orm/composites.rst
+doc/build/orm/constructors.rst
+doc/build/orm/contextual.rst
+doc/build/orm/deprecated.rst
+doc/build/orm/events.rst
+doc/build/orm/examples.rst
+doc/build/orm/exceptions.rst
+doc/build/orm/extending.rst
+doc/build/orm/index.rst
+doc/build/orm/inheritance.rst
+doc/build/orm/internals.rst
+doc/build/orm/join_conditions.rst
+doc/build/orm/loading.rst
+doc/build/orm/loading_columns.rst
+doc/build/orm/loading_objects.rst
+doc/build/orm/loading_relationships.rst
+doc/build/orm/mapped_attributes.rst
+doc/build/orm/mapped_sql_expr.rst
+doc/build/orm/mapper_config.rst
+doc/build/orm/mapping_api.rst
+doc/build/orm/mapping_columns.rst
+doc/build/orm/mapping_styles.rst
+doc/build/orm/nonstandard_mappings.rst
+doc/build/orm/persistence_techniques.rst
+doc/build/orm/query.rst
+doc/build/orm/relationship_api.rst
+doc/build/orm/relationship_persistence.rst
+doc/build/orm/relationships.rst
+doc/build/orm/scalar_mapping.rst
+doc/build/orm/self_referential.rst
+doc/build/orm/session.rst
+doc/build/orm/session_api.rst
+doc/build/orm/session_basics.rst
+doc/build/orm/session_events.rst
+doc/build/orm/session_state_management.rst
+doc/build/orm/session_transaction.rst
+doc/build/orm/tutorial.rst
+doc/build/orm/versioning.rst
+doc/build/orm/extensions/associationproxy.rst
+doc/build/orm/extensions/automap.rst
+doc/build/orm/extensions/baked.rst
+doc/build/orm/extensions/horizontal_shard.rst
+doc/build/orm/extensions/hybrid.rst
+doc/build/orm/extensions/index.rst
+doc/build/orm/extensions/instrumentation.rst
+doc/build/orm/extensions/mutable.rst
+doc/build/orm/extensions/orderinglist.rst
+doc/build/orm/extensions/declarative/api.rst
+doc/build/orm/extensions/declarative/basic_use.rst
+doc/build/orm/extensions/declarative/index.rst
+doc/build/orm/extensions/declarative/inheritance.rst
+doc/build/orm/extensions/declarative/mixins.rst
+doc/build/orm/extensions/declarative/relationships.rst
+doc/build/orm/extensions/declarative/table_config.rst
+doc/build/texinputs/Makefile
+doc/build/texinputs/sphinx.sty
+doc/changelog/changelog_01.html
+doc/changelog/changelog_02.html
+doc/changelog/changelog_03.html
+doc/changelog/changelog_04.html
+doc/changelog/changelog_05.html
+doc/changelog/changelog_06.html
+doc/changelog/changelog_07.html
+doc/changelog/changelog_08.html
+doc/changelog/changelog_09.html
+doc/changelog/changelog_10.html
+doc/changelog/index.html
+doc/changelog/migration_04.html
+doc/changelog/migration_05.html
+doc/changelog/migration_06.html
+doc/changelog/migration_07.html
+doc/changelog/migration_08.html
+doc/changelog/migration_09.html
+doc/changelog/migration_10.html
+doc/core/api_basics.html
+doc/core/compiler.html
+doc/core/connections.html
+doc/core/constraints.html
+doc/core/custom_types.html
+doc/core/ddl.html
+doc/core/defaults.html
+doc/core/dml.html
+doc/core/engines.html
+doc/core/engines_connections.html
+doc/core/event.html
+doc/core/events.html
+doc/core/exceptions.html
+doc/core/expression_api.html
+doc/core/functions.html
+doc/core/index.html
+doc/core/inspection.html
+doc/core/interfaces.html
+doc/core/internals.html
+doc/core/metadata.html
+doc/core/pooling.html
+doc/core/reflection.html
+doc/core/schema.html
+doc/core/selectable.html
+doc/core/serializer.html
+doc/core/sqlelement.html
+doc/core/tutorial.html
+doc/core/type_api.html
+doc/core/type_basics.html
+doc/core/types.html
+doc/dialects/firebird.html
+doc/dialects/index.html
+doc/dialects/mssql.html
+doc/dialects/mysql.html
+doc/dialects/oracle.html
+doc/dialects/postgresql.html
+doc/dialects/sqlite.html
+doc/dialects/sybase.html
+doc/faq/connections.html
+doc/faq/index.html
+doc/faq/metadata_schema.html
+doc/faq/ormconfiguration.html
+doc/faq/performance.html
+doc/faq/sessions.html
+doc/faq/sqlexpressions.html
+doc/orm/backref.html
+doc/orm/basic_relationships.html
+doc/orm/cascades.html
+doc/orm/classical.html
+doc/orm/collections.html
+doc/orm/composites.html
+doc/orm/constructors.html
+doc/orm/contextual.html
+doc/orm/deprecated.html
+doc/orm/events.html
+doc/orm/examples.html
+doc/orm/exceptions.html
+doc/orm/extending.html
+doc/orm/index.html
+doc/orm/inheritance.html
+doc/orm/internals.html
+doc/orm/join_conditions.html
+doc/orm/loading.html
+doc/orm/loading_columns.html
+doc/orm/loading_objects.html
+doc/orm/loading_relationships.html
+doc/orm/mapped_attributes.html
+doc/orm/mapped_sql_expr.html
+doc/orm/mapper_config.html
+doc/orm/mapping_api.html
+doc/orm/mapping_columns.html
+doc/orm/mapping_styles.html
+doc/orm/nonstandard_mappings.html
+doc/orm/persistence_techniques.html
+doc/orm/query.html
+doc/orm/relationship_api.html
+doc/orm/relationship_persistence.html
+doc/orm/relationships.html
+doc/orm/scalar_mapping.html
+doc/orm/self_referential.html
+doc/orm/session.html
+doc/orm/session_api.html
+doc/orm/session_basics.html
+doc/orm/session_events.html
+doc/orm/session_state_management.html
+doc/orm/session_transaction.html
+doc/orm/tutorial.html
+doc/orm/versioning.html
+doc/orm/extensions/associationproxy.html
+doc/orm/extensions/automap.html
+doc/orm/extensions/baked.html
+doc/orm/extensions/horizontal_shard.html
+doc/orm/extensions/hybrid.html
+doc/orm/extensions/index.html
+doc/orm/extensions/instrumentation.html
+doc/orm/extensions/mutable.html
+doc/orm/extensions/orderinglist.html
+doc/orm/extensions/declarative/api.html
+doc/orm/extensions/declarative/basic_use.html
+doc/orm/extensions/declarative/index.html
+doc/orm/extensions/declarative/inheritance.html
+doc/orm/extensions/declarative/mixins.html
+doc/orm/extensions/declarative/relationships.html
+doc/orm/extensions/declarative/table_config.html
+examples/__init__.py
+examples/adjacency_list/__init__.py
+examples/adjacency_list/adjacency_list.py
+examples/association/__init__.py
+examples/association/basic_association.py
+examples/association/dict_of_sets_with_default.py
+examples/association/proxied_association.py
+examples/custom_attributes/__init__.py
+examples/custom_attributes/custom_management.py
+examples/custom_attributes/listen_for_events.py
+examples/dogpile_caching/__init__.py
+examples/dogpile_caching/advanced.py
+examples/dogpile_caching/caching_query.py
+examples/dogpile_caching/environment.py
+examples/dogpile_caching/fixture_data.py
+examples/dogpile_caching/helloworld.py
+examples/dogpile_caching/local_session_caching.py
+examples/dogpile_caching/model.py
+examples/dogpile_caching/relationship_caching.py
+examples/dynamic_dict/__init__.py
+examples/dynamic_dict/dynamic_dict.py
+examples/elementtree/__init__.py
+examples/elementtree/adjacency_list.py
+examples/elementtree/optimized_al.py
+examples/elementtree/pickle.py
+examples/elementtree/test.xml
+examples/elementtree/test2.xml
+examples/elementtree/test3.xml
+examples/generic_associations/__init__.py
+examples/generic_associations/discriminator_on_association.py
+examples/generic_associations/generic_fk.py
+examples/generic_associations/table_per_association.py
+examples/generic_associations/table_per_related.py
+examples/graphs/__init__.py
+examples/graphs/directed_graph.py
+examples/inheritance/__init__.py
+examples/inheritance/concrete.py
+examples/inheritance/joined.py
+examples/inheritance/single.py
+examples/join_conditions/__init__.py
+examples/join_conditions/cast.py
+examples/join_conditions/threeway.py
+examples/large_collection/__init__.py
+examples/large_collection/large_collection.py
+examples/materialized_paths/__init__.py
+examples/materialized_paths/materialized_paths.py
+examples/nested_sets/__init__.py
+examples/nested_sets/nested_sets.py
+examples/performance/__init__.py
+examples/performance/__main__.py
+examples/performance/bulk_inserts.py
+examples/performance/bulk_updates.py
+examples/performance/large_resultsets.py
+examples/performance/short_selects.py
+examples/performance/single_inserts.py
+examples/postgis/__init__.py
+examples/postgis/postgis.py
+examples/sharding/__init__.py
+examples/sharding/attribute_shard.py
+examples/versioned_history/__init__.py
+examples/versioned_history/history_meta.py
+examples/versioned_history/test_versioning.py
+examples/versioned_rows/__init__.py
+examples/versioned_rows/versioned_map.py
+examples/versioned_rows/versioned_rows.py
+examples/vertical/__init__.py
+examples/vertical/dictlike-polymorphic.py
+examples/vertical/dictlike.py
+lib/SQLAlchemy.egg-info/PKG-INFO
+lib/SQLAlchemy.egg-info/SOURCES.txt
+lib/SQLAlchemy.egg-info/dependency_links.txt
+lib/SQLAlchemy.egg-info/top_level.txt
+lib/sqlalchemy/__init__.py
+lib/sqlalchemy/events.py
+lib/sqlalchemy/exc.py
+lib/sqlalchemy/inspection.py
+lib/sqlalchemy/interfaces.py
+lib/sqlalchemy/log.py
+lib/sqlalchemy/pool.py
+lib/sqlalchemy/processors.py
+lib/sqlalchemy/schema.py
+lib/sqlalchemy/types.py
+lib/sqlalchemy/cextension/processors.c
+lib/sqlalchemy/cextension/resultproxy.c
+lib/sqlalchemy/cextension/utils.c
+lib/sqlalchemy/connectors/__init__.py
+lib/sqlalchemy/connectors/mxodbc.py
+lib/sqlalchemy/connectors/pyodbc.py
+lib/sqlalchemy/connectors/zxJDBC.py
+lib/sqlalchemy/databases/__init__.py
+lib/sqlalchemy/dialects/__init__.py
+lib/sqlalchemy/dialects/postgres.py
+lib/sqlalchemy/dialects/type_migration_guidelines.txt
+lib/sqlalchemy/dialects/firebird/__init__.py
+lib/sqlalchemy/dialects/firebird/base.py
+lib/sqlalchemy/dialects/firebird/fdb.py
+lib/sqlalchemy/dialects/firebird/kinterbasdb.py
+lib/sqlalchemy/dialects/mssql/__init__.py
+lib/sqlalchemy/dialects/mssql/adodbapi.py
+lib/sqlalchemy/dialects/mssql/base.py
+lib/sqlalchemy/dialects/mssql/information_schema.py
+lib/sqlalchemy/dialects/mssql/mxodbc.py
+lib/sqlalchemy/dialects/mssql/pymssql.py
+lib/sqlalchemy/dialects/mssql/pyodbc.py
+lib/sqlalchemy/dialects/mssql/zxjdbc.py
+lib/sqlalchemy/dialects/mysql/__init__.py
+lib/sqlalchemy/dialects/mysql/base.py
+lib/sqlalchemy/dialects/mysql/cymysql.py
+lib/sqlalchemy/dialects/mysql/gaerdbms.py
+lib/sqlalchemy/dialects/mysql/mysqlconnector.py
+lib/sqlalchemy/dialects/mysql/mysqldb.py
+lib/sqlalchemy/dialects/mysql/oursql.py
+lib/sqlalchemy/dialects/mysql/pymysql.py
+lib/sqlalchemy/dialects/mysql/pyodbc.py
+lib/sqlalchemy/dialects/mysql/zxjdbc.py
+lib/sqlalchemy/dialects/oracle/__init__.py
+lib/sqlalchemy/dialects/oracle/base.py
+lib/sqlalchemy/dialects/oracle/cx_oracle.py
+lib/sqlalchemy/dialects/oracle/zxjdbc.py
+lib/sqlalchemy/dialects/postgresql/__init__.py
+lib/sqlalchemy/dialects/postgresql/base.py
+lib/sqlalchemy/dialects/postgresql/constraints.py
+lib/sqlalchemy/dialects/postgresql/hstore.py
+lib/sqlalchemy/dialects/postgresql/json.py
+lib/sqlalchemy/dialects/postgresql/pg8000.py
+lib/sqlalchemy/dialects/postgresql/psycopg2.py
+lib/sqlalchemy/dialects/postgresql/psycopg2cffi.py
+lib/sqlalchemy/dialects/postgresql/pypostgresql.py
+lib/sqlalchemy/dialects/postgresql/ranges.py
+lib/sqlalchemy/dialects/postgresql/zxjdbc.py
+lib/sqlalchemy/dialects/sqlite/__init__.py
+lib/sqlalchemy/dialects/sqlite/base.py
+lib/sqlalchemy/dialects/sqlite/pysqlcipher.py
+lib/sqlalchemy/dialects/sqlite/pysqlite.py
+lib/sqlalchemy/dialects/sybase/__init__.py
+lib/sqlalchemy/dialects/sybase/base.py
+lib/sqlalchemy/dialects/sybase/mxodbc.py
+lib/sqlalchemy/dialects/sybase/pyodbc.py
+lib/sqlalchemy/dialects/sybase/pysybase.py
+lib/sqlalchemy/engine/__init__.py
+lib/sqlalchemy/engine/base.py
+lib/sqlalchemy/engine/default.py
+lib/sqlalchemy/engine/interfaces.py
+lib/sqlalchemy/engine/reflection.py
+lib/sqlalchemy/engine/result.py
+lib/sqlalchemy/engine/strategies.py
+lib/sqlalchemy/engine/threadlocal.py
+lib/sqlalchemy/engine/url.py
+lib/sqlalchemy/engine/util.py
+lib/sqlalchemy/event/__init__.py
+lib/sqlalchemy/event/api.py
+lib/sqlalchemy/event/attr.py
+lib/sqlalchemy/event/base.py
+lib/sqlalchemy/event/legacy.py
+lib/sqlalchemy/event/registry.py
+lib/sqlalchemy/ext/__init__.py
+lib/sqlalchemy/ext/associationproxy.py
+lib/sqlalchemy/ext/automap.py
+lib/sqlalchemy/ext/baked.py
+lib/sqlalchemy/ext/compiler.py
+lib/sqlalchemy/ext/horizontal_shard.py
+lib/sqlalchemy/ext/hybrid.py
+lib/sqlalchemy/ext/instrumentation.py
+lib/sqlalchemy/ext/mutable.py
+lib/sqlalchemy/ext/orderinglist.py
+lib/sqlalchemy/ext/serializer.py
+lib/sqlalchemy/ext/declarative/__init__.py
+lib/sqlalchemy/ext/declarative/api.py
+lib/sqlalchemy/ext/declarative/base.py
+lib/sqlalchemy/ext/declarative/clsregistry.py
+lib/sqlalchemy/orm/__init__.py
+lib/sqlalchemy/orm/attributes.py
+lib/sqlalchemy/orm/base.py
+lib/sqlalchemy/orm/collections.py
+lib/sqlalchemy/orm/dependency.py
+lib/sqlalchemy/orm/deprecated_interfaces.py
+lib/sqlalchemy/orm/descriptor_props.py
+lib/sqlalchemy/orm/dynamic.py
+lib/sqlalchemy/orm/evaluator.py
+lib/sqlalchemy/orm/events.py
+lib/sqlalchemy/orm/exc.py
+lib/sqlalchemy/orm/identity.py
+lib/sqlalchemy/orm/instrumentation.py
+lib/sqlalchemy/orm/interfaces.py
+lib/sqlalchemy/orm/loading.py
+lib/sqlalchemy/orm/mapper.py
+lib/sqlalchemy/orm/path_registry.py
+lib/sqlalchemy/orm/persistence.py
+lib/sqlalchemy/orm/properties.py
+lib/sqlalchemy/orm/query.py
+lib/sqlalchemy/orm/relationships.py
+lib/sqlalchemy/orm/scoping.py
+lib/sqlalchemy/orm/session.py
+lib/sqlalchemy/orm/state.py
+lib/sqlalchemy/orm/strategies.py
+lib/sqlalchemy/orm/strategy_options.py
+lib/sqlalchemy/orm/sync.py
+lib/sqlalchemy/orm/unitofwork.py
+lib/sqlalchemy/orm/util.py
+lib/sqlalchemy/sql/__init__.py
+lib/sqlalchemy/sql/annotation.py
+lib/sqlalchemy/sql/base.py
+lib/sqlalchemy/sql/compiler.py
+lib/sqlalchemy/sql/crud.py
+lib/sqlalchemy/sql/ddl.py
+lib/sqlalchemy/sql/default_comparator.py
+lib/sqlalchemy/sql/dml.py
+lib/sqlalchemy/sql/elements.py
+lib/sqlalchemy/sql/expression.py
+lib/sqlalchemy/sql/functions.py
+lib/sqlalchemy/sql/naming.py
+lib/sqlalchemy/sql/operators.py
+lib/sqlalchemy/sql/schema.py
+lib/sqlalchemy/sql/selectable.py
+lib/sqlalchemy/sql/sqltypes.py
+lib/sqlalchemy/sql/type_api.py
+lib/sqlalchemy/sql/util.py
+lib/sqlalchemy/sql/visitors.py
+lib/sqlalchemy/testing/__init__.py
+lib/sqlalchemy/testing/assertions.py
+lib/sqlalchemy/testing/assertsql.py
+lib/sqlalchemy/testing/config.py
+lib/sqlalchemy/testing/distutils_run.py
+lib/sqlalchemy/testing/engines.py
+lib/sqlalchemy/testing/entities.py
+lib/sqlalchemy/testing/exclusions.py
+lib/sqlalchemy/testing/fixtures.py
+lib/sqlalchemy/testing/mock.py
+lib/sqlalchemy/testing/pickleable.py
+lib/sqlalchemy/testing/profiling.py
+lib/sqlalchemy/testing/provision.py
+lib/sqlalchemy/testing/replay_fixture.py
+lib/sqlalchemy/testing/requirements.py
+lib/sqlalchemy/testing/runner.py
+lib/sqlalchemy/testing/schema.py
+lib/sqlalchemy/testing/util.py
+lib/sqlalchemy/testing/warnings.py
+lib/sqlalchemy/testing/plugin/__init__.py
+lib/sqlalchemy/testing/plugin/bootstrap.py
+lib/sqlalchemy/testing/plugin/noseplugin.py
+lib/sqlalchemy/testing/plugin/plugin_base.py
+lib/sqlalchemy/testing/plugin/pytestplugin.py
+lib/sqlalchemy/testing/suite/__init__.py
+lib/sqlalchemy/testing/suite/test_ddl.py
+lib/sqlalchemy/testing/suite/test_dialect.py
+lib/sqlalchemy/testing/suite/test_insert.py
+lib/sqlalchemy/testing/suite/test_reflection.py
+lib/sqlalchemy/testing/suite/test_results.py
+lib/sqlalchemy/testing/suite/test_select.py
+lib/sqlalchemy/testing/suite/test_sequence.py
+lib/sqlalchemy/testing/suite/test_types.py
+lib/sqlalchemy/testing/suite/test_update_delete.py
+lib/sqlalchemy/util/__init__.py
+lib/sqlalchemy/util/_collections.py
+lib/sqlalchemy/util/compat.py
+lib/sqlalchemy/util/deprecations.py
+lib/sqlalchemy/util/langhelpers.py
+lib/sqlalchemy/util/queue.py
+lib/sqlalchemy/util/topological.py
+test/__init__.py
+test/binary_data_one.dat
+test/binary_data_two.dat
+test/conftest.py
+test/requirements.py
+test/aaa_profiling/__init__.py
+test/aaa_profiling/test_compiler.py
+test/aaa_profiling/test_memusage.py
+test/aaa_profiling/test_orm.py
+test/aaa_profiling/test_pool.py
+test/aaa_profiling/test_resultset.py
+test/aaa_profiling/test_zoomark.py
+test/aaa_profiling/test_zoomark_orm.py
+test/base/__init__.py
+test/base/test_dependency.py
+test/base/test_events.py
+test/base/test_except.py
+test/base/test_inspect.py
+test/base/test_tutorials.py
+test/base/test_utils.py
+test/dialect/__init__.py
+test/dialect/test_firebird.py
+test/dialect/test_mxodbc.py
+test/dialect/test_oracle.py
+test/dialect/test_pyodbc.py
+test/dialect/test_sqlite.py
+test/dialect/test_suite.py
+test/dialect/test_sybase.py
+test/dialect/mssql/__init__.py
+test/dialect/mssql/test_compiler.py
+test/dialect/mssql/test_engine.py
+test/dialect/mssql/test_query.py
+test/dialect/mssql/test_reflection.py
+test/dialect/mssql/test_types.py
+test/dialect/mysql/__init__.py
+test/dialect/mysql/test_compiler.py
+test/dialect/mysql/test_dialect.py
+test/dialect/mysql/test_query.py
+test/dialect/mysql/test_reflection.py
+test/dialect/mysql/test_types.py
+test/dialect/postgresql/__init__.py
+test/dialect/postgresql/test_compiler.py
+test/dialect/postgresql/test_dialect.py
+test/dialect/postgresql/test_query.py
+test/dialect/postgresql/test_reflection.py
+test/dialect/postgresql/test_types.py
+test/engine/__init__.py
+test/engine/test_bind.py
+test/engine/test_ddlevents.py
+test/engine/test_execute.py
+test/engine/test_logging.py
+test/engine/test_parseconnect.py
+test/engine/test_pool.py
+test/engine/test_processors.py
+test/engine/test_reconnect.py
+test/engine/test_reflection.py
+test/engine/test_transaction.py
+test/ext/__init__.py
+test/ext/test_associationproxy.py
+test/ext/test_automap.py
+test/ext/test_baked.py
+test/ext/test_compiler.py
+test/ext/test_extendedattr.py
+test/ext/test_horizontal_shard.py
+test/ext/test_hybrid.py
+test/ext/test_mutable.py
+test/ext/test_orderinglist.py
+test/ext/test_serializer.py
+test/ext/declarative/__init__.py
+test/ext/declarative/test_basic.py
+test/ext/declarative/test_clsregistry.py
+test/ext/declarative/test_inheritance.py
+test/ext/declarative/test_mixin.py
+test/ext/declarative/test_reflection.py
+test/orm/__init__.py
+test/orm/_fixtures.py
+test/orm/test_association.py
+test/orm/test_assorted_eager.py
+test/orm/test_attributes.py
+test/orm/test_backref_mutations.py
+test/orm/test_bind.py
+test/orm/test_bulk.py
+test/orm/test_bundle.py
+test/orm/test_cascade.py
+test/orm/test_collection.py
+test/orm/test_compile.py
+test/orm/test_composites.py
+test/orm/test_cycles.py
+test/orm/test_default_strategies.py
+test/orm/test_defaults.py
+test/orm/test_deferred.py
+test/orm/test_deprecations.py
+test/orm/test_descriptor.py
+test/orm/test_dynamic.py
+test/orm/test_eager_relations.py
+test/orm/test_evaluator.py
+test/orm/test_events.py
+test/orm/test_expire.py
+test/orm/test_froms.py
+test/orm/test_generative.py
+test/orm/test_hasparent.py
+test/orm/test_immediate_load.py
+test/orm/test_inspect.py
+test/orm/test_instrumentation.py
+test/orm/test_joins.py
+test/orm/test_lazy_relations.py
+test/orm/test_load_on_fks.py
+test/orm/test_loading.py
+test/orm/test_lockmode.py
+test/orm/test_manytomany.py
+test/orm/test_mapper.py
+test/orm/test_merge.py
+test/orm/test_naturalpks.py
+test/orm/test_of_type.py
+test/orm/test_onetoone.py
+test/orm/test_options.py
+test/orm/test_pickled.py
+test/orm/test_query.py
+test/orm/test_rel_fn.py
+test/orm/test_relationships.py
+test/orm/test_scoping.py
+test/orm/test_selectable.py
+test/orm/test_session.py
+test/orm/test_subquery_relations.py
+test/orm/test_sync.py
+test/orm/test_transaction.py
+test/orm/test_unitofwork.py
+test/orm/test_unitofworkv2.py
+test/orm/test_update_delete.py
+test/orm/test_utils.py
+test/orm/test_validators.py
+test/orm/test_versioning.py
+test/orm/inheritance/__init__.py
+test/orm/inheritance/_poly_fixtures.py
+test/orm/inheritance/test_abc_inheritance.py
+test/orm/inheritance/test_abc_polymorphic.py
+test/orm/inheritance/test_assorted_poly.py
+test/orm/inheritance/test_basic.py
+test/orm/inheritance/test_concrete.py
+test/orm/inheritance/test_magazine.py
+test/orm/inheritance/test_manytomany.py
+test/orm/inheritance/test_poly_linked_list.py
+test/orm/inheritance/test_poly_persistence.py
+test/orm/inheritance/test_polymorphic_rel.py
+test/orm/inheritance/test_productspec.py
+test/orm/inheritance/test_relationship.py
+test/orm/inheritance/test_selects.py
+test/orm/inheritance/test_single.py
+test/orm/inheritance/test_with_poly.py
+test/perf/invalidate_stresstest.py
+test/perf/orm2010.py
+test/sql/__init__.py
+test/sql/test_case_statement.py
+test/sql/test_compiler.py
+test/sql/test_constraints.py
+test/sql/test_cte.py
+test/sql/test_ddlemit.py
+test/sql/test_defaults.py
+test/sql/test_delete.py
+test/sql/test_functions.py
+test/sql/test_generative.py
+test/sql/test_insert.py
+test/sql/test_insert_exec.py
+test/sql/test_inspect.py
+test/sql/test_join_rewriting.py
+test/sql/test_labels.py
+test/sql/test_metadata.py
+test/sql/test_operators.py
+test/sql/test_query.py
+test/sql/test_quote.py
+test/sql/test_resultset.py
+test/sql/test_returning.py
+test/sql/test_rowcount.py
+test/sql/test_selectable.py
+test/sql/test_text.py
+test/sql/test_type_expressions.py
+test/sql/test_types.py
+test/sql/test_unicode.py
+test/sql/test_update.py
\ No newline at end of file
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/SQLAlchemy-1.0.13-py2.7.egg-info/dependency_links.txt b/Assignments/microblog/flask/lib/python2.7/site-packages/SQLAlchemy-1.0.13-py2.7.egg-info/dependency_links.txt
new file mode 100644
index 0000000..8b13789
--- /dev/null
+++ b/Assignments/microblog/flask/lib/python2.7/site-packages/SQLAlchemy-1.0.13-py2.7.egg-info/dependency_links.txt
@@ -0,0 +1 @@
+
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/SQLAlchemy-1.0.13-py2.7.egg-info/installed-files.txt b/Assignments/microblog/flask/lib/python2.7/site-packages/SQLAlchemy-1.0.13-py2.7.egg-info/installed-files.txt
new file mode 100644
index 0000000..6a4f56e
--- /dev/null
+++ b/Assignments/microblog/flask/lib/python2.7/site-packages/SQLAlchemy-1.0.13-py2.7.egg-info/installed-files.txt
@@ -0,0 +1,370 @@
+../sqlalchemy/exc.py
+../sqlalchemy/interfaces.py
+../sqlalchemy/types.py
+../sqlalchemy/pool.py
+../sqlalchemy/log.py
+../sqlalchemy/inspection.py
+../sqlalchemy/processors.py
+../sqlalchemy/__init__.py
+../sqlalchemy/schema.py
+../sqlalchemy/events.py
+../sqlalchemy/engine/reflection.py
+../sqlalchemy/engine/result.py
+../sqlalchemy/engine/default.py
+../sqlalchemy/engine/strategies.py
+../sqlalchemy/engine/threadlocal.py
+../sqlalchemy/engine/interfaces.py
+../sqlalchemy/engine/url.py
+../sqlalchemy/engine/base.py
+../sqlalchemy/engine/__init__.py
+../sqlalchemy/engine/util.py
+../sqlalchemy/sql/compiler.py
+../sqlalchemy/sql/type_api.py
+../sqlalchemy/sql/ddl.py
+../sqlalchemy/sql/elements.py
+../sqlalchemy/sql/default_comparator.py
+../sqlalchemy/sql/functions.py
+../sqlalchemy/sql/dml.py
+../sqlalchemy/sql/selectable.py
+../sqlalchemy/sql/operators.py
+../sqlalchemy/sql/annotation.py
+../sqlalchemy/sql/base.py
+../sqlalchemy/sql/expression.py
+../sqlalchemy/sql/visitors.py
+../sqlalchemy/sql/__init__.py
+../sqlalchemy/sql/naming.py
+../sqlalchemy/sql/schema.py
+../sqlalchemy/sql/crud.py
+../sqlalchemy/sql/sqltypes.py
+../sqlalchemy/sql/util.py
+../sqlalchemy/connectors/pyodbc.py
+../sqlalchemy/connectors/mxodbc.py
+../sqlalchemy/connectors/__init__.py
+../sqlalchemy/connectors/zxJDBC.py
+../sqlalchemy/event/legacy.py
+../sqlalchemy/event/registry.py
+../sqlalchemy/event/attr.py
+../sqlalchemy/event/base.py
+../sqlalchemy/event/api.py
+../sqlalchemy/event/__init__.py
+../sqlalchemy/dialects/postgres.py
+../sqlalchemy/dialects/__init__.py
+../sqlalchemy/dialects/sqlite/pysqlcipher.py
+../sqlalchemy/dialects/sqlite/base.py
+../sqlalchemy/dialects/sqlite/pysqlite.py
+../sqlalchemy/dialects/sqlite/__init__.py
+../sqlalchemy/dialects/postgresql/json.py
+../sqlalchemy/dialects/postgresql/constraints.py
+../sqlalchemy/dialects/postgresql/ranges.py
+../sqlalchemy/dialects/postgresql/hstore.py
+../sqlalchemy/dialects/postgresql/psycopg2cffi.py
+../sqlalchemy/dialects/postgresql/base.py
+../sqlalchemy/dialects/postgresql/zxjdbc.py
+../sqlalchemy/dialects/postgresql/psycopg2.py
+../sqlalchemy/dialects/postgresql/pypostgresql.py
+../sqlalchemy/dialects/postgresql/__init__.py
+../sqlalchemy/dialects/postgresql/pg8000.py
+../sqlalchemy/dialects/mssql/pymssql.py
+../sqlalchemy/dialects/mssql/pyodbc.py
+../sqlalchemy/dialects/mssql/adodbapi.py
+../sqlalchemy/dialects/mssql/base.py
+../sqlalchemy/dialects/mssql/mxodbc.py
+../sqlalchemy/dialects/mssql/zxjdbc.py
+../sqlalchemy/dialects/mssql/__init__.py
+../sqlalchemy/dialects/mssql/information_schema.py
+../sqlalchemy/dialects/firebird/fdb.py
+../sqlalchemy/dialects/firebird/kinterbasdb.py
+../sqlalchemy/dialects/firebird/base.py
+../sqlalchemy/dialects/firebird/__init__.py
+../sqlalchemy/dialects/sybase/pysybase.py
+../sqlalchemy/dialects/sybase/pyodbc.py
+../sqlalchemy/dialects/sybase/base.py
+../sqlalchemy/dialects/sybase/mxodbc.py
+../sqlalchemy/dialects/sybase/__init__.py
+../sqlalchemy/dialects/mysql/gaerdbms.py
+../sqlalchemy/dialects/mysql/pyodbc.py
+../sqlalchemy/dialects/mysql/mysqldb.py
+../sqlalchemy/dialects/mysql/base.py
+../sqlalchemy/dialects/mysql/pymysql.py
+../sqlalchemy/dialects/mysql/zxjdbc.py
+../sqlalchemy/dialects/mysql/oursql.py
+../sqlalchemy/dialects/mysql/mysqlconnector.py
+../sqlalchemy/dialects/mysql/__init__.py
+../sqlalchemy/dialects/mysql/cymysql.py
+../sqlalchemy/dialects/oracle/cx_oracle.py
+../sqlalchemy/dialects/oracle/base.py
+../sqlalchemy/dialects/oracle/zxjdbc.py
+../sqlalchemy/dialects/oracle/__init__.py
+../sqlalchemy/util/deprecations.py
+../sqlalchemy/util/langhelpers.py
+../sqlalchemy/util/_collections.py
+../sqlalchemy/util/queue.py
+../sqlalchemy/util/topological.py
+../sqlalchemy/util/compat.py
+../sqlalchemy/util/__init__.py
+../sqlalchemy/orm/unitofwork.py
+../sqlalchemy/orm/sync.py
+../sqlalchemy/orm/exc.py
+../sqlalchemy/orm/strategies.py
+../sqlalchemy/orm/loading.py
+../sqlalchemy/orm/properties.py
+../sqlalchemy/orm/session.py
+../sqlalchemy/orm/interfaces.py
+../sqlalchemy/orm/descriptor_props.py
+../sqlalchemy/orm/relationships.py
+../sqlalchemy/orm/dependency.py
+../sqlalchemy/orm/instrumentation.py
+../sqlalchemy/orm/attributes.py
+../sqlalchemy/orm/dynamic.py
+../sqlalchemy/orm/state.py
+../sqlalchemy/orm/evaluator.py
+../sqlalchemy/orm/persistence.py
+../sqlalchemy/orm/mapper.py
+../sqlalchemy/orm/identity.py
+../sqlalchemy/orm/base.py
+../sqlalchemy/orm/collections.py
+../sqlalchemy/orm/deprecated_interfaces.py
+../sqlalchemy/orm/scoping.py
+../sqlalchemy/orm/query.py
+../sqlalchemy/orm/strategy_options.py
+../sqlalchemy/orm/__init__.py
+../sqlalchemy/orm/path_registry.py
+../sqlalchemy/orm/util.py
+../sqlalchemy/orm/events.py
+../sqlalchemy/databases/__init__.py
+../sqlalchemy/ext/horizontal_shard.py
+../sqlalchemy/ext/compiler.py
+../sqlalchemy/ext/mutable.py
+../sqlalchemy/ext/hybrid.py
+../sqlalchemy/ext/instrumentation.py
+../sqlalchemy/ext/orderinglist.py
+../sqlalchemy/ext/automap.py
+../sqlalchemy/ext/serializer.py
+../sqlalchemy/ext/baked.py
+../sqlalchemy/ext/__init__.py
+../sqlalchemy/ext/associationproxy.py
+../sqlalchemy/ext/declarative/clsregistry.py
+../sqlalchemy/ext/declarative/base.py
+../sqlalchemy/ext/declarative/api.py
+../sqlalchemy/ext/declarative/__init__.py
+../sqlalchemy/testing/warnings.py
+../sqlalchemy/testing/mock.py
+../sqlalchemy/testing/entities.py
+../sqlalchemy/testing/assertions.py
+../sqlalchemy/testing/distutils_run.py
+../sqlalchemy/testing/fixtures.py
+../sqlalchemy/testing/pickleable.py
+../sqlalchemy/testing/replay_fixture.py
+../sqlalchemy/testing/engines.py
+../sqlalchemy/testing/config.py
+../sqlalchemy/testing/runner.py
+../sqlalchemy/testing/exclusions.py
+../sqlalchemy/testing/assertsql.py
+../sqlalchemy/testing/__init__.py
+../sqlalchemy/testing/schema.py
+../sqlalchemy/testing/requirements.py
+../sqlalchemy/testing/util.py
+../sqlalchemy/testing/profiling.py
+../sqlalchemy/testing/provision.py
+../sqlalchemy/testing/suite/test_ddl.py
+../sqlalchemy/testing/suite/test_dialect.py
+../sqlalchemy/testing/suite/test_insert.py
+../sqlalchemy/testing/suite/test_types.py
+../sqlalchemy/testing/suite/test_select.py
+../sqlalchemy/testing/suite/test_update_delete.py
+../sqlalchemy/testing/suite/test_results.py
+../sqlalchemy/testing/suite/test_reflection.py
+../sqlalchemy/testing/suite/test_sequence.py
+../sqlalchemy/testing/suite/__init__.py
+../sqlalchemy/testing/plugin/bootstrap.py
+../sqlalchemy/testing/plugin/plugin_base.py
+../sqlalchemy/testing/plugin/pytestplugin.py
+../sqlalchemy/testing/plugin/__init__.py
+../sqlalchemy/testing/plugin/noseplugin.py
+../sqlalchemy/exc.pyc
+../sqlalchemy/interfaces.pyc
+../sqlalchemy/types.pyc
+../sqlalchemy/pool.pyc
+../sqlalchemy/log.pyc
+../sqlalchemy/inspection.pyc
+../sqlalchemy/processors.pyc
+../sqlalchemy/__init__.pyc
+../sqlalchemy/schema.pyc
+../sqlalchemy/events.pyc
+../sqlalchemy/engine/reflection.pyc
+../sqlalchemy/engine/result.pyc
+../sqlalchemy/engine/default.pyc
+../sqlalchemy/engine/strategies.pyc
+../sqlalchemy/engine/threadlocal.pyc
+../sqlalchemy/engine/interfaces.pyc
+../sqlalchemy/engine/url.pyc
+../sqlalchemy/engine/base.pyc
+../sqlalchemy/engine/__init__.pyc
+../sqlalchemy/engine/util.pyc
+../sqlalchemy/sql/compiler.pyc
+../sqlalchemy/sql/type_api.pyc
+../sqlalchemy/sql/ddl.pyc
+../sqlalchemy/sql/elements.pyc
+../sqlalchemy/sql/default_comparator.pyc
+../sqlalchemy/sql/functions.pyc
+../sqlalchemy/sql/dml.pyc
+../sqlalchemy/sql/selectable.pyc
+../sqlalchemy/sql/operators.pyc
+../sqlalchemy/sql/annotation.pyc
+../sqlalchemy/sql/base.pyc
+../sqlalchemy/sql/expression.pyc
+../sqlalchemy/sql/visitors.pyc
+../sqlalchemy/sql/__init__.pyc
+../sqlalchemy/sql/naming.pyc
+../sqlalchemy/sql/schema.pyc
+../sqlalchemy/sql/crud.pyc
+../sqlalchemy/sql/sqltypes.pyc
+../sqlalchemy/sql/util.pyc
+../sqlalchemy/connectors/pyodbc.pyc
+../sqlalchemy/connectors/mxodbc.pyc
+../sqlalchemy/connectors/__init__.pyc
+../sqlalchemy/connectors/zxJDBC.pyc
+../sqlalchemy/event/legacy.pyc
+../sqlalchemy/event/registry.pyc
+../sqlalchemy/event/attr.pyc
+../sqlalchemy/event/base.pyc
+../sqlalchemy/event/api.pyc
+../sqlalchemy/event/__init__.pyc
+../sqlalchemy/dialects/postgres.pyc
+../sqlalchemy/dialects/__init__.pyc
+../sqlalchemy/dialects/sqlite/pysqlcipher.pyc
+../sqlalchemy/dialects/sqlite/base.pyc
+../sqlalchemy/dialects/sqlite/pysqlite.pyc
+../sqlalchemy/dialects/sqlite/__init__.pyc
+../sqlalchemy/dialects/postgresql/json.pyc
+../sqlalchemy/dialects/postgresql/constraints.pyc
+../sqlalchemy/dialects/postgresql/ranges.pyc
+../sqlalchemy/dialects/postgresql/hstore.pyc
+../sqlalchemy/dialects/postgresql/psycopg2cffi.pyc
+../sqlalchemy/dialects/postgresql/base.pyc
+../sqlalchemy/dialects/postgresql/zxjdbc.pyc
+../sqlalchemy/dialects/postgresql/psycopg2.pyc
+../sqlalchemy/dialects/postgresql/pypostgresql.pyc
+../sqlalchemy/dialects/postgresql/__init__.pyc
+../sqlalchemy/dialects/postgresql/pg8000.pyc
+../sqlalchemy/dialects/mssql/pymssql.pyc
+../sqlalchemy/dialects/mssql/pyodbc.pyc
+../sqlalchemy/dialects/mssql/adodbapi.pyc
+../sqlalchemy/dialects/mssql/base.pyc
+../sqlalchemy/dialects/mssql/mxodbc.pyc
+../sqlalchemy/dialects/mssql/zxjdbc.pyc
+../sqlalchemy/dialects/mssql/__init__.pyc
+../sqlalchemy/dialects/mssql/information_schema.pyc
+../sqlalchemy/dialects/firebird/fdb.pyc
+../sqlalchemy/dialects/firebird/kinterbasdb.pyc
+../sqlalchemy/dialects/firebird/base.pyc
+../sqlalchemy/dialects/firebird/__init__.pyc
+../sqlalchemy/dialects/sybase/pysybase.pyc
+../sqlalchemy/dialects/sybase/pyodbc.pyc
+../sqlalchemy/dialects/sybase/base.pyc
+../sqlalchemy/dialects/sybase/mxodbc.pyc
+../sqlalchemy/dialects/sybase/__init__.pyc
+../sqlalchemy/dialects/mysql/gaerdbms.pyc
+../sqlalchemy/dialects/mysql/pyodbc.pyc
+../sqlalchemy/dialects/mysql/mysqldb.pyc
+../sqlalchemy/dialects/mysql/base.pyc
+../sqlalchemy/dialects/mysql/pymysql.pyc
+../sqlalchemy/dialects/mysql/zxjdbc.pyc
+../sqlalchemy/dialects/mysql/oursql.pyc
+../sqlalchemy/dialects/mysql/mysqlconnector.pyc
+../sqlalchemy/dialects/mysql/__init__.pyc
+../sqlalchemy/dialects/mysql/cymysql.pyc
+../sqlalchemy/dialects/oracle/cx_oracle.pyc
+../sqlalchemy/dialects/oracle/base.pyc
+../sqlalchemy/dialects/oracle/zxjdbc.pyc
+../sqlalchemy/dialects/oracle/__init__.pyc
+../sqlalchemy/util/deprecations.pyc
+../sqlalchemy/util/langhelpers.pyc
+../sqlalchemy/util/_collections.pyc
+../sqlalchemy/util/queue.pyc
+../sqlalchemy/util/topological.pyc
+../sqlalchemy/util/compat.pyc
+../sqlalchemy/util/__init__.pyc
+../sqlalchemy/orm/unitofwork.pyc
+../sqlalchemy/orm/sync.pyc
+../sqlalchemy/orm/exc.pyc
+../sqlalchemy/orm/strategies.pyc
+../sqlalchemy/orm/loading.pyc
+../sqlalchemy/orm/properties.pyc
+../sqlalchemy/orm/session.pyc
+../sqlalchemy/orm/interfaces.pyc
+../sqlalchemy/orm/descriptor_props.pyc
+../sqlalchemy/orm/relationships.pyc
+../sqlalchemy/orm/dependency.pyc
+../sqlalchemy/orm/instrumentation.pyc
+../sqlalchemy/orm/attributes.pyc
+../sqlalchemy/orm/dynamic.pyc
+../sqlalchemy/orm/state.pyc
+../sqlalchemy/orm/evaluator.pyc
+../sqlalchemy/orm/persistence.pyc
+../sqlalchemy/orm/mapper.pyc
+../sqlalchemy/orm/identity.pyc
+../sqlalchemy/orm/base.pyc
+../sqlalchemy/orm/collections.pyc
+../sqlalchemy/orm/deprecated_interfaces.pyc
+../sqlalchemy/orm/scoping.pyc
+../sqlalchemy/orm/query.pyc
+../sqlalchemy/orm/strategy_options.pyc
+../sqlalchemy/orm/__init__.pyc
+../sqlalchemy/orm/path_registry.pyc
+../sqlalchemy/orm/util.pyc
+../sqlalchemy/orm/events.pyc
+../sqlalchemy/databases/__init__.pyc
+../sqlalchemy/ext/horizontal_shard.pyc
+../sqlalchemy/ext/compiler.pyc
+../sqlalchemy/ext/mutable.pyc
+../sqlalchemy/ext/hybrid.pyc
+../sqlalchemy/ext/instrumentation.pyc
+../sqlalchemy/ext/orderinglist.pyc
+../sqlalchemy/ext/automap.pyc
+../sqlalchemy/ext/serializer.pyc
+../sqlalchemy/ext/baked.pyc
+../sqlalchemy/ext/__init__.pyc
+../sqlalchemy/ext/associationproxy.pyc
+../sqlalchemy/ext/declarative/clsregistry.pyc
+../sqlalchemy/ext/declarative/base.pyc
+../sqlalchemy/ext/declarative/api.pyc
+../sqlalchemy/ext/declarative/__init__.pyc
+../sqlalchemy/testing/warnings.pyc
+../sqlalchemy/testing/mock.pyc
+../sqlalchemy/testing/entities.pyc
+../sqlalchemy/testing/assertions.pyc
+../sqlalchemy/testing/distutils_run.pyc
+../sqlalchemy/testing/fixtures.pyc
+../sqlalchemy/testing/pickleable.pyc
+../sqlalchemy/testing/replay_fixture.pyc
+../sqlalchemy/testing/engines.pyc
+../sqlalchemy/testing/config.pyc
+../sqlalchemy/testing/runner.pyc
+../sqlalchemy/testing/exclusions.pyc
+../sqlalchemy/testing/assertsql.pyc
+../sqlalchemy/testing/__init__.pyc
+../sqlalchemy/testing/schema.pyc
+../sqlalchemy/testing/requirements.pyc
+../sqlalchemy/testing/util.pyc
+../sqlalchemy/testing/profiling.pyc
+../sqlalchemy/testing/provision.pyc
+../sqlalchemy/testing/suite/test_ddl.pyc
+../sqlalchemy/testing/suite/test_dialect.pyc
+../sqlalchemy/testing/suite/test_insert.pyc
+../sqlalchemy/testing/suite/test_types.pyc
+../sqlalchemy/testing/suite/test_select.pyc
+../sqlalchemy/testing/suite/test_update_delete.pyc
+../sqlalchemy/testing/suite/test_results.pyc
+../sqlalchemy/testing/suite/test_reflection.pyc
+../sqlalchemy/testing/suite/test_sequence.pyc
+../sqlalchemy/testing/suite/__init__.pyc
+../sqlalchemy/testing/plugin/bootstrap.pyc
+../sqlalchemy/testing/plugin/plugin_base.pyc
+../sqlalchemy/testing/plugin/pytestplugin.pyc
+../sqlalchemy/testing/plugin/__init__.pyc
+../sqlalchemy/testing/plugin/noseplugin.pyc
+dependency_links.txt
+top_level.txt
+PKG-INFO
+SOURCES.txt
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/SQLAlchemy-1.0.13-py2.7.egg-info/top_level.txt b/Assignments/microblog/flask/lib/python2.7/site-packages/SQLAlchemy-1.0.13-py2.7.egg-info/top_level.txt
new file mode 100644
index 0000000..39fb2be
--- /dev/null
+++ b/Assignments/microblog/flask/lib/python2.7/site-packages/SQLAlchemy-1.0.13-py2.7.egg-info/top_level.txt
@@ -0,0 +1 @@
+sqlalchemy
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/SQLAlchemy-1.0.13.dist-info/DESCRIPTION.rst b/Assignments/microblog/flask/lib/python2.7/site-packages/SQLAlchemy-1.0.13.dist-info/DESCRIPTION.rst
new file mode 100644
index 0000000..479eaf5
--- /dev/null
+++ b/Assignments/microblog/flask/lib/python2.7/site-packages/SQLAlchemy-1.0.13.dist-info/DESCRIPTION.rst
@@ -0,0 +1,137 @@
+SQLAlchemy
+==========
+
+The Python SQL Toolkit and Object Relational Mapper
+
+Introduction
+-------------
+
+SQLAlchemy is the Python SQL toolkit and Object Relational Mapper
+that gives application developers the full power and
+flexibility of SQL. SQLAlchemy provides a full suite
+of well known enterprise-level persistence patterns,
+designed for efficient and high-performing database
+access, adapted into a simple and Pythonic domain
+language.
+
+Major SQLAlchemy features include:
+
+* An industrial strength ORM, built
+ from the core on the identity map, unit of work,
+ and data mapper patterns. These patterns
+ allow transparent persistence of objects
+ using a declarative configuration system.
+ Domain models
+ can be constructed and manipulated naturally,
+ and changes are synchronized with the
+ current transaction automatically.
+* A relationally-oriented query system, exposing
+ the full range of SQL's capabilities
+ explicitly, including joins, subqueries,
+ correlation, and most everything else,
+ in terms of the object model.
+ Writing queries with the ORM uses the same
+ techniques of relational composition you use
+ when writing SQL. While you can drop into
+ literal SQL at any time, it's virtually never
+ needed.
+* A comprehensive and flexible system
+ of eager loading for related collections and objects.
+ Collections are cached within a session,
+ and can be loaded on individual access, all
+ at once using joins, or by query per collection
+ across the full result set.
+* A Core SQL construction system and DBAPI
+ interaction layer. The SQLAlchemy Core is
+ separate from the ORM and is a full database
+ abstraction layer in its own right, and includes
+ an extensible Python-based SQL expression
+ language, schema metadata, connection pooling,
+ type coercion, and custom types.
+* All primary and foreign key constraints are
+ assumed to be composite and natural. Surrogate
+ integer primary keys are of course still the
+ norm, but SQLAlchemy never assumes or hardcodes
+ to this model.
+* Database introspection and generation. Database
+ schemas can be "reflected" in one step into
+ Python structures representing database metadata;
+ those same structures can then generate
+ CREATE statements right back out - all within
+ the Core, independent of the ORM.
+
+SQLAlchemy's philosophy:
+
+* SQL databases behave less and less like object
+ collections the more size and performance start to
+ matter; object collections behave less and less like
+ tables and rows the more abstraction starts to matter.
+ SQLAlchemy aims to accommodate both of these
+ principles.
+* An ORM doesn't need to hide the "R". A relational
+ database provides rich, set-based functionality
+ that should be fully exposed. SQLAlchemy's
+ ORM provides an open-ended set of patterns
+ that allow a developer to construct a custom
+ mediation layer between a domain model and
+ a relational schema, turning the so-called
+ "object relational impedance" issue into
+ a distant memory.
+* The developer, in all cases, makes all decisions
+ regarding the design, structure, and naming conventions
+ of both the object model as well as the relational
+ schema. SQLAlchemy only provides the means
+ to automate the execution of these decisions.
+* With SQLAlchemy, there's no such thing as
+ "the ORM generated a bad query" - you
+ retain full control over the structure of
+ queries, including how joins are organized,
+ how subqueries and correlation is used, what
+ columns are requested. Everything SQLAlchemy
+ does is ultimately the result of a developer-
+ initiated decision.
+* Don't use an ORM if the problem doesn't need one.
+ SQLAlchemy consists of a Core and separate ORM
+ component. The Core offers a full SQL expression
+ language that allows Pythonic construction
+ of SQL constructs that render directly to SQL
+ strings for a target database, returning
+ result sets that are essentially enhanced DBAPI
+ cursors.
+* Transactions should be the norm. With SQLAlchemy's
+ ORM, nothing goes to permanent storage until
+ commit() is called. SQLAlchemy encourages applications
+ to create a consistent means of delineating
+ the start and end of a series of operations.
+* Never render a literal value in a SQL statement.
+ Bound parameters are used to the greatest degree
+ possible, allowing query optimizers to cache
+ query plans effectively and making SQL injection
+ attacks a non-issue.
+
+Documentation
+-------------
+
+Latest documentation is at:
+
+http://www.sqlalchemy.org/docs/
+
+Installation / Requirements
+---------------------------
+
+Full documentation for installation is at
+`Installation `_.
+
+Getting Help / Development / Bug reporting
+------------------------------------------
+
+Please refer to the `SQLAlchemy Community Guide `_.
+
+License
+-------
+
+SQLAlchemy is distributed under the `MIT license
+`_.
+
+
+
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/SQLAlchemy-1.0.13.dist-info/INSTALLER b/Assignments/microblog/flask/lib/python2.7/site-packages/SQLAlchemy-1.0.13.dist-info/INSTALLER
new file mode 100644
index 0000000..a1b589e
--- /dev/null
+++ b/Assignments/microblog/flask/lib/python2.7/site-packages/SQLAlchemy-1.0.13.dist-info/INSTALLER
@@ -0,0 +1 @@
+pip
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/SQLAlchemy-1.0.13.dist-info/METADATA b/Assignments/microblog/flask/lib/python2.7/site-packages/SQLAlchemy-1.0.13.dist-info/METADATA
new file mode 100644
index 0000000..61dc271
--- /dev/null
+++ b/Assignments/microblog/flask/lib/python2.7/site-packages/SQLAlchemy-1.0.13.dist-info/METADATA
@@ -0,0 +1,157 @@
+Metadata-Version: 2.0
+Name: SQLAlchemy
+Version: 1.0.13
+Summary: Database Abstraction Library
+Home-page: http://www.sqlalchemy.org
+Author: Mike Bayer
+Author-email: mike_mp@zzzcomputing.com
+License: MIT License
+Platform: UNKNOWN
+Classifier: Development Status :: 5 - Production/Stable
+Classifier: Intended Audience :: Developers
+Classifier: License :: OSI Approved :: MIT License
+Classifier: Programming Language :: Python
+Classifier: Programming Language :: Python :: 3
+Classifier: Programming Language :: Python :: Implementation :: CPython
+Classifier: Programming Language :: Python :: Implementation :: Jython
+Classifier: Programming Language :: Python :: Implementation :: PyPy
+Classifier: Topic :: Database :: Front-Ends
+Classifier: Operating System :: OS Independent
+
+SQLAlchemy
+==========
+
+The Python SQL Toolkit and Object Relational Mapper
+
+Introduction
+-------------
+
+SQLAlchemy is the Python SQL toolkit and Object Relational Mapper
+that gives application developers the full power and
+flexibility of SQL. SQLAlchemy provides a full suite
+of well known enterprise-level persistence patterns,
+designed for efficient and high-performing database
+access, adapted into a simple and Pythonic domain
+language.
+
+Major SQLAlchemy features include:
+
+* An industrial strength ORM, built
+ from the core on the identity map, unit of work,
+ and data mapper patterns. These patterns
+ allow transparent persistence of objects
+ using a declarative configuration system.
+ Domain models
+ can be constructed and manipulated naturally,
+ and changes are synchronized with the
+ current transaction automatically.
+* A relationally-oriented query system, exposing
+ the full range of SQL's capabilities
+ explicitly, including joins, subqueries,
+ correlation, and most everything else,
+ in terms of the object model.
+ Writing queries with the ORM uses the same
+ techniques of relational composition you use
+ when writing SQL. While you can drop into
+ literal SQL at any time, it's virtually never
+ needed.
+* A comprehensive and flexible system
+ of eager loading for related collections and objects.
+ Collections are cached within a session,
+ and can be loaded on individual access, all
+ at once using joins, or by query per collection
+ across the full result set.
+* A Core SQL construction system and DBAPI
+ interaction layer. The SQLAlchemy Core is
+ separate from the ORM and is a full database
+ abstraction layer in its own right, and includes
+ an extensible Python-based SQL expression
+ language, schema metadata, connection pooling,
+ type coercion, and custom types.
+* All primary and foreign key constraints are
+ assumed to be composite and natural. Surrogate
+ integer primary keys are of course still the
+ norm, but SQLAlchemy never assumes or hardcodes
+ to this model.
+* Database introspection and generation. Database
+ schemas can be "reflected" in one step into
+ Python structures representing database metadata;
+ those same structures can then generate
+ CREATE statements right back out - all within
+ the Core, independent of the ORM.
+
+SQLAlchemy's philosophy:
+
+* SQL databases behave less and less like object
+ collections the more size and performance start to
+ matter; object collections behave less and less like
+ tables and rows the more abstraction starts to matter.
+ SQLAlchemy aims to accommodate both of these
+ principles.
+* An ORM doesn't need to hide the "R". A relational
+ database provides rich, set-based functionality
+ that should be fully exposed. SQLAlchemy's
+ ORM provides an open-ended set of patterns
+ that allow a developer to construct a custom
+ mediation layer between a domain model and
+ a relational schema, turning the so-called
+ "object relational impedance" issue into
+ a distant memory.
+* The developer, in all cases, makes all decisions
+ regarding the design, structure, and naming conventions
+ of both the object model as well as the relational
+ schema. SQLAlchemy only provides the means
+ to automate the execution of these decisions.
+* With SQLAlchemy, there's no such thing as
+ "the ORM generated a bad query" - you
+ retain full control over the structure of
+ queries, including how joins are organized,
+ how subqueries and correlation is used, what
+ columns are requested. Everything SQLAlchemy
+ does is ultimately the result of a developer-
+ initiated decision.
+* Don't use an ORM if the problem doesn't need one.
+ SQLAlchemy consists of a Core and separate ORM
+ component. The Core offers a full SQL expression
+ language that allows Pythonic construction
+ of SQL constructs that render directly to SQL
+ strings for a target database, returning
+ result sets that are essentially enhanced DBAPI
+ cursors.
+* Transactions should be the norm. With SQLAlchemy's
+ ORM, nothing goes to permanent storage until
+ commit() is called. SQLAlchemy encourages applications
+ to create a consistent means of delineating
+ the start and end of a series of operations.
+* Never render a literal value in a SQL statement.
+ Bound parameters are used to the greatest degree
+ possible, allowing query optimizers to cache
+ query plans effectively and making SQL injection
+ attacks a non-issue.
+
+Documentation
+-------------
+
+Latest documentation is at:
+
+http://www.sqlalchemy.org/docs/
+
+Installation / Requirements
+---------------------------
+
+Full documentation for installation is at
+`Installation `_.
+
+Getting Help / Development / Bug reporting
+------------------------------------------
+
+Please refer to the `SQLAlchemy Community Guide `_.
+
+License
+-------
+
+SQLAlchemy is distributed under the `MIT license
+`_.
+
+
+
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/SQLAlchemy-1.0.13.dist-info/RECORD b/Assignments/microblog/flask/lib/python2.7/site-packages/SQLAlchemy-1.0.13.dist-info/RECORD
new file mode 100644
index 0000000..bf85a7d
--- /dev/null
+++ b/Assignments/microblog/flask/lib/python2.7/site-packages/SQLAlchemy-1.0.13.dist-info/RECORD
@@ -0,0 +1,373 @@
+SQLAlchemy-1.0.13.dist-info/DESCRIPTION.rst,sha256=ZN8fj2owI_rw0Emr3_RXqoNfTFkThjiZy7xcCzg1W_g,5013
+SQLAlchemy-1.0.13.dist-info/METADATA,sha256=SYcJCKMjtYXgdmsP1yoxRgolB36RdZ_O0JDrFmlhTqo,5786
+SQLAlchemy-1.0.13.dist-info/RECORD,,
+SQLAlchemy-1.0.13.dist-info/WHEEL,sha256=BtVfdXUcEYLcFjOkbIrCFRyXU4qszVPt-E9o3RWkSNw,93
+SQLAlchemy-1.0.13.dist-info/metadata.json,sha256=mf-aSsdzH6-GqVwjNTc4BneLvHMUzPi4a2J9h0v5GHk,965
+SQLAlchemy-1.0.13.dist-info/top_level.txt,sha256=rp-ZgB7D8G11ivXON5VGPjupT1voYmWqkciDt5Uaw_Q,11
+sqlalchemy/__init__.py,sha256=IlCGbiM1eAeE9gDVF4j0zkSe8gH17fQFOzlyuoBKwyQ,2112
+sqlalchemy/events.py,sha256=4gPVD8hBxWEUrzMpGiNcmDrpCMRaSqvps04offK-fVo,43942
+sqlalchemy/exc.py,sha256=NhA5R5nDdducWkp0MXtlQ0-Q6iF_rhqkHWblIfuSYGk,11706
+sqlalchemy/inspection.py,sha256=zMa-2nt-OQ0Op1dqq0Z2XCnpdAFSTkqif5Kdi8Wz8AU,3093
+sqlalchemy/interfaces.py,sha256=XSx5y-HittAzc79lU4C7rPbTtSW_Hc2c89NqCy50tsQ,10967
+sqlalchemy/log.py,sha256=opX7UORq5N6_jWxN9aHX9OpiirwAcRA0qq-u5m4SMkQ,6712
+sqlalchemy/pool.py,sha256=-F51TIJYl0XGTV2_sdpV8C1m0jTTQaq0nAezdmSgr84,47220
+sqlalchemy/processors.py,sha256=Li1kdC-I0v03JxeOz4V7u4HAevK6LledyCPvaL06mYc,5220
+sqlalchemy/schema.py,sha256=rZzZJJ8dT9trLSYknFpHm0N1kRERYwhqHH3QD31SJjc,1182
+sqlalchemy/types.py,sha256=qcoy5xKaurDV4kaXr489GL2sz8FKkWX21Us3ZCqeasg,1650
+sqlalchemy/connectors/__init__.py,sha256=97YbriYu5mcljh7opc1JOScRlf3Tk8ldbn5urBVm4WY,278
+sqlalchemy/connectors/mxodbc.py,sha256=-0iqw2k8e-o3OkAKzoCWuAaEPxlEjslvfRM9hnVXENM,5348
+sqlalchemy/connectors/pyodbc.py,sha256=pG2yf3cEDtTr-w_m4to6jF5l8hZk6MJv69K3cg84NfY,6264
+sqlalchemy/connectors/zxJDBC.py,sha256=2KK_sVSgMsdW0ufZqAwgXjd1FsMb4hqbiUQRAkM0RYg,1868
+sqlalchemy/databases/__init__.py,sha256=BaQyAuMjXNpZYV47hCseHrDtPzTfSw-iqUQYxMWJddw,817
+sqlalchemy/dialects/__init__.py,sha256=7SMul8PL3gkbJRUwAwovHLae5qBBApRF-VcRwU-VtdU,1012
+sqlalchemy/dialects/postgres.py,sha256=heNVHys6E91DIBepXT3ls_4_6N8HTTahrZ49W5IR3M0,614
+sqlalchemy/dialects/firebird/__init__.py,sha256=QYmQ0SaGfq3YjDraCV9ALwqVW5A3KDUF0F6air_qp3Q,664
+sqlalchemy/dialects/firebird/base.py,sha256=IT0prWkh1TFSTke-BqGdVMGdof53zmWWk6zbJZ_TuuI,28170
+sqlalchemy/dialects/firebird/fdb.py,sha256=l4s6_8Z0HvqxgqGz0LNcKWP1qUmEc3M2XM718_drN34,4325
+sqlalchemy/dialects/firebird/kinterbasdb.py,sha256=kCsn2ed4u9fyjcyfEI3rXQdKvL05z9wtf5YjW9-NrvI,6299
+sqlalchemy/dialects/mssql/__init__.py,sha256=G12xmirGZgMzfUKZCA8BFfaCmqUDuYca9Fu2VP_eaks,1081
+sqlalchemy/dialects/mssql/adodbapi.py,sha256=dHZgS3pEDX39ixhlDfTtDcjCq6rdjF85VS7rIZ1TfYo,2493
+sqlalchemy/dialects/mssql/base.py,sha256=qLzF3-QRyM3eHfcJwy9UTTYANl9aeJog4pFeq23UCPg,68262
+sqlalchemy/dialects/mssql/information_schema.py,sha256=pwuTsgOCY5eSBW9w-g-pyJDRfyuZ_rOEXXNYRuAroCE,6418
+sqlalchemy/dialects/mssql/mxodbc.py,sha256=G9LypIeEizgxeShtDu2M7Vwm8NopnzaTmnZMD49mYeg,3856
+sqlalchemy/dialects/mssql/pymssql.py,sha256=fQE2el6WDwm8EeFqNn9qYXyw_oFPFqidA2zd1fXs8G0,3080
+sqlalchemy/dialects/mssql/pyodbc.py,sha256=LAamdDoPAMSTa0I-51PlJ_sVvyM5M4f99XQcz9mMZR8,9653
+sqlalchemy/dialects/mssql/zxjdbc.py,sha256=u4uBgwk0LbI7_I5CIvM3C4bBb0pmrw2_DqRh_ehJTkI,2282
+sqlalchemy/dialects/mysql/__init__.py,sha256=3cQ2juPT8LsZTicPa2J-0rCQjQIQaPgyBzxjV3O_7xs,1171
+sqlalchemy/dialects/mysql/base.py,sha256=HZA1lxTNHYRVxeMeAw8RwJz2lYbRRYY1qJ5J_SujC9Q,123316
+sqlalchemy/dialects/mysql/cymysql.py,sha256=nqsdQA8LBLIc6eilgX6qwkjm7szsUoqMTVYwK9kkfsE,2349
+sqlalchemy/dialects/mysql/gaerdbms.py,sha256=2MxtTsIqlpq_J32HHqDzz-5vu-mC51Lb7PvyGkJa73M,3387
+sqlalchemy/dialects/mysql/mysqlconnector.py,sha256=DMDm684Shk-ijVo7w-yidopYw7EC6EiOmJY56EPawok,5323
+sqlalchemy/dialects/mysql/mysqldb.py,sha256=McqROngxAknbLOXoUAG9o9mP9FQBLs-ouD-JqqI2Ses,6564
+sqlalchemy/dialects/mysql/oursql.py,sha256=rmdr-r66iJ2amqFeGvCohvE8WCl_i6R9KcgVG0uXOQs,8124
+sqlalchemy/dialects/mysql/pymysql.py,sha256=e-qehI-sASmAjEa0ajHqjZjlyJYWsb3RPQY4iBR5pz0,1504
+sqlalchemy/dialects/mysql/pyodbc.py,sha256=Ze9IOKw6ANVQj25IlmSGR8aaJhM0pMuRtbzKF7UsZCY,2665
+sqlalchemy/dialects/mysql/zxjdbc.py,sha256=LIhe2mHSRVgi8I7qmiTMVBRSpuWJVnuDtpHTUivIx0M,3942
+sqlalchemy/dialects/oracle/__init__.py,sha256=UhF2ZyPfT3EFAnP8ZjGng6GnWSzmAkjMax0Lucpn0Bg,797
+sqlalchemy/dialects/oracle/base.py,sha256=2KJO-sU2CVKK1rij6bAQ5ZFJv203_NmzT8dE5qor9wc,55961
+sqlalchemy/dialects/oracle/cx_oracle.py,sha256=rQPBYvlS0KZIcw4Pg1ARlGKdmOUcR0xsGge0CXVhxfs,38765
+sqlalchemy/dialects/oracle/zxjdbc.py,sha256=nC7XOCY3NdTLrEyIacNTnLDCaeVjWn59q8UYssJL8Wo,8112
+sqlalchemy/dialects/postgresql/__init__.py,sha256=SjCtM5b3EaGyRaTyg_i82sh_qjkLEIVUXW91XDihiCM,1299
+sqlalchemy/dialects/postgresql/base.py,sha256=ROjdkxuL-uaetkvSiL1Smvc-YIMGz_gkdHE9rCjdZW4,104237
+sqlalchemy/dialects/postgresql/constraints.py,sha256=8UDx_2TNQgqIUSRETZPhgninJigQ6rMfdRNI6vIt3Is,3119
+sqlalchemy/dialects/postgresql/hstore.py,sha256=n8Wsd7Uldk3bbg66tTa0NKjVqjhJUbF1mVeUsM7keXA,11402
+sqlalchemy/dialects/postgresql/json.py,sha256=MTlIGinMDa8iaVbZMOzYnremo0xL4tn2wyGTPwnvX6U,12215
+sqlalchemy/dialects/postgresql/pg8000.py,sha256=x6o3P8Ad0wKsuF9qeyip39BKc5ORJZ4nWxv-8qOdj0E,8375
+sqlalchemy/dialects/postgresql/psycopg2.py,sha256=Z6ubvg7bzVBBiyTebyvf1WGX4MgJlryRHHzyLQp3qEU,27019
+sqlalchemy/dialects/postgresql/psycopg2cffi.py,sha256=8R3POkJH8z8a2DxwKNmfmQOsxFqsg4tU_OnjGj3OfDA,1651
+sqlalchemy/dialects/postgresql/pypostgresql.py,sha256=raQRfZb8T9-c-jmq1w86Wci5QyiXgf_9_71OInT_sAw,2655
+sqlalchemy/dialects/postgresql/ranges.py,sha256=MihdGXMdmCM6ToIlrj7OJx9Qh_8BX8bv5PSaAepHmII,4814
+sqlalchemy/dialects/postgresql/zxjdbc.py,sha256=AhEGRiAy8q-GM0BStFcsLBgSwjxHkkwy2-BSroIoADo,1397
+sqlalchemy/dialects/sqlite/__init__.py,sha256=0wW0VOhE_RtFDpRcbwvvo3XtD6Y2-SDgG4K7468eh_w,736
+sqlalchemy/dialects/sqlite/base.py,sha256=_L9-854ITf8Fl2BgUymF9fKjDFvXSo7Pb2yuz1CMkDo,55007
+sqlalchemy/dialects/sqlite/pysqlcipher.py,sha256=sgXCqn8ZtNIeTDwyo253Kj5mn4TPlIW3AZCNNmURi2A,4129
+sqlalchemy/dialects/sqlite/pysqlite.py,sha256=G-Cg-iI-ErYsVjOH4UlQTEY9pLnLOLV89ik8q0-reuY,14980
+sqlalchemy/dialects/sybase/__init__.py,sha256=gwCgFR_C_hoj0Re7PiaW3zmKSWaLpsd96UVXdM7EnTM,894
+sqlalchemy/dialects/sybase/base.py,sha256=Xpl3vEd5VDyvoIRMg0DZa48Or--yBSrhaZ2CbTSCt0w,28853
+sqlalchemy/dialects/sybase/mxodbc.py,sha256=E_ask6yFSjyhNPvv7gQsvA41WmyxbBvRGWjCyPVr9Gs,901
+sqlalchemy/dialects/sybase/pyodbc.py,sha256=0a_gKwrIweJGcz3ZRYuQZb5BIvwjGmFEYBo9wGk66kI,2102
+sqlalchemy/dialects/sybase/pysybase.py,sha256=tu2V_EbtgxWYOvt-ybo5_lLiBQzsIFaAtF8e7S1_-rk,3208
+sqlalchemy/engine/__init__.py,sha256=orab-ubkvGHzmhExRx2e6zg1hvNOiF1AU-i48xMqcvc,18837
+sqlalchemy/engine/base.py,sha256=cRqbbG0QuUG-NGs3GOPVQsU0WLsw5bLT0Y07Yf8OOfU,79399
+sqlalchemy/engine/default.py,sha256=U_yaliCazUHp6cfk_NVzhB4F_zOJSyy959rHyk40J4M,36548
+sqlalchemy/engine/interfaces.py,sha256=CmPYM_oDp1zAPH13sKmufO4Tuha6KA-fXRQq-K_3YTE,35908
+sqlalchemy/engine/reflection.py,sha256=jly5YN-cyjoBDxHs9qO6Mlgm1OZSb2NBNFALwZMEGxE,28590
+sqlalchemy/engine/result.py,sha256=LTgsoIZshkIpKwPRaLiUPBJYfHSLUqx-exVOYXKwsxg,44359
+sqlalchemy/engine/strategies.py,sha256=mwy-CTrnXzyaIA1TRQBQ_Z2O8wN0lnTNZwDefEWCR9A,8929
+sqlalchemy/engine/threadlocal.py,sha256=y4wOLjtbeY-dvp2GcJDtos6F2jzfP11JVAaSFwZ0zRM,4191
+sqlalchemy/engine/url.py,sha256=ZhS_Iqiu6V1kfIM2pcv3ud9fOPXkFOHBv8wiLOqbJhc,8228
+sqlalchemy/engine/util.py,sha256=Tvb9sIkyd6qOwIA-RsBmo5j877UXa5x-jQmhqnhHWRA,2338
+sqlalchemy/event/__init__.py,sha256=KnUVp-NVX6k276ntGffxgkjVmIWR22FSlzrbAKqQ6S4,419
+sqlalchemy/event/api.py,sha256=O2udbj5D7HdXcvsGBQk6-dK9CAFfePTypWOrUdqmhYY,5990
+sqlalchemy/event/attr.py,sha256=VfRJJl4RD24mQaIoDwArWL2hsGOX6ISSU6vKusVMNO0,12053
+sqlalchemy/event/base.py,sha256=DWDKZV19fFsLavu2cXOxXV8NhO3XuCbKcKamBKyXuME,9540
+sqlalchemy/event/legacy.py,sha256=ACnVeBUt8uwVfh1GNRu22cWCADC3CWZdrsBKzAd6UQQ,5814
+sqlalchemy/event/registry.py,sha256=13wx1qdEmcQeCoAmgf_WQEMuR43h3v7iyd2Re54QdOE,7786
+sqlalchemy/ext/__init__.py,sha256=smCZIGgjJprT4ddhuYSLZ8PrTn4NdXPP3j03a038SdE,322
+sqlalchemy/ext/associationproxy.py,sha256=y61Y4UIZNBit5lqk2WzdHTCXIWRrBg3hHbRVsqXjnqE,33422
+sqlalchemy/ext/automap.py,sha256=Aet-3zk2vbsJVLqigwZJYau0hB1D6Y21K65QVWeB5pc,41567
+sqlalchemy/ext/baked.py,sha256=BnVaB4pkQxHk-Fyz4nUw225vCxO_zrDuVC6t5cSF9x8,16967
+sqlalchemy/ext/compiler.py,sha256=aSSlySoTsqN-JkACWFIhv3pq2CuZwxKm6pSDfQoc10Q,16257
+sqlalchemy/ext/horizontal_shard.py,sha256=XEBYIfs0YrTt_2vRuaBY6C33ZOZMUHQb2E4X2s3Szns,4814
+sqlalchemy/ext/hybrid.py,sha256=wNXvuYEEmKy-Nc6z7fu1c2gNWCMOiQA0N14Y3FCq5lo,27989
+sqlalchemy/ext/instrumentation.py,sha256=HRgNiuYJ90_uSKC1iDwsEl8_KXscMQkEb9KeElk-yLE,14856
+sqlalchemy/ext/mutable.py,sha256=lx7b_ewFVe7O6I4gTXdi9M6C6TqxWCFiViqCM2VwUac,25444
+sqlalchemy/ext/orderinglist.py,sha256=UCkuZxTWAQ0num-b5oNm8zNJAmVuIFcbFXt5e7JPx-U,13816
+sqlalchemy/ext/serializer.py,sha256=fK3N1miYF16PSIZDjLFS2zI7y-scZ9qtmopXIfzPqrA,5586
+sqlalchemy/ext/declarative/__init__.py,sha256=Jpwf2EukqwNe4RzDfCmX1p-hQ6pPhJEIL_xunaER3tw,756
+sqlalchemy/ext/declarative/api.py,sha256=PdoO_jh50TWaMvXqnjNh-vX42VqB75ZyliluilphvsU,23317
+sqlalchemy/ext/declarative/base.py,sha256=ZVSQ-6ifPKpnSyoD4OjZk_oJUkgMPdRGi-Obbn6C6MM,25290
+sqlalchemy/ext/declarative/clsregistry.py,sha256=jaLLSr-66XvLnA1Z9kxjKatH_XHxWchqEXMKwvjKAXk,10817
+sqlalchemy/orm/__init__.py,sha256=UzDockQEVMaWvr-FE4y1rptrMb5uX5k8v_UNQs82qFY,8033
+sqlalchemy/orm/attributes.py,sha256=OmXkppJEZxRGc0acZZZkSbUhdfDl8ry3Skmvzl3OtLQ,56510
+sqlalchemy/orm/base.py,sha256=nS21na3Yx76UJzhWjzPLud1Ny0Xbmqx2DZQpVpHxHQM,14668
+sqlalchemy/orm/collections.py,sha256=TFutWIn_c07DI48FDOKMsFMnAoQB3BG2FnEMGzEF3iI,53549
+sqlalchemy/orm/dependency.py,sha256=phB8nS1788FSd4dWa2j9d4uj6QFlRL7nzcXvh3Bb7Zo,46192
+sqlalchemy/orm/deprecated_interfaces.py,sha256=A63t6ivbZB3Wq8vWgL8I05uTRR6whcWnIPkquuTIPXU,18254
+sqlalchemy/orm/descriptor_props.py,sha256=uk5r77w1VUWVgn0bkgOItkAlMh9FRgeT6OCgOHz3_bM,25141
+sqlalchemy/orm/dynamic.py,sha256=I_YP7X-H9HLjeFHmYgsOas6JPdqg0Aqe0kaltt4HVzA,13283
+sqlalchemy/orm/evaluator.py,sha256=o9E_mF3gPRa9HF_pNu-5twDe7865eFgO1FSCfoUB71s,4813
+sqlalchemy/orm/events.py,sha256=yRaoXlBL78b3l11itTrAy42UhLu42-7cgXKCFUGNXSg,69410
+sqlalchemy/orm/exc.py,sha256=P5lxi5RMFokiHL136VBK0AP3UmAlJcSDHtzgo-M6Kgs,5439
+sqlalchemy/orm/identity.py,sha256=zsb8xOZaPYKvs4sGhyxW21mILQDrtdSuzD4sTyeKdJs,9021
+sqlalchemy/orm/instrumentation.py,sha256=xtq9soM3mpMws7xqNJIFYXqKw65p2nnxCTfmMpuvpeI,17510
+sqlalchemy/orm/interfaces.py,sha256=AqitvZ_BBkB6L503uhdH55nxHplleJ2kQMwM7xKq9Sc,21552
+sqlalchemy/orm/loading.py,sha256=ZlxQszfG776WPVd5EHzPMdYat5IgmFltQ7QErMU3dtI,22885
+sqlalchemy/orm/mapper.py,sha256=W5oPLRtZ7AwJxtPPWoZGaT1_5xZNu1fJyq15P5DTJog,115133
+sqlalchemy/orm/path_registry.py,sha256=8Pah0P8yPVUyRjoET7DvIMGtM5PC8HZJC4GtxAyqVAs,8370
+sqlalchemy/orm/persistence.py,sha256=WzUUNm1UGm5mGxbv94hLTQowEDNoXfU1VoyGnoKeN_g,51028
+sqlalchemy/orm/properties.py,sha256=HR3eoY3Ze3FUPPNCXM_FruWz4pEMWrGlqtCGiK2G1qE,10426
+sqlalchemy/orm/query.py,sha256=frir4h863dRbadKCdys5XeBClZ-SDcvupVgKLaN6Dlo,148267
+sqlalchemy/orm/relationships.py,sha256=79LRGGz8MxsKsAlv0vuZ6MYZXzDXXtfiOCZg-IQ9hiU,116992
+sqlalchemy/orm/scoping.py,sha256=Ao-K4iqg4pBp7Si5JOAlro5zUL_r500TC3lVLcFMLDs,6421
+sqlalchemy/orm/session.py,sha256=yctpvCsLUcFv9Sy8keT1SElZ2VH5DNScYtO7Z77ptYI,111314
+sqlalchemy/orm/state.py,sha256=4LwwftOtPQldH12SKZV2UFgzqPOCj40QfQ08knZs0_E,22984
+sqlalchemy/orm/strategies.py,sha256=DnOkNCpxb168IEpMihc4riby3oJutjhXsR_yqSf6Psc,59216
+sqlalchemy/orm/strategy_options.py,sha256=LqJWCzML6YCI_toThom_bvfZQAOj6WIb3MrO9K7K6bo,34974
+sqlalchemy/orm/sync.py,sha256=B-d-H1Gzw1TkflpvgJeQghwTzqObzhZCQdvEdSPyDeE,5451
+sqlalchemy/orm/unitofwork.py,sha256=EQvZ7RZ-u5wJT51BWTeMJJi-tt22YRnmqywGUCn0Qrc,23343
+sqlalchemy/orm/util.py,sha256=Mj3NXDd8Mwp4O5Vr5zvRGFUZRlB65WpExdDBFJp04wQ,38092
+sqlalchemy/sql/__init__.py,sha256=IFCJYIilmmAQRnSDhv9Y6LQUSpx6pUU5zp9VT7sOx0c,1737
+sqlalchemy/sql/annotation.py,sha256=8ncgAVUo5QCoinApKjREi8esWNMFklcBqie8Q42KsaQ,6136
+sqlalchemy/sql/base.py,sha256=TuXOp7z0Q30qKAjhgcsts6WGvRbvg6F7OBojMQAxjX0,20990
+sqlalchemy/sql/compiler.py,sha256=4szeiIUoO6kgj37d8skkDVdPJw5ZxYW6KmyTDDmnK3U,100569
+sqlalchemy/sql/crud.py,sha256=b-o2vT2CV2hIxdky9NpzvgEMHjbKxvF4tMgGdU4mLvs,19837
+sqlalchemy/sql/ddl.py,sha256=nkjd_B4lKwC2GeyPjE0ZtRB9RKXccQL1g1XoZ4p69sM,37540
+sqlalchemy/sql/default_comparator.py,sha256=QaowWtW4apULq_aohDvmj97j0sDtHQQjMRdNxXm83vk,10447
+sqlalchemy/sql/dml.py,sha256=7846H52IMJfMYi5Jd-Cv6Hy9hZM4dkonXbjfBjl5ED4,33330
+sqlalchemy/sql/elements.py,sha256=okDQjYYhPucEX5OmP6XFxWUauFLrpV3ucwIisTSVVGE,133812
+sqlalchemy/sql/expression.py,sha256=vFZ9MmBlC9Fg8IYzLMAwXgcsnXZhkZbUstY6dO8BFGY,5833
+sqlalchemy/sql/functions.py,sha256=CV-L1qZDfNx378--oh_g6I7BQomMfDrjOmwNT6JxkAA,18669
+sqlalchemy/sql/naming.py,sha256=foE2lAzngLCFXCeHrpv0S4zT23GCnZLCiata2MPo0kE,4662
+sqlalchemy/sql/operators.py,sha256=UeZgb7eRhWd4H7OfJZkx0ZWOjvo5chIUXQsBAIeeTDY,23013
+sqlalchemy/sql/schema.py,sha256=awhLY5YjUBah8ZYxW9FBfe6lH0v4fW0UJLTNApnx7E0,145511
+sqlalchemy/sql/selectable.py,sha256=o1Hom00WGHjI21Mdb5fkX-f0k2nksQNb_txT0KWK1zQ,118995
+sqlalchemy/sql/sqltypes.py,sha256=JGxizqIjO1WFuZpppWj1Yi5cvCyBczb1JqUQeuhQn8s,54879
+sqlalchemy/sql/type_api.py,sha256=Xe6yH4slgdLA8HRjT19GBOou51SS9o4oUhyK0xfn04c,42846
+sqlalchemy/sql/util.py,sha256=GhTktynNUK9LROR9YYSO0idy6mu6riDUkm-gt8bkfYI,20629
+sqlalchemy/sql/visitors.py,sha256=4ipGvAkqFaSAWgyNuKjx5x_ms8GIy9aq-wC5pj4-Z3g,10271
+sqlalchemy/testing/__init__.py,sha256=MwKimX0atzs_SmG2j74GXLiyI8O56e3DLq96tcoL0TM,1095
+sqlalchemy/testing/assertions.py,sha256=r1I2nHC599VZcY-5g0JYRQl8bl9kjkf6WFOooOmJ2eE,16112
+sqlalchemy/testing/assertsql.py,sha256=-fP9Iuhdu52BJoT1lEj_KED8jy5ay_XiJu7i4Ry9eWA,12335
+sqlalchemy/testing/config.py,sha256=nqvVm55Vk0BVNjk1Wj3aYR65j_EEEepfB-W9QSFLU-k,2469
+sqlalchemy/testing/distutils_run.py,sha256=tkURrZRwgFiSwseKm1iJRkSjKf2Rtsb3pOXRWtACTHI,247
+sqlalchemy/testing/engines.py,sha256=u6GlDMXt0FKqVTQe_QJ5JXAnkA6W-xdw6Fe_5gMAQhg,9359
+sqlalchemy/testing/entities.py,sha256=IXqTgAihV-1TZyxL0MWdZzu4rFtxdbWKWFetIJWNGM4,2992
+sqlalchemy/testing/exclusions.py,sha256=WuH_tVK5fZJWe8Hu2LzNB4HNQMa_iAUaGC-_6mHUdIM,12570
+sqlalchemy/testing/fixtures.py,sha256=q4nK-81z2EWs17TjeJtPmnaJUCtDdoUiIU7jgLq3l_w,10721
+sqlalchemy/testing/mock.py,sha256=vj5q-GzJrLW6mMVDLqsppxBu_p7K49VvjfiVt5tn0o8,630
+sqlalchemy/testing/pickleable.py,sha256=8I8M4H1XN29pZPMxZdYkmpKWfwzPsUn6WK5FX4UP9L4,2641
+sqlalchemy/testing/profiling.py,sha256=Q_wOTS5JtcGBcs2eCYIvoRoDS_FW_HcfEW3hXWB87Zg,8392
+sqlalchemy/testing/provision.py,sha256=OeTl4bRpkJi7_VJz2iE2NvUDEKGgoWKSkaOcUf4tahs,9198
+sqlalchemy/testing/replay_fixture.py,sha256=iAxg7XsFkKSCcJnrNPQNJfjMxOgeBAa-ShOkywWPJ4w,5429
+sqlalchemy/testing/requirements.py,sha256=aIdvbfugMzrlVdldEbpcwretX-zjiukPhPUSZgulrzU,19949
+sqlalchemy/testing/runner.py,sha256=hpNH6MNTif4TnBRySxpm92KgFwDK0mOa8eF7wZXumTI,1607
+sqlalchemy/testing/schema.py,sha256=agOzrIMvmuUCeVZY5mYjJ1eJmOP69-wa0gZALtNtJBk,3446
+sqlalchemy/testing/util.py,sha256=IJ688AWzichtXVwWgYf_A4BUbcXPGsK6BQP5fvY3h-U,7544
+sqlalchemy/testing/warnings.py,sha256=-KskRAh1RkJ_69UIY_WR7i15u21U3gDLQ6nKlnJT7_w,987
+sqlalchemy/testing/plugin/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
+sqlalchemy/testing/plugin/bootstrap.py,sha256=Iw8R-d1gqoz_NKFtPyGfdX56QPcQHny_9Lvwov65aVY,1634
+sqlalchemy/testing/plugin/noseplugin.py,sha256=In79x6zs9DOngfoYpaHojihWlSd4PeS7Nwzh3M_KNM4,2847
+sqlalchemy/testing/plugin/plugin_base.py,sha256=3d0jZWhjU3lmcwWpdI8N9frN8zrPPTXknFxRBVDCnh0,17154
+sqlalchemy/testing/plugin/pytestplugin.py,sha256=Pbc62y7Km0PHXd4M9dm5ThBwrlXkM4WtIX-W1pOaM84,5812
+sqlalchemy/testing/suite/__init__.py,sha256=wqCTrb28i5FwhQZOyXVlnz3mA94iQOUBio7lszkFq-g,471
+sqlalchemy/testing/suite/test_ddl.py,sha256=Baw0ou9nKdADmrRuXgWzF1FZx0rvkkw3JHc6yw5BN0M,1838
+sqlalchemy/testing/suite/test_dialect.py,sha256=ORQPXUt53XtO-5ENlWgs8BpsSdPBDjyMRl4W2UjXLI4,1165
+sqlalchemy/testing/suite/test_insert.py,sha256=nP0mgVpsVs72MHMADmihB1oXLbFBpsYsLGO3BlQ7RLU,8132
+sqlalchemy/testing/suite/test_reflection.py,sha256=HtJRsJ_vuNMrOhnPTvuIvRg66OakSaSpeCU36zhaSPg,24616
+sqlalchemy/testing/suite/test_results.py,sha256=oAcO1tD0I7c9ErMeSvSZBZfz1IBDMJHJTf64Y1pBodk,6685
+sqlalchemy/testing/suite/test_select.py,sha256=u0wAz1g-GrAFdZpG4zwSrVckVtjULvjlbd0Z1U1jHAA,5729
+sqlalchemy/testing/suite/test_sequence.py,sha256=fmBR4Pc5tOLSkXFxfcqwGx1z3xaxeJeUyqDnTakKTBU,3831
+sqlalchemy/testing/suite/test_types.py,sha256=UKa-ZPdpz16mVKvT-9ISRAfqdrqiKaE7IA-_phQQuxo,17088
+sqlalchemy/testing/suite/test_update_delete.py,sha256=r5p467r-EUsjEcWGfUE0VPIfN4LLXZpLRnnyBLyyjl4,1582
+sqlalchemy/util/__init__.py,sha256=G06a5vBxg27RtWzY6dPZHt1FO8qtOiy_2C9PHTTMblI,2520
+sqlalchemy/util/_collections.py,sha256=pvi-I6594-mF_3NPPaWGCOwswcviZOhCfTnBoyjhFuo,27891
+sqlalchemy/util/compat.py,sha256=gInErUyI0XdS590SIFSbjdmIdwn-hxFVyWYU12p_QqM,6873
+sqlalchemy/util/deprecations.py,sha256=D_LTsfb9jHokJtPEWNDRMJOc372xRGNjputAiTIysRU,4403
+sqlalchemy/util/langhelpers.py,sha256=Nhe3Y9ieK6JaFYejjYosVOjOSSIBT2V385Hu6HGcyZk,41607
+sqlalchemy/util/queue.py,sha256=rs3W0LDhKt7M_dlQEjYpI9KS-bzQmmwN38LE_-RRVvU,6548
+sqlalchemy/util/topological.py,sha256=xKsYjjAat4p8cdqRHKwibLzr6WONbPTC0X8Mqg7jYno,2794
+SQLAlchemy-1.0.13.dist-info/INSTALLER,sha256=zuuue4knoyJ-UwPPXg8fezS7VCrXJQrAP7zeNuwvFQg,4
+sqlalchemy/dialects/mssql/base.pyc,,
+sqlalchemy/event/__init__.pyc,,
+sqlalchemy/databases/__init__.pyc,,
+sqlalchemy/event/legacy.pyc,,
+sqlalchemy/engine/result.pyc,,
+sqlalchemy/sql/__init__.pyc,,
+sqlalchemy/testing/replay_fixture.pyc,,
+sqlalchemy/testing/entities.pyc,,
+sqlalchemy/orm/scoping.pyc,,
+sqlalchemy/event/registry.pyc,,
+sqlalchemy/dialects/mssql/information_schema.pyc,,
+sqlalchemy/types.pyc,,
+sqlalchemy/testing/pickleable.pyc,,
+sqlalchemy/dialects/sybase/base.pyc,,
+sqlalchemy/dialects/mysql/mysqlconnector.pyc,,
+sqlalchemy/sql/selectable.pyc,,
+sqlalchemy/orm/relationships.pyc,,
+sqlalchemy/dialects/sybase/__init__.pyc,,
+sqlalchemy/dialects/mysql/cymysql.pyc,,
+sqlalchemy/orm/strategy_options.pyc,,
+sqlalchemy/sql/ddl.pyc,,
+sqlalchemy/engine/threadlocal.pyc,,
+sqlalchemy/dialects/postgresql/json.pyc,,
+sqlalchemy/dialects/mssql/__init__.pyc,,
+sqlalchemy/schema.pyc,,
+sqlalchemy/dialects/mysql/gaerdbms.pyc,,
+sqlalchemy/testing/warnings.pyc,,
+sqlalchemy/dialects/postgresql/psycopg2cffi.pyc,,
+sqlalchemy/sql/dml.pyc,,
+sqlalchemy/orm/base.pyc,,
+sqlalchemy/testing/schema.pyc,,
+sqlalchemy/dialects/mysql/zxjdbc.pyc,,
+sqlalchemy/testing/suite/test_insert.pyc,,
+sqlalchemy/event/attr.pyc,,
+sqlalchemy/testing/util.pyc,,
+sqlalchemy/inspection.pyc,,
+sqlalchemy/dialects/mssql/mxodbc.pyc,,
+sqlalchemy/testing/suite/test_ddl.pyc,,
+sqlalchemy/connectors/zxJDBC.pyc,,
+sqlalchemy/ext/declarative/__init__.pyc,,
+sqlalchemy/dialects/sqlite/pysqlite.pyc,,
+sqlalchemy/dialects/oracle/zxjdbc.pyc,,
+sqlalchemy/dialects/postgresql/ranges.pyc,,
+sqlalchemy/testing/distutils_run.pyc,,
+sqlalchemy/dialects/postgresql/__init__.pyc,,
+sqlalchemy/testing/suite/test_dialect.pyc,,
+sqlalchemy/testing/exclusions.pyc,,
+sqlalchemy/ext/instrumentation.pyc,,
+sqlalchemy/engine/interfaces.pyc,,
+sqlalchemy/util/deprecations.pyc,,
+sqlalchemy/orm/dependency.pyc,,
+sqlalchemy/sql/util.pyc,,
+sqlalchemy/log.pyc,,
+sqlalchemy/ext/declarative/api.pyc,,
+sqlalchemy/orm/attributes.pyc,,
+sqlalchemy/orm/loading.pyc,,
+sqlalchemy/orm/identity.pyc,,
+sqlalchemy/connectors/mxodbc.pyc,,
+sqlalchemy/sql/annotation.pyc,,
+sqlalchemy/ext/orderinglist.pyc,,
+sqlalchemy/sql/default_comparator.pyc,,
+sqlalchemy/orm/instrumentation.pyc,,
+sqlalchemy/ext/__init__.pyc,,
+sqlalchemy/testing/assertions.pyc,,
+sqlalchemy/orm/__init__.pyc,,
+sqlalchemy/dialects/mssql/zxjdbc.pyc,,
+sqlalchemy/dialects/sqlite/__init__.pyc,,
+sqlalchemy/dialects/postgresql/psycopg2.pyc,,
+sqlalchemy/dialects/sqlite/base.pyc,,
+sqlalchemy/sql/elements.pyc,,
+sqlalchemy/orm/query.pyc,,
+sqlalchemy/connectors/__init__.pyc,,
+sqlalchemy/engine/reflection.pyc,,
+sqlalchemy/orm/properties.pyc,,
+sqlalchemy/sql/functions.pyc,,
+sqlalchemy/testing/suite/test_sequence.pyc,,
+sqlalchemy/ext/compiler.pyc,,
+sqlalchemy/dialects/firebird/__init__.pyc,,
+sqlalchemy/orm/collections.pyc,,
+sqlalchemy/ext/declarative/base.pyc,,
+sqlalchemy/ext/associationproxy.pyc,,
+sqlalchemy/dialects/__init__.pyc,,
+sqlalchemy/engine/base.pyc,,
+sqlalchemy/util/langhelpers.pyc,,
+sqlalchemy/ext/serializer.pyc,,
+sqlalchemy/dialects/mssql/adodbapi.pyc,,
+sqlalchemy/ext/horizontal_shard.pyc,,
+sqlalchemy/orm/descriptor_props.pyc,,
+sqlalchemy/testing/plugin/bootstrap.pyc,,
+sqlalchemy/dialects/postgresql/pypostgresql.pyc,,
+sqlalchemy/orm/exc.pyc,,
+sqlalchemy/event/base.pyc,,
+sqlalchemy/testing/provision.pyc,,
+sqlalchemy/testing/suite/test_results.pyc,,
+sqlalchemy/sql/compiler.pyc,,
+sqlalchemy/util/_collections.pyc,,
+sqlalchemy/engine/url.pyc,,
+sqlalchemy/testing/__init__.pyc,,
+sqlalchemy/orm/util.pyc,,
+sqlalchemy/engine/strategies.pyc,,
+sqlalchemy/dialects/postgresql/pg8000.pyc,,
+sqlalchemy/orm/deprecated_interfaces.pyc,,
+sqlalchemy/util/queue.pyc,,
+sqlalchemy/ext/declarative/clsregistry.pyc,,
+sqlalchemy/orm/strategies.pyc,,
+sqlalchemy/dialects/mysql/oursql.pyc,,
+sqlalchemy/event/api.pyc,,
+sqlalchemy/dialects/sybase/pysybase.pyc,,
+sqlalchemy/dialects/mssql/pyodbc.pyc,,
+sqlalchemy/sql/type_api.pyc,,
+sqlalchemy/dialects/postgres.pyc,,
+sqlalchemy/dialects/sybase/pyodbc.pyc,,
+sqlalchemy/sql/operators.pyc,,
+sqlalchemy/testing/suite/test_update_delete.pyc,,
+sqlalchemy/testing/plugin/plugin_base.pyc,,
+sqlalchemy/testing/suite/test_select.pyc,,
+sqlalchemy/sql/expression.pyc,,
+sqlalchemy/orm/evaluator.pyc,,
+sqlalchemy/testing/mock.pyc,,
+sqlalchemy/interfaces.pyc,,
+sqlalchemy/testing/runner.pyc,,
+sqlalchemy/dialects/oracle/cx_oracle.pyc,,
+sqlalchemy/dialects/oracle/base.pyc,,
+sqlalchemy/testing/config.pyc,,
+sqlalchemy/dialects/mysql/__init__.pyc,,
+sqlalchemy/sql/base.pyc,,
+sqlalchemy/dialects/postgresql/zxjdbc.pyc,,
+sqlalchemy/dialects/postgresql/constraints.pyc,,
+sqlalchemy/testing/assertsql.pyc,,
+sqlalchemy/testing/plugin/noseplugin.pyc,,
+sqlalchemy/pool.pyc,,
+sqlalchemy/dialects/postgresql/hstore.pyc,,
+sqlalchemy/dialects/mysql/pyodbc.pyc,,
+sqlalchemy/__init__.pyc,,
+sqlalchemy/ext/automap.pyc,,
+sqlalchemy/sql/visitors.pyc,,
+sqlalchemy/orm/session.pyc,,
+sqlalchemy/sql/crud.pyc,,
+sqlalchemy/sql/naming.pyc,,
+sqlalchemy/util/compat.pyc,,
+sqlalchemy/dialects/mysql/pymysql.pyc,,
+sqlalchemy/processors.pyc,,
+sqlalchemy/dialects/mysql/base.pyc,,
+sqlalchemy/dialects/oracle/__init__.pyc,,
+sqlalchemy/orm/persistence.pyc,,
+sqlalchemy/ext/baked.pyc,,
+sqlalchemy/util/__init__.pyc,,
+sqlalchemy/orm/events.pyc,,
+sqlalchemy/dialects/postgresql/base.pyc,,
+sqlalchemy/util/topological.pyc,,
+sqlalchemy/testing/requirements.pyc,,
+sqlalchemy/orm/dynamic.pyc,,
+sqlalchemy/orm/interfaces.pyc,,
+sqlalchemy/ext/hybrid.pyc,,
+sqlalchemy/testing/plugin/pytestplugin.pyc,,
+sqlalchemy/dialects/sqlite/pysqlcipher.pyc,,
+sqlalchemy/engine/__init__.pyc,,
+sqlalchemy/orm/mapper.pyc,,
+sqlalchemy/testing/profiling.pyc,,
+sqlalchemy/dialects/firebird/kinterbasdb.pyc,,
+sqlalchemy/testing/plugin/__init__.pyc,,
+sqlalchemy/orm/state.pyc,,
+sqlalchemy/dialects/mssql/pymssql.pyc,,
+sqlalchemy/exc.pyc,,
+sqlalchemy/ext/mutable.pyc,,
+sqlalchemy/testing/engines.pyc,,
+sqlalchemy/engine/util.pyc,,
+sqlalchemy/dialects/mysql/mysqldb.pyc,,
+sqlalchemy/testing/suite/__init__.pyc,,
+sqlalchemy/sql/sqltypes.pyc,,
+sqlalchemy/testing/suite/test_types.pyc,,
+sqlalchemy/dialects/firebird/base.pyc,,
+sqlalchemy/events.pyc,,
+sqlalchemy/orm/unitofwork.pyc,,
+sqlalchemy/testing/suite/test_reflection.pyc,,
+sqlalchemy/sql/schema.pyc,,
+sqlalchemy/dialects/sybase/mxodbc.pyc,,
+sqlalchemy/connectors/pyodbc.pyc,,
+sqlalchemy/engine/default.pyc,,
+sqlalchemy/testing/fixtures.pyc,,
+sqlalchemy/dialects/firebird/fdb.pyc,,
+sqlalchemy/orm/path_registry.pyc,,
+sqlalchemy/orm/sync.pyc,,
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/SQLAlchemy-1.0.13.dist-info/WHEEL b/Assignments/microblog/flask/lib/python2.7/site-packages/SQLAlchemy-1.0.13.dist-info/WHEEL
new file mode 100644
index 0000000..5a93381
--- /dev/null
+++ b/Assignments/microblog/flask/lib/python2.7/site-packages/SQLAlchemy-1.0.13.dist-info/WHEEL
@@ -0,0 +1,5 @@
+Wheel-Version: 1.0
+Generator: bdist_wheel (0.29.0)
+Root-Is-Purelib: true
+Tag: cp27-none-any
+
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/SQLAlchemy-1.0.13.dist-info/metadata.json b/Assignments/microblog/flask/lib/python2.7/site-packages/SQLAlchemy-1.0.13.dist-info/metadata.json
new file mode 100644
index 0000000..5875b84
--- /dev/null
+++ b/Assignments/microblog/flask/lib/python2.7/site-packages/SQLAlchemy-1.0.13.dist-info/metadata.json
@@ -0,0 +1 @@
+{"classifiers": ["Development Status :: 5 - Production/Stable", "Intended Audience :: Developers", "License :: OSI Approved :: MIT License", "Programming Language :: Python", "Programming Language :: Python :: 3", "Programming Language :: Python :: Implementation :: CPython", "Programming Language :: Python :: Implementation :: Jython", "Programming Language :: Python :: Implementation :: PyPy", "Topic :: Database :: Front-Ends", "Operating System :: OS Independent"], "extensions": {"python.details": {"contacts": [{"email": "mike_mp@zzzcomputing.com", "name": "Mike Bayer", "role": "author"}], "document_names": {"description": "DESCRIPTION.rst"}, "project_urls": {"Home": "http://www.sqlalchemy.org"}}}, "generator": "bdist_wheel (0.29.0)", "license": "MIT License", "metadata_version": "2.0", "name": "SQLAlchemy", "summary": "Database Abstraction Library", "test_requires": [{"requires": ["mock", "pytest (>=2.5.2)", "pytest-xdist"]}], "version": "1.0.13"}
\ No newline at end of file
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/SQLAlchemy-1.0.13.dist-info/top_level.txt b/Assignments/microblog/flask/lib/python2.7/site-packages/SQLAlchemy-1.0.13.dist-info/top_level.txt
new file mode 100644
index 0000000..39fb2be
--- /dev/null
+++ b/Assignments/microblog/flask/lib/python2.7/site-packages/SQLAlchemy-1.0.13.dist-info/top_level.txt
@@ -0,0 +1 @@
+sqlalchemy
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/Tempita-0.5.2-py2.7.egg-info/PKG-INFO b/Assignments/microblog/flask/lib/python2.7/site-packages/Tempita-0.5.2-py2.7.egg-info/PKG-INFO
new file mode 100644
index 0000000..12838dd
--- /dev/null
+++ b/Assignments/microblog/flask/lib/python2.7/site-packages/Tempita-0.5.2-py2.7.egg-info/PKG-INFO
@@ -0,0 +1,28 @@
+Metadata-Version: 1.1
+Name: Tempita
+Version: 0.5.2
+Summary: A very small text templating language
+Home-page: http://pythonpaste.org/tempita/
+Author: Ian Bicking
+Author-email: ianb@colorstudy.com
+License: MIT
+Description: Tempita is a small templating language for text substitution.
+
+ This isn't meant to be the Next Big Thing in templating; it's just a
+ handy little templating language for when your project outgrows
+ ``string.Template`` or ``%`` substitution. It's small, it embeds
+ Python in strings, and it doesn't do much else.
+
+ You can read about the `language
+ `_, the `interface
+ `_, and there's nothing
+ more to learn about it.
+
+Keywords: templating template language html
+Platform: UNKNOWN
+Classifier: Development Status :: 4 - Beta
+Classifier: Intended Audience :: Developers
+Classifier: License :: OSI Approved :: MIT License
+Classifier: Topic :: Text Processing
+Classifier: Programming Language :: Python :: 2
+Classifier: Programming Language :: Python :: 3
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/Tempita-0.5.2-py2.7.egg-info/SOURCES.txt b/Assignments/microblog/flask/lib/python2.7/site-packages/Tempita-0.5.2-py2.7.egg-info/SOURCES.txt
new file mode 100644
index 0000000..3a706ec
--- /dev/null
+++ b/Assignments/microblog/flask/lib/python2.7/site-packages/Tempita-0.5.2-py2.7.egg-info/SOURCES.txt
@@ -0,0 +1,11 @@
+setup.cfg
+setup.py
+Tempita.egg-info/PKG-INFO
+Tempita.egg-info/SOURCES.txt
+Tempita.egg-info/dependency_links.txt
+Tempita.egg-info/top_level.txt
+Tempita.egg-info/zip-safe
+tempita/__init__.py
+tempita/__main__.py
+tempita/_looper.py
+tempita/compat3.py
\ No newline at end of file
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/Tempita-0.5.2-py2.7.egg-info/dependency_links.txt b/Assignments/microblog/flask/lib/python2.7/site-packages/Tempita-0.5.2-py2.7.egg-info/dependency_links.txt
new file mode 100644
index 0000000..8b13789
--- /dev/null
+++ b/Assignments/microblog/flask/lib/python2.7/site-packages/Tempita-0.5.2-py2.7.egg-info/dependency_links.txt
@@ -0,0 +1 @@
+
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/Tempita-0.5.2-py2.7.egg-info/installed-files.txt b/Assignments/microblog/flask/lib/python2.7/site-packages/Tempita-0.5.2-py2.7.egg-info/installed-files.txt
new file mode 100644
index 0000000..2fa1557
--- /dev/null
+++ b/Assignments/microblog/flask/lib/python2.7/site-packages/Tempita-0.5.2-py2.7.egg-info/installed-files.txt
@@ -0,0 +1,13 @@
+../tempita/_looper.py
+../tempita/compat3.py
+../tempita/__main__.py
+../tempita/__init__.py
+../tempita/_looper.pyc
+../tempita/compat3.pyc
+../tempita/__main__.pyc
+../tempita/__init__.pyc
+dependency_links.txt
+zip-safe
+top_level.txt
+PKG-INFO
+SOURCES.txt
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/Tempita-0.5.2-py2.7.egg-info/top_level.txt b/Assignments/microblog/flask/lib/python2.7/site-packages/Tempita-0.5.2-py2.7.egg-info/top_level.txt
new file mode 100644
index 0000000..eddfc48
--- /dev/null
+++ b/Assignments/microblog/flask/lib/python2.7/site-packages/Tempita-0.5.2-py2.7.egg-info/top_level.txt
@@ -0,0 +1 @@
+tempita
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/Tempita-0.5.2-py2.7.egg-info/zip-safe b/Assignments/microblog/flask/lib/python2.7/site-packages/Tempita-0.5.2-py2.7.egg-info/zip-safe
new file mode 100644
index 0000000..8b13789
--- /dev/null
+++ b/Assignments/microblog/flask/lib/python2.7/site-packages/Tempita-0.5.2-py2.7.egg-info/zip-safe
@@ -0,0 +1 @@
+
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/Tempita-0.5.2.dist-info/DESCRIPTION.rst b/Assignments/microblog/flask/lib/python2.7/site-packages/Tempita-0.5.2.dist-info/DESCRIPTION.rst
new file mode 100644
index 0000000..eaaef7d
--- /dev/null
+++ b/Assignments/microblog/flask/lib/python2.7/site-packages/Tempita-0.5.2.dist-info/DESCRIPTION.rst
@@ -0,0 +1,13 @@
+Tempita is a small templating language for text substitution.
+
+This isn't meant to be the Next Big Thing in templating; it's just a
+handy little templating language for when your project outgrows
+``string.Template`` or ``%`` substitution. It's small, it embeds
+Python in strings, and it doesn't do much else.
+
+You can read about the `language
+`_, the `interface
+`_, and there's nothing
+more to learn about it.
+
+
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/Tempita-0.5.2.dist-info/INSTALLER b/Assignments/microblog/flask/lib/python2.7/site-packages/Tempita-0.5.2.dist-info/INSTALLER
new file mode 100644
index 0000000..a1b589e
--- /dev/null
+++ b/Assignments/microblog/flask/lib/python2.7/site-packages/Tempita-0.5.2.dist-info/INSTALLER
@@ -0,0 +1 @@
+pip
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/Tempita-0.5.2.dist-info/METADATA b/Assignments/microblog/flask/lib/python2.7/site-packages/Tempita-0.5.2.dist-info/METADATA
new file mode 100644
index 0000000..a911302
--- /dev/null
+++ b/Assignments/microblog/flask/lib/python2.7/site-packages/Tempita-0.5.2.dist-info/METADATA
@@ -0,0 +1,30 @@
+Metadata-Version: 2.0
+Name: Tempita
+Version: 0.5.2
+Summary: A very small text templating language
+Home-page: http://pythonpaste.org/tempita/
+Author: Ian Bicking
+Author-email: ianb@colorstudy.com
+License: MIT
+Keywords: templating template language html
+Platform: UNKNOWN
+Classifier: Development Status :: 4 - Beta
+Classifier: Intended Audience :: Developers
+Classifier: License :: OSI Approved :: MIT License
+Classifier: Topic :: Text Processing
+Classifier: Programming Language :: Python :: 2
+Classifier: Programming Language :: Python :: 3
+
+Tempita is a small templating language for text substitution.
+
+This isn't meant to be the Next Big Thing in templating; it's just a
+handy little templating language for when your project outgrows
+``string.Template`` or ``%`` substitution. It's small, it embeds
+Python in strings, and it doesn't do much else.
+
+You can read about the `language
+`_, the `interface
+`_, and there's nothing
+more to learn about it.
+
+
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/Tempita-0.5.2.dist-info/RECORD b/Assignments/microblog/flask/lib/python2.7/site-packages/Tempita-0.5.2.dist-info/RECORD
new file mode 100644
index 0000000..70af243
--- /dev/null
+++ b/Assignments/microblog/flask/lib/python2.7/site-packages/Tempita-0.5.2.dist-info/RECORD
@@ -0,0 +1,16 @@
+Tempita-0.5.2.dist-info/DESCRIPTION.rst,sha256=eRH0aA2kmcMlz7HialUSG0nmrvF-Uh0cmL7RcdQ3lOo,506
+Tempita-0.5.2.dist-info/METADATA,sha256=9HGuf1df8aaXEmJ_lVIwBs1FKw-eodEPJ5HssQIGoBU,1048
+Tempita-0.5.2.dist-info/RECORD,,
+Tempita-0.5.2.dist-info/WHEEL,sha256=BtVfdXUcEYLcFjOkbIrCFRyXU4qszVPt-E9o3RWkSNw,93
+Tempita-0.5.2.dist-info/metadata.json,sha256=bJC3chMyCyGYDLYITHpOC6sA2m3Jrxu5ip7mpjBGIVs,750
+Tempita-0.5.2.dist-info/top_level.txt,sha256=2y9rvt_84XtP01ieixzzLnKmE9uWXFZteDjBnAXpDow,8
+Tempita-0.5.2.dist-info/zip-safe,sha256=AbpHGcgLb-kRsJGnwFEktk7uzpZOCcBY74-YBdrKVGs,1
+tempita/__init__.py,sha256=Uo2M4yc2yNynJp302WC9_zCXMtIJ8or70l6A_fHjS6k,39809
+tempita/__main__.py,sha256=odLX23WPEN1ld-BWsAUHhT-npHpedjL9d_B0lijyNwk,49
+tempita/_looper.py,sha256=66Mm8ZGAi3plaxzgOH_BjXQjaOAIs1JzjyknIWMsQ60,4161
+tempita/compat3.py,sha256=E2xkA7B1Cjqcs4lyyRONHKX7dOVTsIr7W0yIXrgyzHI,849
+Tempita-0.5.2.dist-info/INSTALLER,sha256=zuuue4knoyJ-UwPPXg8fezS7VCrXJQrAP7zeNuwvFQg,4
+tempita/__init__.pyc,,
+tempita/__main__.pyc,,
+tempita/_looper.pyc,,
+tempita/compat3.pyc,,
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/Tempita-0.5.2.dist-info/WHEEL b/Assignments/microblog/flask/lib/python2.7/site-packages/Tempita-0.5.2.dist-info/WHEEL
new file mode 100644
index 0000000..5a93381
--- /dev/null
+++ b/Assignments/microblog/flask/lib/python2.7/site-packages/Tempita-0.5.2.dist-info/WHEEL
@@ -0,0 +1,5 @@
+Wheel-Version: 1.0
+Generator: bdist_wheel (0.29.0)
+Root-Is-Purelib: true
+Tag: cp27-none-any
+
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/Tempita-0.5.2.dist-info/metadata.json b/Assignments/microblog/flask/lib/python2.7/site-packages/Tempita-0.5.2.dist-info/metadata.json
new file mode 100644
index 0000000..668bf11
--- /dev/null
+++ b/Assignments/microblog/flask/lib/python2.7/site-packages/Tempita-0.5.2.dist-info/metadata.json
@@ -0,0 +1 @@
+{"classifiers": ["Development Status :: 4 - Beta", "Intended Audience :: Developers", "License :: OSI Approved :: MIT License", "Topic :: Text Processing", "Programming Language :: Python :: 2", "Programming Language :: Python :: 3"], "extensions": {"python.details": {"contacts": [{"email": "ianb@colorstudy.com", "name": "Ian Bicking", "role": "author"}], "document_names": {"description": "DESCRIPTION.rst"}, "project_urls": {"Home": "http://pythonpaste.org/tempita/"}}}, "generator": "bdist_wheel (0.29.0)", "keywords": ["templating", "template", "language", "html"], "license": "MIT", "metadata_version": "2.0", "name": "Tempita", "summary": "A very small text templating language", "test_requires": [{"requires": ["nose"]}], "version": "0.5.2"}
\ No newline at end of file
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/Tempita-0.5.2.dist-info/top_level.txt b/Assignments/microblog/flask/lib/python2.7/site-packages/Tempita-0.5.2.dist-info/top_level.txt
new file mode 100644
index 0000000..eddfc48
--- /dev/null
+++ b/Assignments/microblog/flask/lib/python2.7/site-packages/Tempita-0.5.2.dist-info/top_level.txt
@@ -0,0 +1 @@
+tempita
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/Tempita-0.5.2.dist-info/zip-safe b/Assignments/microblog/flask/lib/python2.7/site-packages/Tempita-0.5.2.dist-info/zip-safe
new file mode 100644
index 0000000..8b13789
--- /dev/null
+++ b/Assignments/microblog/flask/lib/python2.7/site-packages/Tempita-0.5.2.dist-info/zip-safe
@@ -0,0 +1 @@
+
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/WTForms-2.1-py2.7.egg-info/PKG-INFO b/Assignments/microblog/flask/lib/python2.7/site-packages/WTForms-2.1-py2.7.egg-info/PKG-INFO
new file mode 100644
index 0000000..c5694fc
--- /dev/null
+++ b/Assignments/microblog/flask/lib/python2.7/site-packages/WTForms-2.1-py2.7.egg-info/PKG-INFO
@@ -0,0 +1,22 @@
+Metadata-Version: 1.1
+Name: WTForms
+Version: 2.1
+Summary: A flexible forms validation and rendering library for python web development.
+Home-page: http://wtforms.simplecodes.com/
+Author: Thomas Johansson, James Crasta
+Author-email: wtforms@simplecodes.com
+License: BSD
+Description: UNKNOWN
+Platform: UNKNOWN
+Classifier: Development Status :: 5 - Production/Stable
+Classifier: Environment :: Web Environment
+Classifier: Intended Audience :: Developers
+Classifier: License :: OSI Approved :: BSD License
+Classifier: Operating System :: OS Independent
+Classifier: Programming Language :: Python
+Classifier: Programming Language :: Python :: 2.6
+Classifier: Programming Language :: Python :: 2.7
+Classifier: Programming Language :: Python :: 3
+Classifier: Programming Language :: Python :: 3.3
+Classifier: Topic :: Internet :: WWW/HTTP :: Dynamic Content
+Classifier: Topic :: Software Development :: Libraries :: Python Modules
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/WTForms-2.1-py2.7.egg-info/SOURCES.txt b/Assignments/microblog/flask/lib/python2.7/site-packages/WTForms-2.1-py2.7.egg-info/SOURCES.txt
new file mode 100644
index 0000000..a864290
--- /dev/null
+++ b/Assignments/microblog/flask/lib/python2.7/site-packages/WTForms-2.1-py2.7.egg-info/SOURCES.txt
@@ -0,0 +1,206 @@
+AUTHORS.txt
+CHANGES.rst
+LICENSE.txt
+MANIFEST.in
+README.md
+setup.cfg
+setup.py
+WTForms.egg-info/PKG-INFO
+WTForms.egg-info/SOURCES.txt
+WTForms.egg-info/dependency_links.txt
+WTForms.egg-info/requires.txt
+WTForms.egg-info/top_level.txt
+docs/Makefile
+docs/changes.rst
+docs/conf.py
+docs/contributing.rst
+docs/crash_course.rst
+docs/csrf.rst
+docs/ext.rst
+docs/faq.rst
+docs/fields.rst
+docs/forms.rst
+docs/i18n.rst
+docs/index.rst
+docs/make.bat
+docs/meta.rst
+docs/specific_problems.rst
+docs/validators.rst
+docs/whats_new.rst
+docs/widgets.rst
+docs/_static/docstyles.css
+docs/_static/main.css
+docs/_static/wtforms.png
+docs/_templates/layout.html
+docs/html/.buildinfo
+docs/html/changes.html
+docs/html/contributing.html
+docs/html/crash_course.html
+docs/html/csrf.html
+docs/html/ext.html
+docs/html/faq.html
+docs/html/fields.html
+docs/html/forms.html
+docs/html/genindex.html
+docs/html/i18n.html
+docs/html/index.html
+docs/html/meta.html
+docs/html/objects.inv
+docs/html/py-modindex.html
+docs/html/search.html
+docs/html/searchindex.js
+docs/html/specific_problems.html
+docs/html/validators.html
+docs/html/whats_new.html
+docs/html/widgets.html
+docs/html/_sources/changes.txt
+docs/html/_sources/contributing.txt
+docs/html/_sources/crash_course.txt
+docs/html/_sources/csrf.txt
+docs/html/_sources/ext.txt
+docs/html/_sources/faq.txt
+docs/html/_sources/fields.txt
+docs/html/_sources/forms.txt
+docs/html/_sources/i18n.txt
+docs/html/_sources/index.txt
+docs/html/_sources/meta.txt
+docs/html/_sources/specific_problems.txt
+docs/html/_sources/validators.txt
+docs/html/_sources/whats_new.txt
+docs/html/_sources/widgets.txt
+docs/html/_static/ajax-loader.gif
+docs/html/_static/alabaster.css
+docs/html/_static/basic.css
+docs/html/_static/comment-bright.png
+docs/html/_static/comment-close.png
+docs/html/_static/comment.png
+docs/html/_static/docstyles.css
+docs/html/_static/doctools.js
+docs/html/_static/down-pressed.png
+docs/html/_static/down.png
+docs/html/_static/file.png
+docs/html/_static/jquery-1.11.1.js
+docs/html/_static/jquery.js
+docs/html/_static/main.css
+docs/html/_static/minus.png
+docs/html/_static/plus.png
+docs/html/_static/pygments.css
+docs/html/_static/searchtools.js
+docs/html/_static/underscore-1.3.1.js
+docs/html/_static/underscore.js
+docs/html/_static/up-pressed.png
+docs/html/_static/up.png
+docs/html/_static/websupport.js
+docs/html/_static/wtforms.png
+tests/__init__.py
+tests/common.py
+tests/csrf.py
+tests/ext_csrf.py
+tests/ext_dateutil.py
+tests/ext_sqlalchemy.py
+tests/fields.py
+tests/form.py
+tests/i18n.py
+tests/locale_babel.py
+tests/runtests.py
+tests/test_requirements.txt
+tests/validators.py
+tests/webob_wrapper.py
+tests/widgets.py
+tests/ext_appengine/__init__.py
+tests/ext_appengine/app.yaml
+tests/ext_appengine/gaetest_common.py
+tests/ext_appengine/test_ndb.py
+tests/ext_appengine/tests.py
+tests/ext_django/__init__.py
+tests/ext_django/models.py
+tests/ext_django/tests.py
+tests/ext_django/fixtures/ext_django.json
+wtforms/__init__.py
+wtforms/compat.py
+wtforms/form.py
+wtforms/i18n.py
+wtforms/meta.py
+wtforms/utils.py
+wtforms/validators.py
+wtforms/csrf/__init__.py
+wtforms/csrf/core.py
+wtforms/csrf/session.py
+wtforms/ext/__init__.py
+wtforms/ext/appengine/__init__.py
+wtforms/ext/appengine/db.py
+wtforms/ext/appengine/fields.py
+wtforms/ext/appengine/ndb.py
+wtforms/ext/csrf/__init__.py
+wtforms/ext/csrf/fields.py
+wtforms/ext/csrf/form.py
+wtforms/ext/csrf/session.py
+wtforms/ext/dateutil/__init__.py
+wtforms/ext/dateutil/fields.py
+wtforms/ext/django/__init__.py
+wtforms/ext/django/fields.py
+wtforms/ext/django/i18n.py
+wtforms/ext/django/orm.py
+wtforms/ext/django/templatetags/__init__.py
+wtforms/ext/django/templatetags/wtforms.py
+wtforms/ext/i18n/__init__.py
+wtforms/ext/i18n/form.py
+wtforms/ext/i18n/utils.py
+wtforms/ext/sqlalchemy/__init__.py
+wtforms/ext/sqlalchemy/fields.py
+wtforms/ext/sqlalchemy/orm.py
+wtforms/fields/__init__.py
+wtforms/fields/core.py
+wtforms/fields/html5.py
+wtforms/fields/simple.py
+wtforms/locale/README.md
+wtforms/locale/wtforms.pot
+wtforms/locale/ar/LC_MESSAGES/wtforms.mo
+wtforms/locale/ar/LC_MESSAGES/wtforms.po
+wtforms/locale/ca/LC_MESSAGES/wtforms.mo
+wtforms/locale/ca/LC_MESSAGES/wtforms.po
+wtforms/locale/cs_CZ/LC_MESSAGES/wtforms.mo
+wtforms/locale/cs_CZ/LC_MESSAGES/wtforms.po
+wtforms/locale/cy/LC_MESSAGES/wtforms.mo
+wtforms/locale/cy/LC_MESSAGES/wtforms.po
+wtforms/locale/de/LC_MESSAGES/wtforms.mo
+wtforms/locale/de/LC_MESSAGES/wtforms.po
+wtforms/locale/de_CH/LC_MESSAGES/wtforms.mo
+wtforms/locale/de_CH/LC_MESSAGES/wtforms.po
+wtforms/locale/el/LC_MESSAGES/wtforms.mo
+wtforms/locale/el/LC_MESSAGES/wtforms.po
+wtforms/locale/en/LC_MESSAGES/wtforms.mo
+wtforms/locale/en/LC_MESSAGES/wtforms.po
+wtforms/locale/es/LC_MESSAGES/wtforms.mo
+wtforms/locale/es/LC_MESSAGES/wtforms.po
+wtforms/locale/et/LC_MESSAGES/wtforms.mo
+wtforms/locale/et/LC_MESSAGES/wtforms.po
+wtforms/locale/fa/LC_MESSAGES/wtforms.mo
+wtforms/locale/fa/LC_MESSAGES/wtforms.po
+wtforms/locale/fr/LC_MESSAGES/wtforms.mo
+wtforms/locale/fr/LC_MESSAGES/wtforms.po
+wtforms/locale/it/LC_MESSAGES/wtforms.mo
+wtforms/locale/it/LC_MESSAGES/wtforms.po
+wtforms/locale/ja/LC_MESSAGES/wtforms.mo
+wtforms/locale/ja/LC_MESSAGES/wtforms.po
+wtforms/locale/ko/LC_MESSAGES/wtforms.mo
+wtforms/locale/ko/LC_MESSAGES/wtforms.po
+wtforms/locale/nb/LC_MESSAGES/wtforms.mo
+wtforms/locale/nb/LC_MESSAGES/wtforms.po
+wtforms/locale/nl/LC_MESSAGES/wtforms.mo
+wtforms/locale/nl/LC_MESSAGES/wtforms.po
+wtforms/locale/pl/LC_MESSAGES/wtforms.mo
+wtforms/locale/pl/LC_MESSAGES/wtforms.po
+wtforms/locale/pt/LC_MESSAGES/wtforms.mo
+wtforms/locale/pt/LC_MESSAGES/wtforms.po
+wtforms/locale/ru/LC_MESSAGES/wtforms.mo
+wtforms/locale/ru/LC_MESSAGES/wtforms.po
+wtforms/locale/uk/LC_MESSAGES/wtforms.mo
+wtforms/locale/uk/LC_MESSAGES/wtforms.po
+wtforms/locale/zh/LC_MESSAGES/wtforms.mo
+wtforms/locale/zh/LC_MESSAGES/wtforms.po
+wtforms/locale/zh_TW/LC_MESSAGES/wtforms.mo
+wtforms/locale/zh_TW/LC_MESSAGES/wtforms.po
+wtforms/widgets/__init__.py
+wtforms/widgets/core.py
+wtforms/widgets/html5.py
\ No newline at end of file
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/WTForms-2.1-py2.7.egg-info/dependency_links.txt b/Assignments/microblog/flask/lib/python2.7/site-packages/WTForms-2.1-py2.7.egg-info/dependency_links.txt
new file mode 100644
index 0000000..8b13789
--- /dev/null
+++ b/Assignments/microblog/flask/lib/python2.7/site-packages/WTForms-2.1-py2.7.egg-info/dependency_links.txt
@@ -0,0 +1 @@
+
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/WTForms-2.1-py2.7.egg-info/installed-files.txt b/Assignments/microblog/flask/lib/python2.7/site-packages/WTForms-2.1-py2.7.egg-info/installed-files.txt
new file mode 100644
index 0000000..b58e882
--- /dev/null
+++ b/Assignments/microblog/flask/lib/python2.7/site-packages/WTForms-2.1-py2.7.egg-info/installed-files.txt
@@ -0,0 +1,132 @@
+../wtforms/form.py
+../wtforms/i18n.py
+../wtforms/meta.py
+../wtforms/compat.py
+../wtforms/__init__.py
+../wtforms/validators.py
+../wtforms/utils.py
+../wtforms/csrf/session.py
+../wtforms/csrf/core.py
+../wtforms/csrf/__init__.py
+../wtforms/fields/html5.py
+../wtforms/fields/simple.py
+../wtforms/fields/core.py
+../wtforms/fields/__init__.py
+../wtforms/widgets/html5.py
+../wtforms/widgets/core.py
+../wtforms/widgets/__init__.py
+../wtforms/ext/__init__.py
+../wtforms/ext/appengine/db.py
+../wtforms/ext/appengine/ndb.py
+../wtforms/ext/appengine/__init__.py
+../wtforms/ext/appengine/fields.py
+../wtforms/ext/csrf/form.py
+../wtforms/ext/csrf/session.py
+../wtforms/ext/csrf/__init__.py
+../wtforms/ext/csrf/fields.py
+../wtforms/ext/dateutil/__init__.py
+../wtforms/ext/dateutil/fields.py
+../wtforms/ext/django/orm.py
+../wtforms/ext/django/i18n.py
+../wtforms/ext/django/__init__.py
+../wtforms/ext/django/fields.py
+../wtforms/ext/django/templatetags/wtforms.py
+../wtforms/ext/django/templatetags/__init__.py
+../wtforms/ext/i18n/form.py
+../wtforms/ext/i18n/__init__.py
+../wtforms/ext/i18n/utils.py
+../wtforms/ext/sqlalchemy/orm.py
+../wtforms/ext/sqlalchemy/__init__.py
+../wtforms/ext/sqlalchemy/fields.py
+../wtforms/locale/wtforms.pot
+../wtforms/locale/cy/LC_MESSAGES/wtforms.po
+../wtforms/locale/cy/LC_MESSAGES/wtforms.mo
+../wtforms/locale/uk/LC_MESSAGES/wtforms.po
+../wtforms/locale/uk/LC_MESSAGES/wtforms.mo
+../wtforms/locale/en/LC_MESSAGES/wtforms.po
+../wtforms/locale/en/LC_MESSAGES/wtforms.mo
+../wtforms/locale/fr/LC_MESSAGES/wtforms.po
+../wtforms/locale/fr/LC_MESSAGES/wtforms.mo
+../wtforms/locale/pl/LC_MESSAGES/wtforms.po
+../wtforms/locale/pl/LC_MESSAGES/wtforms.mo
+../wtforms/locale/it/LC_MESSAGES/wtforms.po
+../wtforms/locale/it/LC_MESSAGES/wtforms.mo
+../wtforms/locale/nb/LC_MESSAGES/wtforms.po
+../wtforms/locale/nb/LC_MESSAGES/wtforms.mo
+../wtforms/locale/et/LC_MESSAGES/wtforms.po
+../wtforms/locale/et/LC_MESSAGES/wtforms.mo
+../wtforms/locale/ru/LC_MESSAGES/wtforms.po
+../wtforms/locale/ru/LC_MESSAGES/wtforms.mo
+../wtforms/locale/zh_TW/LC_MESSAGES/wtforms.po
+../wtforms/locale/zh_TW/LC_MESSAGES/wtforms.mo
+../wtforms/locale/fa/LC_MESSAGES/wtforms.po
+../wtforms/locale/fa/LC_MESSAGES/wtforms.mo
+../wtforms/locale/zh/LC_MESSAGES/wtforms.po
+../wtforms/locale/zh/LC_MESSAGES/wtforms.mo
+../wtforms/locale/nl/LC_MESSAGES/wtforms.po
+../wtforms/locale/nl/LC_MESSAGES/wtforms.mo
+../wtforms/locale/de/LC_MESSAGES/wtforms.po
+../wtforms/locale/de/LC_MESSAGES/wtforms.mo
+../wtforms/locale/ca/LC_MESSAGES/wtforms.po
+../wtforms/locale/ca/LC_MESSAGES/wtforms.mo
+../wtforms/locale/ja/LC_MESSAGES/wtforms.po
+../wtforms/locale/ja/LC_MESSAGES/wtforms.mo
+../wtforms/locale/de_CH/LC_MESSAGES/wtforms.po
+../wtforms/locale/de_CH/LC_MESSAGES/wtforms.mo
+../wtforms/locale/cs_CZ/LC_MESSAGES/wtforms.po
+../wtforms/locale/cs_CZ/LC_MESSAGES/wtforms.mo
+../wtforms/locale/ko/LC_MESSAGES/wtforms.po
+../wtforms/locale/ko/LC_MESSAGES/wtforms.mo
+../wtforms/locale/pt/LC_MESSAGES/wtforms.po
+../wtforms/locale/pt/LC_MESSAGES/wtforms.mo
+../wtforms/locale/es/LC_MESSAGES/wtforms.po
+../wtforms/locale/es/LC_MESSAGES/wtforms.mo
+../wtforms/locale/el/LC_MESSAGES/wtforms.po
+../wtforms/locale/el/LC_MESSAGES/wtforms.mo
+../wtforms/locale/ar/LC_MESSAGES/wtforms.po
+../wtforms/locale/ar/LC_MESSAGES/wtforms.mo
+../wtforms/form.pyc
+../wtforms/i18n.pyc
+../wtforms/meta.pyc
+../wtforms/compat.pyc
+../wtforms/__init__.pyc
+../wtforms/validators.pyc
+../wtforms/utils.pyc
+../wtforms/csrf/session.pyc
+../wtforms/csrf/core.pyc
+../wtforms/csrf/__init__.pyc
+../wtforms/fields/html5.pyc
+../wtforms/fields/simple.pyc
+../wtforms/fields/core.pyc
+../wtforms/fields/__init__.pyc
+../wtforms/widgets/html5.pyc
+../wtforms/widgets/core.pyc
+../wtforms/widgets/__init__.pyc
+../wtforms/ext/__init__.pyc
+../wtforms/ext/appengine/db.pyc
+../wtforms/ext/appengine/ndb.pyc
+../wtforms/ext/appengine/__init__.pyc
+../wtforms/ext/appengine/fields.pyc
+../wtforms/ext/csrf/form.pyc
+../wtforms/ext/csrf/session.pyc
+../wtforms/ext/csrf/__init__.pyc
+../wtforms/ext/csrf/fields.pyc
+../wtforms/ext/dateutil/__init__.pyc
+../wtforms/ext/dateutil/fields.pyc
+../wtforms/ext/django/orm.pyc
+../wtforms/ext/django/i18n.pyc
+../wtforms/ext/django/__init__.pyc
+../wtforms/ext/django/fields.pyc
+../wtforms/ext/django/templatetags/wtforms.pyc
+../wtforms/ext/django/templatetags/__init__.pyc
+../wtforms/ext/i18n/form.pyc
+../wtforms/ext/i18n/__init__.pyc
+../wtforms/ext/i18n/utils.pyc
+../wtforms/ext/sqlalchemy/orm.pyc
+../wtforms/ext/sqlalchemy/__init__.pyc
+../wtforms/ext/sqlalchemy/fields.pyc
+dependency_links.txt
+top_level.txt
+requires.txt
+PKG-INFO
+SOURCES.txt
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/WTForms-2.1-py2.7.egg-info/requires.txt b/Assignments/microblog/flask/lib/python2.7/site-packages/WTForms-2.1-py2.7.egg-info/requires.txt
new file mode 100644
index 0000000..b937ec2
--- /dev/null
+++ b/Assignments/microblog/flask/lib/python2.7/site-packages/WTForms-2.1-py2.7.egg-info/requires.txt
@@ -0,0 +1,6 @@
+
+[:python_version=="2.6"]
+ordereddict
+
+[Locale]
+Babel>=1.3
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/WTForms-2.1-py2.7.egg-info/top_level.txt b/Assignments/microblog/flask/lib/python2.7/site-packages/WTForms-2.1-py2.7.egg-info/top_level.txt
new file mode 100644
index 0000000..26d80fd
--- /dev/null
+++ b/Assignments/microblog/flask/lib/python2.7/site-packages/WTForms-2.1-py2.7.egg-info/top_level.txt
@@ -0,0 +1 @@
+wtforms
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/WTForms-2.1.dist-info/DESCRIPTION.rst b/Assignments/microblog/flask/lib/python2.7/site-packages/WTForms-2.1.dist-info/DESCRIPTION.rst
new file mode 100644
index 0000000..e118723
--- /dev/null
+++ b/Assignments/microblog/flask/lib/python2.7/site-packages/WTForms-2.1.dist-info/DESCRIPTION.rst
@@ -0,0 +1,3 @@
+UNKNOWN
+
+
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/WTForms-2.1.dist-info/INSTALLER b/Assignments/microblog/flask/lib/python2.7/site-packages/WTForms-2.1.dist-info/INSTALLER
new file mode 100644
index 0000000..a1b589e
--- /dev/null
+++ b/Assignments/microblog/flask/lib/python2.7/site-packages/WTForms-2.1.dist-info/INSTALLER
@@ -0,0 +1 @@
+pip
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/WTForms-2.1.dist-info/METADATA b/Assignments/microblog/flask/lib/python2.7/site-packages/WTForms-2.1.dist-info/METADATA
new file mode 100644
index 0000000..8989337
--- /dev/null
+++ b/Assignments/microblog/flask/lib/python2.7/site-packages/WTForms-2.1.dist-info/METADATA
@@ -0,0 +1,28 @@
+Metadata-Version: 2.0
+Name: WTForms
+Version: 2.1
+Summary: A flexible forms validation and rendering library for python web development.
+Home-page: http://wtforms.simplecodes.com/
+Author: Thomas Johansson, James Crasta
+Author-email: wtforms@simplecodes.com
+License: BSD
+Platform: UNKNOWN
+Classifier: Development Status :: 5 - Production/Stable
+Classifier: Environment :: Web Environment
+Classifier: Intended Audience :: Developers
+Classifier: License :: OSI Approved :: BSD License
+Classifier: Operating System :: OS Independent
+Classifier: Programming Language :: Python
+Classifier: Programming Language :: Python :: 2.6
+Classifier: Programming Language :: Python :: 2.7
+Classifier: Programming Language :: Python :: 3
+Classifier: Programming Language :: Python :: 3.3
+Classifier: Topic :: Internet :: WWW/HTTP :: Dynamic Content
+Classifier: Topic :: Software Development :: Libraries :: Python Modules
+Requires-Dist: ordereddict; python_version=="2.6"
+Provides-Extra: Locale
+Requires-Dist: Babel (>=1.3); extra == 'Locale'
+
+UNKNOWN
+
+
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/WTForms-2.1.dist-info/RECORD b/Assignments/microblog/flask/lib/python2.7/site-packages/WTForms-2.1.dist-info/RECORD
new file mode 100644
index 0000000..219323d
--- /dev/null
+++ b/Assignments/microblog/flask/lib/python2.7/site-packages/WTForms-2.1.dist-info/RECORD
@@ -0,0 +1,134 @@
+WTForms-2.1.dist-info/DESCRIPTION.rst,sha256=OCTuuN6LcWulhHS3d5rfjdsQtW22n7HENFRh6jC6ego,10
+WTForms-2.1.dist-info/METADATA,sha256=_TCh1-xCwXhUSqP7rhpXYkxWHse8in4ylDIYXnpOa80,1035
+WTForms-2.1.dist-info/RECORD,,
+WTForms-2.1.dist-info/WHEEL,sha256=o2k-Qa-RMNIJmUdIc7KU6VWR_ErNRbWNlxDIpl7lm34,110
+WTForms-2.1.dist-info/metadata.json,sha256=k1NdVgaUyRdEtNClMAuvG8OPNj34l3B9jRtLQy7SQ6w,1164
+WTForms-2.1.dist-info/top_level.txt,sha256=k5K62RAEkLEN23p118t3tRgvL6I_k56NiIU7Hk8Phv8,8
+wtforms/__init__.py,sha256=YUU7uQlI5PcpFIHEGgjlWSFkWGvK0CSdo3xZ5p1ghik,403
+wtforms/compat.py,sha256=buY-q7yLNO-2OlxA5QPAcdBO8urjZTtxvFnxg_1Euuo,589
+wtforms/form.py,sha256=ahME3_8CmTuvVsatV-AKqinBkOSEnLOE_nMeQLgrQEA,11608
+wtforms/i18n.py,sha256=RuMPdvfsxHGMqKySUy4DpMfEAzruPK_7gHe6GQTrekc,2175
+wtforms/meta.py,sha256=9yLQuKP4N_OiPBsPy3tBc7auldxhFryZweySDsKL8zI,3822
+wtforms/utils.py,sha256=Zg70vKv96pnHjrkSZ6KlzSo1noh20GV5IqfPy6FrOyA,1504
+wtforms/validators.py,sha256=Gg45QWx5vObnNOLilOlOw4kYfG51RJoCWJhcgGbe-ak,18963
+wtforms/csrf/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
+wtforms/csrf/core.py,sha256=Ot8eOSAZ88qeDBlSUhRqiLfyWA13g3EFJ4zWZ7EGYnc,3157
+wtforms/csrf/session.py,sha256=baww8MJ5YObyYItXX0Vz5AjxZTdOfTqti3zsD3koka0,3056
+wtforms/ext/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
+wtforms/ext/appengine/__init__.py,sha256=xXkE1qkwzkkBw4o0YhWGZSZXcsV60DaLxX4fkxNcNe8,269
+wtforms/ext/appengine/db.py,sha256=IEJng34ztXLVSlLxneZ7M4kgGOZOPf9zR_6RTqv6Z1Q,18588
+wtforms/ext/appengine/fields.py,sha256=8Z2BJy7ft0fu_vZksneZ7xdVxdqHkWIMNjgnyfdKtho,7574
+wtforms/ext/appengine/ndb.py,sha256=szIwWA5FyD2lqZefayl__C2UsXMEAGQndqPYPhOH4Vk,17124
+wtforms/ext/csrf/__init__.py,sha256=bIQ48rbnoYrYPZkkGz04b_7PZ8leQY_CExEqYw8yitI,45
+wtforms/ext/csrf/fields.py,sha256=Ta3vLg9KQkpUTCnDF-7CP3IW11X0UqqhvL68sAopYTs,430
+wtforms/ext/csrf/form.py,sha256=ZxmvC3Um2qYeUncu6D390-W62mVQclzwPLP9_R7GedU,1785
+wtforms/ext/csrf/session.py,sha256=aKYb9_jgEmxIgvWuk0cdx9YAGTi9s3F4xy_0ibxyhbo,2627
+wtforms/ext/dateutil/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
+wtforms/ext/dateutil/fields.py,sha256=RlupqB1WX_HiKJEYqi9IAxiCElxgbBDHHuXrGF4nbYs,3429
+wtforms/ext/django/__init__.py,sha256=OQ0wr3s5_cUmUU7htHXhobyxVWJS16Ve4qBK_PLs_rw,259
+wtforms/ext/django/fields.py,sha256=pEWxaAtMq5_p8QaJPOffWsX7U4LB5f8Bq8ZBw4fedxk,4580
+wtforms/ext/django/i18n.py,sha256=VLvzJ8lQOqs5Uxnhe4aOE5StGgPEvGhfBEHNrRQFtp0,626
+wtforms/ext/django/orm.py,sha256=Mme5i_o_bJTXGKkabRz03EJmGggPMejAg95XNhYtNUc,6096
+wtforms/ext/django/templatetags/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
+wtforms/ext/django/templatetags/wtforms.py,sha256=iCOicSMEkixm5bcJHz35Zx0h6xVwnz1H9JglB_hU69o,2826
+wtforms/ext/i18n/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
+wtforms/ext/i18n/form.py,sha256=mfsavr4LGI1GhoFLsWSuSqVPHH6QNiyqoAfY94u-XP0,1608
+wtforms/ext/i18n/utils.py,sha256=rx9-pNYjIp8DLU-VQ9XxRSXHYZuFv4ktRejzVBPTDBg,530
+wtforms/ext/sqlalchemy/__init__.py,sha256=4U9BzeiFD_YF8pXRsTehei0ekP6jikt2bX4MN3GNT9s,431
+wtforms/ext/sqlalchemy/fields.py,sha256=2oZHcdO_hUVvgWRVgs3WvwcRkniGiwryy7qPLguYNXg,6848
+wtforms/ext/sqlalchemy/orm.py,sha256=6wJN-Zm4YB3st9xsXU5xJR5jQUsdSRqcbEZ7JvvGD9s,10671
+wtforms/fields/__init__.py,sha256=M-0pFfY9EEk-GoYzRkg3yvarM_iP_cRhPjpLEl5KgVU,219
+wtforms/fields/core.py,sha256=fGYwe6u3aEscVZs_o_De8-bCCL-RZPNkcQQpFlLTlrk,33637
+wtforms/fields/html5.py,sha256=SH_rtdKdlnw4EC5Bsv9M80Jgo2-rKKpumwTLYuibSX0,1855
+wtforms/fields/simple.py,sha256=6JR1Y1SEKMRw0_tom6YGPHErE6isNpeh1ZepZLVsFtE,1848
+wtforms/locale/wtforms.pot,sha256=KE6ffF3j19nJCRIgaMC62jVb2FKmLafAbkxvJ6fh3tg,4191
+wtforms/locale/ar/LC_MESSAGES/wtforms.mo,sha256=3iOx1N146V6UQpIzFABwLKKTmfpcKOzEJt-RyrOU2s8,4506
+wtforms/locale/ar/LC_MESSAGES/wtforms.po,sha256=AiJ4XTNOnmH669k4waP8LyFeydOeFKU8TK56XPdSwE4,6176
+wtforms/locale/ca/LC_MESSAGES/wtforms.mo,sha256=sgDNAV_ax0DWEfv34-wgD3zeHdjFuJxE3A1CNMyDI3Y,3393
+wtforms/locale/ca/LC_MESSAGES/wtforms.po,sha256=K3HbXGi4m40isS_MIBglOq7c1CzKlARdoFCMl283oxE,5425
+wtforms/locale/cs_CZ/LC_MESSAGES/wtforms.mo,sha256=rUcvIEV2p0hO-p_3Y1ktXbjZAKK9tgyadNxL-amnGjU,3559
+wtforms/locale/cs_CZ/LC_MESSAGES/wtforms.po,sha256=lNCS4EM9SKRyPcHXspnSjbepBdK7WOc9jN6-WAhqH_0,5010
+wtforms/locale/cy/LC_MESSAGES/wtforms.mo,sha256=YT3Umlfl57sBpzq5foajPxRg4BUPhvFX-NzueFVo6QQ,3346
+wtforms/locale/cy/LC_MESSAGES/wtforms.po,sha256=mhlzCHyZOrYsuAZx0zbBK1kQ4XB84wh68nvuSt3RgNI,5434
+wtforms/locale/de/LC_MESSAGES/wtforms.mo,sha256=CVDsqmrAdYA_YQwKaoLV-Kl5TtKUlL4QRR3fi_7it3g,3386
+wtforms/locale/de/LC_MESSAGES/wtforms.po,sha256=HhCACjAmrUAPL6FyV305JwE07YBGlvQAQF7h6V1Fu7s,5461
+wtforms/locale/de_CH/LC_MESSAGES/wtforms.mo,sha256=XIjeTxgWXgvRYczIJbwd9IHMQMs1vtxh_uW1Kyk60Uc,3389
+wtforms/locale/de_CH/LC_MESSAGES/wtforms.po,sha256=A6aMpIv3vmGl-BSPhCW62w0bunxc5cBBQBiD2_iFo5A,5478
+wtforms/locale/el/LC_MESSAGES/wtforms.mo,sha256=24A6N20y3Hk6UXbkz5i5uJzQ09q8l9LucKj32oNAcQs,4259
+wtforms/locale/el/LC_MESSAGES/wtforms.po,sha256=7hOf0RNLn7qANcUohRrI6XhWB8PCO34wXR2tp7Ph9N0,6333
+wtforms/locale/en/LC_MESSAGES/wtforms.mo,sha256=IVJ6TO0z-iBNMuudBoU6hXh3W9z_kBb_4PfSFJQtlrM,3058
+wtforms/locale/en/LC_MESSAGES/wtforms.po,sha256=B6KoZKsQrZZzIemwujzW8s7mnokmYykjOJzpknuBp-I,5331
+wtforms/locale/es/LC_MESSAGES/wtforms.mo,sha256=gD4hQqsTRM64P-TxvafXWnfAMo0DP3a-fbnTZAtsg-o,3167
+wtforms/locale/es/LC_MESSAGES/wtforms.po,sha256=51vSbIXTtmc-MmW0DTfS2AO0wDClpjbgfErGRXuguT8,5072
+wtforms/locale/et/LC_MESSAGES/wtforms.mo,sha256=poqR6bwO46jcbyDs3RfgcoT4WuoSeDNHt89CzfULN8s,3424
+wtforms/locale/et/LC_MESSAGES/wtforms.po,sha256=QOBpwcYHLHyOvX2EKGapajttny8JJDsA3UOyg0I85Z8,5442
+wtforms/locale/fa/LC_MESSAGES/wtforms.mo,sha256=b-gfxL4krcrHGhoAoCkpIGHELzR_5xwDgiGJizvSN0A,4122
+wtforms/locale/fa/LC_MESSAGES/wtforms.po,sha256=vlCm-qhkpCRi5mTqVaKRvFgiKV0PwTfurimhnQcpusk,5880
+wtforms/locale/fr/LC_MESSAGES/wtforms.mo,sha256=UcLIFsnwPVS9d7Q5fKZNvWgfuA788AKFefPQMMV9q6k,3414
+wtforms/locale/fr/LC_MESSAGES/wtforms.po,sha256=iWRFpntvXAIg5Y_HIB8B61cZ7kPPwI8leMHwe7DsaA8,5528
+wtforms/locale/it/LC_MESSAGES/wtforms.mo,sha256=hbsbVxllgUrwLPIu3mEHqFJVHVPKzR0V6t-MdSu0Rsw,3185
+wtforms/locale/it/LC_MESSAGES/wtforms.po,sha256=iZYiY6OKzskn7dzBGcmYld_YAE5CmjKidZPBsHg2YP4,5072
+wtforms/locale/ja/LC_MESSAGES/wtforms.mo,sha256=lIFx7m4Tlv2dQRxzxS2abEUfLXp6ktw11O2k3YoccFE,3934
+wtforms/locale/ja/LC_MESSAGES/wtforms.po,sha256=O2DYSF7iF5RJa353H-fF__RTg6GBST2CGhlP5y75abI,5782
+wtforms/locale/ko/LC_MESSAGES/wtforms.mo,sha256=Kf528-l8d1HgxENO0_x0ySxfolpnjdZJIK2jogoxXwA,3774
+wtforms/locale/ko/LC_MESSAGES/wtforms.po,sha256=8RMms-1EluDLMAzb4XA4SpMVMMDDZW82IH6hpw3LQUM,5536
+wtforms/locale/nb/LC_MESSAGES/wtforms.mo,sha256=-aQVZ-cLCHfLcXtvGpi8KUOrDGtXKguMpG46_ZAeSVY,3569
+wtforms/locale/nb/LC_MESSAGES/wtforms.po,sha256=Zi9S7p1xJHKLu1c_wMZVmg7cHcsTe96S4es8-jW3aYk,5446
+wtforms/locale/nl/LC_MESSAGES/wtforms.mo,sha256=LVApDPjM7fDj2aTnDsmdPd9r-kHl_ufv0Sn8vDx-ELU,3316
+wtforms/locale/nl/LC_MESSAGES/wtforms.po,sha256=P3mqn9l1dHE0t96R5fD0A0TNn0R42BzPODwHECmgFEA,5348
+wtforms/locale/pl/LC_MESSAGES/wtforms.mo,sha256=_9nu9gKmuoLAMdoEyjjv4CMlGYa304-KAnC2NONqDEM,3514
+wtforms/locale/pl/LC_MESSAGES/wtforms.po,sha256=I-ysPu_6hT4rLK-MY5xaVThFhCB3sZ323JnYR2ACoy4,5279
+wtforms/locale/pt/LC_MESSAGES/wtforms.mo,sha256=y9JOEGJrc9Rba2pkvQek087qIB9L-eh45STTk6rFTi8,3405
+wtforms/locale/pt/LC_MESSAGES/wtforms.po,sha256=rhVCAPp7xYbXXKFpu-xSaQZMYft3Jgq4GzS0bht9PGg,5488
+wtforms/locale/ru/LC_MESSAGES/wtforms.mo,sha256=TLeGGBusXwWI9lgFazrVWJ3l7vZlxyk8z7tp3iiuRto,4192
+wtforms/locale/ru/LC_MESSAGES/wtforms.po,sha256=9ptlR2VvTKNp-d9K1YMxDcVDHmLQlij4VPveQB0asKI,6162
+wtforms/locale/uk/LC_MESSAGES/wtforms.mo,sha256=dFI2-U5ShwJtOK7DIE2kjQ3fVGmJKsKnBqOOLFtHWvA,4425
+wtforms/locale/uk/LC_MESSAGES/wtforms.po,sha256=C_nkETayqNDJ0QIOTxY-a_lWV3ciCkgpCIz-lbQbF64,6486
+wtforms/locale/zh/LC_MESSAGES/wtforms.mo,sha256=GzLbfQgi6ZnzMSiJhmbB8KkVZegRIeMJN6CbaQ1L24o,3124
+wtforms/locale/zh/LC_MESSAGES/wtforms.po,sha256=iHhFj_6t-z_NX3oHjNzTqYj0jfwTw37aRA1VKyxS-b8,5014
+wtforms/locale/zh_TW/LC_MESSAGES/wtforms.mo,sha256=mK-6ndXdrVaJpY2TDDl9XZL0rWtBMqlPfIle-SGJn-4,3106
+wtforms/locale/zh_TW/LC_MESSAGES/wtforms.po,sha256=x_KaPj5auvDMOeQDFNCVthiUtjbCkA66An05ZI9JVq8,4830
+wtforms/widgets/__init__.py,sha256=nxI0oIsofuJCNgc4Oxwzf3_q3IiCYZTSiCoEuSRZeJM,124
+wtforms/widgets/core.py,sha256=F7akyOpNfC-DF3nBAvTxETPJW8dQGnafp3LQC5qDZQk,9973
+wtforms/widgets/html5.py,sha256=LDnNegNTx-LYpw4YkbymvS2TaA2V03p2rRdYN83skYQ,2440
+WTForms-2.1.dist-info/INSTALLER,sha256=zuuue4knoyJ-UwPPXg8fezS7VCrXJQrAP7zeNuwvFQg,4
+wtforms/ext/dateutil/__init__.pyc,,
+wtforms/ext/appengine/fields.pyc,,
+wtforms/ext/csrf/__init__.pyc,,
+wtforms/ext/dateutil/fields.pyc,,
+wtforms/ext/sqlalchemy/orm.pyc,,
+wtforms/ext/django/__init__.pyc,,
+wtforms/fields/__init__.pyc,,
+wtforms/compat.pyc,,
+wtforms/ext/appengine/db.pyc,,
+wtforms/ext/django/templatetags/wtforms.pyc,,
+wtforms/ext/i18n/form.pyc,,
+wtforms/ext/django/templatetags/__init__.pyc,,
+wtforms/widgets/html5.pyc,,
+wtforms/ext/sqlalchemy/fields.pyc,,
+wtforms/csrf/session.pyc,,
+wtforms/ext/sqlalchemy/__init__.pyc,,
+wtforms/ext/i18n/utils.pyc,,
+wtforms/csrf/core.pyc,,
+wtforms/fields/core.pyc,,
+wtforms/fields/simple.pyc,,
+wtforms/ext/appengine/__init__.pyc,,
+wtforms/ext/django/fields.pyc,,
+wtforms/ext/csrf/form.pyc,,
+wtforms/ext/csrf/session.pyc,,
+wtforms/utils.pyc,,
+wtforms/widgets/__init__.pyc,,
+wtforms/ext/i18n/__init__.pyc,,
+wtforms/ext/django/i18n.pyc,,
+wtforms/ext/__init__.pyc,,
+wtforms/csrf/__init__.pyc,,
+wtforms/ext/django/orm.pyc,,
+wtforms/form.pyc,,
+wtforms/fields/html5.pyc,,
+wtforms/validators.pyc,,
+wtforms/meta.pyc,,
+wtforms/ext/csrf/fields.pyc,,
+wtforms/ext/appengine/ndb.pyc,,
+wtforms/widgets/core.pyc,,
+wtforms/__init__.pyc,,
+wtforms/i18n.pyc,,
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/WTForms-2.1.dist-info/WHEEL b/Assignments/microblog/flask/lib/python2.7/site-packages/WTForms-2.1.dist-info/WHEEL
new file mode 100644
index 0000000..8b6dd1b
--- /dev/null
+++ b/Assignments/microblog/flask/lib/python2.7/site-packages/WTForms-2.1.dist-info/WHEEL
@@ -0,0 +1,6 @@
+Wheel-Version: 1.0
+Generator: bdist_wheel (0.29.0)
+Root-Is-Purelib: true
+Tag: py2-none-any
+Tag: py3-none-any
+
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/WTForms-2.1.dist-info/metadata.json b/Assignments/microblog/flask/lib/python2.7/site-packages/WTForms-2.1.dist-info/metadata.json
new file mode 100644
index 0000000..67311b6
--- /dev/null
+++ b/Assignments/microblog/flask/lib/python2.7/site-packages/WTForms-2.1.dist-info/metadata.json
@@ -0,0 +1 @@
+{"classifiers": ["Development Status :: 5 - Production/Stable", "Environment :: Web Environment", "Intended Audience :: Developers", "License :: OSI Approved :: BSD License", "Operating System :: OS Independent", "Programming Language :: Python", "Programming Language :: Python :: 2.6", "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.3", "Topic :: Internet :: WWW/HTTP :: Dynamic Content", "Topic :: Software Development :: Libraries :: Python Modules"], "extensions": {"python.details": {"contacts": [{"email": "wtforms@simplecodes.com", "name": "Thomas Johansson, James Crasta", "role": "author"}], "document_names": {"description": "DESCRIPTION.rst"}, "project_urls": {"Home": "http://wtforms.simplecodes.com/"}}}, "extras": ["Locale"], "generator": "bdist_wheel (0.29.0)", "license": "BSD", "metadata_version": "2.0", "name": "WTForms", "run_requires": [{"extra": "Locale", "requires": ["Babel (>=1.3)"]}, {"environment": "python_version==\"2.6\"", "requires": ["ordereddict"]}], "summary": "A flexible forms validation and rendering library for python web development.", "version": "2.1"}
\ No newline at end of file
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/WTForms-2.1.dist-info/top_level.txt b/Assignments/microblog/flask/lib/python2.7/site-packages/WTForms-2.1.dist-info/top_level.txt
new file mode 100644
index 0000000..26d80fd
--- /dev/null
+++ b/Assignments/microblog/flask/lib/python2.7/site-packages/WTForms-2.1.dist-info/top_level.txt
@@ -0,0 +1 @@
+wtforms
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/Werkzeug-0.11.10.dist-info/DESCRIPTION.rst b/Assignments/microblog/flask/lib/python2.7/site-packages/Werkzeug-0.11.10.dist-info/DESCRIPTION.rst
new file mode 100644
index 0000000..2a6e8bb
--- /dev/null
+++ b/Assignments/microblog/flask/lib/python2.7/site-packages/Werkzeug-0.11.10.dist-info/DESCRIPTION.rst
@@ -0,0 +1,54 @@
+Werkzeug
+========
+
+Werkzeug started as simple collection of various utilities for WSGI
+applications and has become one of the most advanced WSGI utility
+modules. It includes a powerful debugger, full featured request and
+response objects, HTTP utilities to handle entity tags, cache control
+headers, HTTP dates, cookie handling, file uploads, a powerful URL
+routing system and a bunch of community contributed addon modules.
+
+Werkzeug is unicode aware and doesn't enforce a specific template
+engine, database adapter or anything else. It doesn't even enforce
+a specific way of handling requests and leaves all that up to the
+developer. It's most useful for end user applications which should work
+on as many server environments as possible (such as blogs, wikis,
+bulletin boards, etc.).
+
+Details and example applications are available on the
+`Werkzeug website `_.
+
+
+Features
+--------
+
+- unicode awareness
+
+- request and response objects
+
+- various utility functions for dealing with HTTP headers such as
+ `Accept` and `Cache-Control` headers.
+
+- thread local objects with proper cleanup at request end
+
+- an interactive debugger
+
+- A simple WSGI server with support for threading and forking
+ with an automatic reloader.
+
+- a flexible URL routing system with REST support.
+
+- fully WSGI compatible
+
+
+Development Version
+-------------------
+
+The Werkzeug development version can be installed by cloning the git
+repository from `github`_::
+
+ git clone git@github.com:mitsuhiko/werkzeug.git
+
+.. _github: http://github.com/mitsuhiko/werkzeug
+
+
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/Werkzeug-0.11.10.dist-info/INSTALLER b/Assignments/microblog/flask/lib/python2.7/site-packages/Werkzeug-0.11.10.dist-info/INSTALLER
new file mode 100644
index 0000000..a1b589e
--- /dev/null
+++ b/Assignments/microblog/flask/lib/python2.7/site-packages/Werkzeug-0.11.10.dist-info/INSTALLER
@@ -0,0 +1 @@
+pip
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/Werkzeug-0.11.10.dist-info/METADATA b/Assignments/microblog/flask/lib/python2.7/site-packages/Werkzeug-0.11.10.dist-info/METADATA
new file mode 100644
index 0000000..d8a1764
--- /dev/null
+++ b/Assignments/microblog/flask/lib/python2.7/site-packages/Werkzeug-0.11.10.dist-info/METADATA
@@ -0,0 +1,79 @@
+Metadata-Version: 2.0
+Name: Werkzeug
+Version: 0.11.10
+Summary: The Swiss Army knife of Python web development
+Home-page: http://werkzeug.pocoo.org/
+Author: Armin Ronacher
+Author-email: armin.ronacher@active-4.com
+License: BSD
+Platform: any
+Classifier: Development Status :: 5 - Production/Stable
+Classifier: Environment :: Web Environment
+Classifier: Intended Audience :: Developers
+Classifier: License :: OSI Approved :: BSD License
+Classifier: Operating System :: OS Independent
+Classifier: Programming Language :: Python
+Classifier: Programming Language :: Python :: 2
+Classifier: Programming Language :: Python :: 2.6
+Classifier: Programming Language :: Python :: 2.7
+Classifier: Programming Language :: Python :: 3
+Classifier: Programming Language :: Python :: 3.3
+Classifier: Programming Language :: Python :: 3.4
+Classifier: Programming Language :: Python :: 3.5
+Classifier: Topic :: Internet :: WWW/HTTP :: Dynamic Content
+Classifier: Topic :: Software Development :: Libraries :: Python Modules
+
+Werkzeug
+========
+
+Werkzeug started as simple collection of various utilities for WSGI
+applications and has become one of the most advanced WSGI utility
+modules. It includes a powerful debugger, full featured request and
+response objects, HTTP utilities to handle entity tags, cache control
+headers, HTTP dates, cookie handling, file uploads, a powerful URL
+routing system and a bunch of community contributed addon modules.
+
+Werkzeug is unicode aware and doesn't enforce a specific template
+engine, database adapter or anything else. It doesn't even enforce
+a specific way of handling requests and leaves all that up to the
+developer. It's most useful for end user applications which should work
+on as many server environments as possible (such as blogs, wikis,
+bulletin boards, etc.).
+
+Details and example applications are available on the
+`Werkzeug website `_.
+
+
+Features
+--------
+
+- unicode awareness
+
+- request and response objects
+
+- various utility functions for dealing with HTTP headers such as
+ `Accept` and `Cache-Control` headers.
+
+- thread local objects with proper cleanup at request end
+
+- an interactive debugger
+
+- A simple WSGI server with support for threading and forking
+ with an automatic reloader.
+
+- a flexible URL routing system with REST support.
+
+- fully WSGI compatible
+
+
+Development Version
+-------------------
+
+The Werkzeug development version can be installed by cloning the git
+repository from `github`_::
+
+ git clone git@github.com:mitsuhiko/werkzeug.git
+
+.. _github: http://github.com/mitsuhiko/werkzeug
+
+
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/Werkzeug-0.11.10.dist-info/RECORD b/Assignments/microblog/flask/lib/python2.7/site-packages/Werkzeug-0.11.10.dist-info/RECORD
new file mode 100644
index 0000000..973bc25
--- /dev/null
+++ b/Assignments/microblog/flask/lib/python2.7/site-packages/Werkzeug-0.11.10.dist-info/RECORD
@@ -0,0 +1,94 @@
+Werkzeug-0.11.10.dist-info/DESCRIPTION.rst,sha256=5sTwZ_Sj5aeEN8mlcOdNJ_ng40HiGazGmILLyTMX8o0,1595
+Werkzeug-0.11.10.dist-info/METADATA,sha256=vweH07PHdEwMIeOU7fvKXKi_6zY5e6d_dfVCgqT--Aw,2600
+Werkzeug-0.11.10.dist-info/RECORD,,
+Werkzeug-0.11.10.dist-info/WHEEL,sha256=GrqQvamwgBV4nLoJe0vhYRSWzWsx7xjlt74FT0SWYfE,110
+Werkzeug-0.11.10.dist-info/metadata.json,sha256=PC5ATsCVx4EUlD8uEGHEhx-aTnCr9GA8vfWXT3CLwQw,1096
+Werkzeug-0.11.10.dist-info/top_level.txt,sha256=QRyj2VjwJoQkrwjwFIOlB8Xg3r9un0NtqVHQF-15xaw,9
+werkzeug/__init__.py,sha256=BDx17HnxLmB4L8OSE0Bkj3DjDTO6xLu6_nNck8QiRaw,6920
+werkzeug/_compat.py,sha256=8c4U9o6A_TR9nKCcTbpZNxpqCXcXDVIbFawwKM2s92c,6311
+werkzeug/_internal.py,sha256=IEScSoFtQ8KqFH_2ubdfscNAdQ2RIysyVupI5BR9W2U,13709
+werkzeug/_reloader.py,sha256=YQykMSQW7AlojJQ7qOlgNaXw5_CNjf9yzxplwzVdL7Q,8336
+werkzeug/datastructures.py,sha256=5CLVMLROGMoB0dSdQ7aBabma6IC_vxIx77VnMoFFVyc,87447
+werkzeug/exceptions.py,sha256=c-3fKHItsPvC52X_NwBNLcmGXR30h0WP5ynPSwCqPiw,18733
+werkzeug/filesystem.py,sha256=hHWeWo_gqLMzTRfYt8-7n2wWcWUNTnDyudQDLOBEICE,2175
+werkzeug/formparser.py,sha256=90D5Urp8Ghrzw32kAs090G0nXPYlU73NeAzPlQFMVrY,21296
+werkzeug/http.py,sha256=sqNaMmLBvi16cPoVRiBviwnVOb1bAQ1lGTrvfCdaQrY,35264
+werkzeug/local.py,sha256=4Q5gwHQJhfhZFqTR8iQDs2VHohpR1OEsP4YTwn7rt7w,14275
+werkzeug/posixemulation.py,sha256=xEF2Bxc-vUCPkiu4IbfWVd3LW7DROYAT-ExW6THqyzw,3519
+werkzeug/routing.py,sha256=TqiZD5HkwdLBnKBUjC5PlytzXmpczQC5dz54VfQzMOw,66350
+werkzeug/script.py,sha256=DwaVDcXdaOTffdNvlBdLitxWXjKaRVT32VbhDtljFPY,11365
+werkzeug/security.py,sha256=tuVc22OqoHV5K-TrYJmynCJJa12aUt9BQ3wR_vEPQ34,8971
+werkzeug/serving.py,sha256=uRUqXuA-Dw2MRA-d232cK_034-taldoj66fEFrtin7k,27736
+werkzeug/test.py,sha256=nan0aDi3g5hyUzWCtaN3XL9HrbIsNNNgMNjwpfM6qMc,34152
+werkzeug/testapp.py,sha256=3HQRW1sHZKXuAjCvFMet4KXtQG3loYTFnvn6LWt-4zI,9396
+werkzeug/urls.py,sha256=fSbI4Gb29_p02Zk21VAZQRN1QdOVY9CNTgpb2rbajNQ,36710
+werkzeug/useragents.py,sha256=uqpgPcJ5BfcCVh9nPIIl2r3duIrIuENmrbRqbAMmPDk,5418
+werkzeug/utils.py,sha256=lkybtv_mq35zV1qhelvEcILTzrMUwZ9yon6E8XwapJE,22972
+werkzeug/wrappers.py,sha256=lKYevpKD1-quk9Cop7bsFxt1eWJxU3h33HCnOI_YzSU,77011
+werkzeug/wsgi.py,sha256=S8R3pBGPlBK67s-d6Wa93nhzG27WjfcHs_ZBGIAQCxM,39573
+werkzeug/contrib/__init__.py,sha256=f7PfttZhbrImqpr5Ezre8CXgwvcGUJK7zWNpO34WWrw,623
+werkzeug/contrib/atom.py,sha256=rvijBrphjMzVObfuCR6ddu6aLwI_SiNiudu64OSTh4Q,15588
+werkzeug/contrib/cache.py,sha256=4W2WCT9Hw6HEU8yME9GuU4Xf8e50r2K84ASMxhLb6tY,27983
+werkzeug/contrib/fixers.py,sha256=MtN_YmENxoTsGvXGGERmtbQ62LaeFc5I2d1YifXNENA,10183
+werkzeug/contrib/iterio.py,sha256=pTX36rYCKO_9IEoB5sIN5cFSYszI9zdx6YhquWovcPY,10814
+werkzeug/contrib/jsrouting.py,sha256=QTmgeDoKXvNK02KzXgx9lr3cAH6fAzpwF5bBdPNvJPs,8564
+werkzeug/contrib/limiter.py,sha256=iS8-ahPZ-JLRnmfIBzxpm7O_s3lPsiDMVWv7llAIDCI,1334
+werkzeug/contrib/lint.py,sha256=XDKYx0ELn9k18xRn4SiAsCgltCuN4yLjzxnCN8tG_eM,12490
+werkzeug/contrib/profiler.py,sha256=ISwCWvwVyGpDLRBRpLjo_qUWma6GXYBrTAco4PEQSHY,5151
+werkzeug/contrib/securecookie.py,sha256=X-Ao_0NRDveW6K1Fhe4U42hHWBW8esCpA3VcBDpzWIk,12206
+werkzeug/contrib/sessions.py,sha256=uAPcnyxaxEla-bUA13gKc3KK4mwSagdzbCZzyKl3PeE,12577
+werkzeug/contrib/testtools.py,sha256=G9xN-qeihJlhExrIZMCahvQOIDxdL9NiX874jiiHFMs,2453
+werkzeug/contrib/wrappers.py,sha256=Uv5FRO5OqKwOsNgkW2-FRcw0vUDe3uiaivjPNYWNfAk,10337
+werkzeug/debug/__init__.py,sha256=qQT5YnOv9Eov9Jt5eLtP6MOqwpmo-tORJ6HcQmmnvro,17271
+werkzeug/debug/console.py,sha256=B7uAu9Rk60siDnGlEt-A_q1ZR4zCtmxx5itg3X-BOxo,5599
+werkzeug/debug/repr.py,sha256=NaoB89aHb0vuvdSWels-GWdeGDZp76uE4uSNZPX1jAM,9354
+werkzeug/debug/tbtools.py,sha256=L5P5TkGEHc_Bc5duNosP6D4CNe7ieTo1oiPX8nKQdek,18402
+werkzeug/debug/shared/FONT_LICENSE,sha256=LwAVEI1oYnvXiNMT9SnCH_TaLCxCpeHziDrMg0gPkAI,4673
+werkzeug/debug/shared/console.png,sha256=bxax6RXXlvOij_KeqvSNX0ojJf83YbnZ7my-3Gx9w2A,507
+werkzeug/debug/shared/debugger.js,sha256=PEMBoNuD6fUaNou8Km_ZvVmFcIA3z3k3jSEMWLW-cA0,6187
+werkzeug/debug/shared/jquery.js,sha256=7LkWEzqTdpEfELxcZZlS6wAx5Ff13zZ83lYO2_ujj7g,95957
+werkzeug/debug/shared/less.png,sha256=-4-kNRaXJSONVLahrQKUxMwXGm9R4OnZ9SxDGpHlIR4,191
+werkzeug/debug/shared/more.png,sha256=GngN7CioHQoV58rH6ojnkYi8c_qED2Aka5FO5UXrReY,200
+werkzeug/debug/shared/source.png,sha256=RoGcBTE4CyCB85GBuDGTFlAnUqxwTBiIfDqW15EpnUQ,818
+werkzeug/debug/shared/style.css,sha256=7x1s8olZO1XHalqD4M9MWn9vRqQkA635S9_6zRoe220,6231
+werkzeug/debug/shared/ubuntu.ttf,sha256=1eaHFyepmy4FyDvjLVzpITrGEBu_CZYY94jE0nED1c0,70220
+Werkzeug-0.11.10.dist-info/INSTALLER,sha256=zuuue4knoyJ-UwPPXg8fezS7VCrXJQrAP7zeNuwvFQg,4
+werkzeug/_reloader.pyc,,
+werkzeug/contrib/testtools.pyc,,
+werkzeug/filesystem.pyc,,
+werkzeug/exceptions.pyc,,
+werkzeug/formparser.pyc,,
+werkzeug/_compat.pyc,,
+werkzeug/posixemulation.pyc,,
+werkzeug/wsgi.pyc,,
+werkzeug/serving.pyc,,
+werkzeug/contrib/__init__.pyc,,
+werkzeug/contrib/iterio.pyc,,
+werkzeug/test.pyc,,
+werkzeug/__init__.pyc,,
+werkzeug/contrib/limiter.pyc,,
+werkzeug/debug/tbtools.pyc,,
+werkzeug/contrib/sessions.pyc,,
+werkzeug/contrib/securecookie.pyc,,
+werkzeug/local.pyc,,
+werkzeug/utils.pyc,,
+werkzeug/_internal.pyc,,
+werkzeug/security.pyc,,
+werkzeug/contrib/cache.pyc,,
+werkzeug/script.pyc,,
+werkzeug/routing.pyc,,
+werkzeug/wrappers.pyc,,
+werkzeug/contrib/jsrouting.pyc,,
+werkzeug/contrib/fixers.pyc,,
+werkzeug/contrib/profiler.pyc,,
+werkzeug/debug/console.pyc,,
+werkzeug/debug/__init__.pyc,,
+werkzeug/datastructures.pyc,,
+werkzeug/http.pyc,,
+werkzeug/urls.pyc,,
+werkzeug/contrib/lint.pyc,,
+werkzeug/contrib/wrappers.pyc,,
+werkzeug/contrib/atom.pyc,,
+werkzeug/testapp.pyc,,
+werkzeug/debug/repr.pyc,,
+werkzeug/useragents.pyc,,
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/Werkzeug-0.11.10.dist-info/WHEEL b/Assignments/microblog/flask/lib/python2.7/site-packages/Werkzeug-0.11.10.dist-info/WHEEL
new file mode 100644
index 0000000..0de529b
--- /dev/null
+++ b/Assignments/microblog/flask/lib/python2.7/site-packages/Werkzeug-0.11.10.dist-info/WHEEL
@@ -0,0 +1,6 @@
+Wheel-Version: 1.0
+Generator: bdist_wheel (0.26.0)
+Root-Is-Purelib: true
+Tag: py2-none-any
+Tag: py3-none-any
+
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/Werkzeug-0.11.10.dist-info/metadata.json b/Assignments/microblog/flask/lib/python2.7/site-packages/Werkzeug-0.11.10.dist-info/metadata.json
new file mode 100644
index 0000000..ac71ca2
--- /dev/null
+++ b/Assignments/microblog/flask/lib/python2.7/site-packages/Werkzeug-0.11.10.dist-info/metadata.json
@@ -0,0 +1 @@
+{"generator": "bdist_wheel (0.26.0)", "summary": "The Swiss Army knife of Python web development", "classifiers": ["Development Status :: 5 - Production/Stable", "Environment :: Web Environment", "Intended Audience :: Developers", "License :: OSI Approved :: BSD License", "Operating System :: OS Independent", "Programming Language :: Python", "Programming Language :: Python :: 2", "Programming Language :: Python :: 2.6", "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.3", "Programming Language :: Python :: 3.4", "Programming Language :: Python :: 3.5", "Topic :: Internet :: WWW/HTTP :: Dynamic Content", "Topic :: Software Development :: Libraries :: Python Modules"], "extensions": {"python.details": {"project_urls": {"Home": "http://werkzeug.pocoo.org/"}, "contacts": [{"email": "armin.ronacher@active-4.com", "name": "Armin Ronacher", "role": "author"}], "document_names": {"description": "DESCRIPTION.rst"}}}, "license": "BSD", "metadata_version": "2.0", "name": "Werkzeug", "platform": "any", "version": "0.11.10"}
\ No newline at end of file
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/Werkzeug-0.11.10.dist-info/top_level.txt b/Assignments/microblog/flask/lib/python2.7/site-packages/Werkzeug-0.11.10.dist-info/top_level.txt
new file mode 100644
index 0000000..6fe8da8
--- /dev/null
+++ b/Assignments/microblog/flask/lib/python2.7/site-packages/Werkzeug-0.11.10.dist-info/top_level.txt
@@ -0,0 +1 @@
+werkzeug
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/Werkzeug-0.11.9.dist-info/DESCRIPTION.rst b/Assignments/microblog/flask/lib/python2.7/site-packages/Werkzeug-0.11.9.dist-info/DESCRIPTION.rst
new file mode 100644
index 0000000..2a6e8bb
--- /dev/null
+++ b/Assignments/microblog/flask/lib/python2.7/site-packages/Werkzeug-0.11.9.dist-info/DESCRIPTION.rst
@@ -0,0 +1,54 @@
+Werkzeug
+========
+
+Werkzeug started as simple collection of various utilities for WSGI
+applications and has become one of the most advanced WSGI utility
+modules. It includes a powerful debugger, full featured request and
+response objects, HTTP utilities to handle entity tags, cache control
+headers, HTTP dates, cookie handling, file uploads, a powerful URL
+routing system and a bunch of community contributed addon modules.
+
+Werkzeug is unicode aware and doesn't enforce a specific template
+engine, database adapter or anything else. It doesn't even enforce
+a specific way of handling requests and leaves all that up to the
+developer. It's most useful for end user applications which should work
+on as many server environments as possible (such as blogs, wikis,
+bulletin boards, etc.).
+
+Details and example applications are available on the
+`Werkzeug website `_.
+
+
+Features
+--------
+
+- unicode awareness
+
+- request and response objects
+
+- various utility functions for dealing with HTTP headers such as
+ `Accept` and `Cache-Control` headers.
+
+- thread local objects with proper cleanup at request end
+
+- an interactive debugger
+
+- A simple WSGI server with support for threading and forking
+ with an automatic reloader.
+
+- a flexible URL routing system with REST support.
+
+- fully WSGI compatible
+
+
+Development Version
+-------------------
+
+The Werkzeug development version can be installed by cloning the git
+repository from `github`_::
+
+ git clone git@github.com:mitsuhiko/werkzeug.git
+
+.. _github: http://github.com/mitsuhiko/werkzeug
+
+
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/Werkzeug-0.11.9.dist-info/INSTALLER b/Assignments/microblog/flask/lib/python2.7/site-packages/Werkzeug-0.11.9.dist-info/INSTALLER
new file mode 100644
index 0000000..a1b589e
--- /dev/null
+++ b/Assignments/microblog/flask/lib/python2.7/site-packages/Werkzeug-0.11.9.dist-info/INSTALLER
@@ -0,0 +1 @@
+pip
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/Werkzeug-0.11.9.dist-info/METADATA b/Assignments/microblog/flask/lib/python2.7/site-packages/Werkzeug-0.11.9.dist-info/METADATA
new file mode 100644
index 0000000..cc2c50a
--- /dev/null
+++ b/Assignments/microblog/flask/lib/python2.7/site-packages/Werkzeug-0.11.9.dist-info/METADATA
@@ -0,0 +1,79 @@
+Metadata-Version: 2.0
+Name: Werkzeug
+Version: 0.11.9
+Summary: The Swiss Army knife of Python web development
+Home-page: http://werkzeug.pocoo.org/
+Author: Armin Ronacher
+Author-email: armin.ronacher@active-4.com
+License: BSD
+Platform: any
+Classifier: Development Status :: 5 - Production/Stable
+Classifier: Environment :: Web Environment
+Classifier: Intended Audience :: Developers
+Classifier: License :: OSI Approved :: BSD License
+Classifier: Operating System :: OS Independent
+Classifier: Programming Language :: Python
+Classifier: Programming Language :: Python :: 2
+Classifier: Programming Language :: Python :: 2.6
+Classifier: Programming Language :: Python :: 2.7
+Classifier: Programming Language :: Python :: 3
+Classifier: Programming Language :: Python :: 3.3
+Classifier: Programming Language :: Python :: 3.4
+Classifier: Programming Language :: Python :: 3.5
+Classifier: Topic :: Internet :: WWW/HTTP :: Dynamic Content
+Classifier: Topic :: Software Development :: Libraries :: Python Modules
+
+Werkzeug
+========
+
+Werkzeug started as simple collection of various utilities for WSGI
+applications and has become one of the most advanced WSGI utility
+modules. It includes a powerful debugger, full featured request and
+response objects, HTTP utilities to handle entity tags, cache control
+headers, HTTP dates, cookie handling, file uploads, a powerful URL
+routing system and a bunch of community contributed addon modules.
+
+Werkzeug is unicode aware and doesn't enforce a specific template
+engine, database adapter or anything else. It doesn't even enforce
+a specific way of handling requests and leaves all that up to the
+developer. It's most useful for end user applications which should work
+on as many server environments as possible (such as blogs, wikis,
+bulletin boards, etc.).
+
+Details and example applications are available on the
+`Werkzeug website `_.
+
+
+Features
+--------
+
+- unicode awareness
+
+- request and response objects
+
+- various utility functions for dealing with HTTP headers such as
+ `Accept` and `Cache-Control` headers.
+
+- thread local objects with proper cleanup at request end
+
+- an interactive debugger
+
+- A simple WSGI server with support for threading and forking
+ with an automatic reloader.
+
+- a flexible URL routing system with REST support.
+
+- fully WSGI compatible
+
+
+Development Version
+-------------------
+
+The Werkzeug development version can be installed by cloning the git
+repository from `github`_::
+
+ git clone git@github.com:mitsuhiko/werkzeug.git
+
+.. _github: http://github.com/mitsuhiko/werkzeug
+
+
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/Werkzeug-0.11.9.dist-info/RECORD b/Assignments/microblog/flask/lib/python2.7/site-packages/Werkzeug-0.11.9.dist-info/RECORD
new file mode 100644
index 0000000..f27786b
--- /dev/null
+++ b/Assignments/microblog/flask/lib/python2.7/site-packages/Werkzeug-0.11.9.dist-info/RECORD
@@ -0,0 +1,94 @@
+werkzeug/posixemulation.py,sha256=xEF2Bxc-vUCPkiu4IbfWVd3LW7DROYAT-ExW6THqyzw,3519
+werkzeug/security.py,sha256=tuVc22OqoHV5K-TrYJmynCJJa12aUt9BQ3wR_vEPQ34,8971
+werkzeug/__init__.py,sha256=rbBmJayQJWlw7u5HncRHYC0wdAXW9ppc5-_ahZu7zoI,6919
+werkzeug/testapp.py,sha256=3HQRW1sHZKXuAjCvFMet4KXtQG3loYTFnvn6LWt-4zI,9396
+werkzeug/http.py,sha256=sqNaMmLBvi16cPoVRiBviwnVOb1bAQ1lGTrvfCdaQrY,35264
+werkzeug/routing.py,sha256=TqiZD5HkwdLBnKBUjC5PlytzXmpczQC5dz54VfQzMOw,66350
+werkzeug/utils.py,sha256=lkybtv_mq35zV1qhelvEcILTzrMUwZ9yon6E8XwapJE,22972
+werkzeug/exceptions.py,sha256=c-3fKHItsPvC52X_NwBNLcmGXR30h0WP5ynPSwCqPiw,18733
+werkzeug/_reloader.py,sha256=YQykMSQW7AlojJQ7qOlgNaXw5_CNjf9yzxplwzVdL7Q,8336
+werkzeug/formparser.py,sha256=ndLQxfmq-IeNUlee30WHfxq1YggzSO1l7QGeeFVr99M,21207
+werkzeug/_compat.py,sha256=8c4U9o6A_TR9nKCcTbpZNxpqCXcXDVIbFawwKM2s92c,6311
+werkzeug/datastructures.py,sha256=5CLVMLROGMoB0dSdQ7aBabma6IC_vxIx77VnMoFFVyc,87447
+werkzeug/wrappers.py,sha256=lKYevpKD1-quk9Cop7bsFxt1eWJxU3h33HCnOI_YzSU,77011
+werkzeug/test.py,sha256=nan0aDi3g5hyUzWCtaN3XL9HrbIsNNNgMNjwpfM6qMc,34152
+werkzeug/urls.py,sha256=fSbI4Gb29_p02Zk21VAZQRN1QdOVY9CNTgpb2rbajNQ,36710
+werkzeug/script.py,sha256=DwaVDcXdaOTffdNvlBdLitxWXjKaRVT32VbhDtljFPY,11365
+werkzeug/useragents.py,sha256=uqpgPcJ5BfcCVh9nPIIl2r3duIrIuENmrbRqbAMmPDk,5418
+werkzeug/local.py,sha256=4Q5gwHQJhfhZFqTR8iQDs2VHohpR1OEsP4YTwn7rt7w,14275
+werkzeug/serving.py,sha256=uRUqXuA-Dw2MRA-d232cK_034-taldoj66fEFrtin7k,27736
+werkzeug/filesystem.py,sha256=0_gjAftvnRBxoD6ZCssJDJztUjprsLC97eC_k4YRdXs,2174
+werkzeug/wsgi.py,sha256=SzSjiVVGzjD5F1yKIbuZVINNdS5T_sD2ryHD6Dg9t5I,38011
+werkzeug/_internal.py,sha256=IEScSoFtQ8KqFH_2ubdfscNAdQ2RIysyVupI5BR9W2U,13709
+werkzeug/contrib/fixers.py,sha256=MtN_YmENxoTsGvXGGERmtbQ62LaeFc5I2d1YifXNENA,10183
+werkzeug/contrib/limiter.py,sha256=iS8-ahPZ-JLRnmfIBzxpm7O_s3lPsiDMVWv7llAIDCI,1334
+werkzeug/contrib/__init__.py,sha256=f7PfttZhbrImqpr5Ezre8CXgwvcGUJK7zWNpO34WWrw,623
+werkzeug/contrib/testtools.py,sha256=G9xN-qeihJlhExrIZMCahvQOIDxdL9NiX874jiiHFMs,2453
+werkzeug/contrib/iterio.py,sha256=pTX36rYCKO_9IEoB5sIN5cFSYszI9zdx6YhquWovcPY,10814
+werkzeug/contrib/cache.py,sha256=4W2WCT9Hw6HEU8yME9GuU4Xf8e50r2K84ASMxhLb6tY,27983
+werkzeug/contrib/securecookie.py,sha256=X-Ao_0NRDveW6K1Fhe4U42hHWBW8esCpA3VcBDpzWIk,12206
+werkzeug/contrib/lint.py,sha256=XDKYx0ELn9k18xRn4SiAsCgltCuN4yLjzxnCN8tG_eM,12490
+werkzeug/contrib/profiler.py,sha256=ISwCWvwVyGpDLRBRpLjo_qUWma6GXYBrTAco4PEQSHY,5151
+werkzeug/contrib/wrappers.py,sha256=Uv5FRO5OqKwOsNgkW2-FRcw0vUDe3uiaivjPNYWNfAk,10337
+werkzeug/contrib/atom.py,sha256=rvijBrphjMzVObfuCR6ddu6aLwI_SiNiudu64OSTh4Q,15588
+werkzeug/contrib/jsrouting.py,sha256=QTmgeDoKXvNK02KzXgx9lr3cAH6fAzpwF5bBdPNvJPs,8564
+werkzeug/contrib/sessions.py,sha256=uAPcnyxaxEla-bUA13gKc3KK4mwSagdzbCZzyKl3PeE,12577
+werkzeug/debug/console.py,sha256=B7uAu9Rk60siDnGlEt-A_q1ZR4zCtmxx5itg3X-BOxo,5599
+werkzeug/debug/repr.py,sha256=NaoB89aHb0vuvdSWels-GWdeGDZp76uE4uSNZPX1jAM,9354
+werkzeug/debug/__init__.py,sha256=fcxsvH0qRO3J0ZE2-RvTPt2GLYhlqGKyO11jmMPswnc,17077
+werkzeug/debug/tbtools.py,sha256=L5P5TkGEHc_Bc5duNosP6D4CNe7ieTo1oiPX8nKQdek,18402
+werkzeug/debug/shared/less.png,sha256=-4-kNRaXJSONVLahrQKUxMwXGm9R4OnZ9SxDGpHlIR4,191
+werkzeug/debug/shared/source.png,sha256=RoGcBTE4CyCB85GBuDGTFlAnUqxwTBiIfDqW15EpnUQ,818
+werkzeug/debug/shared/debugger.js,sha256=PEMBoNuD6fUaNou8Km_ZvVmFcIA3z3k3jSEMWLW-cA0,6187
+werkzeug/debug/shared/style.css,sha256=7x1s8olZO1XHalqD4M9MWn9vRqQkA635S9_6zRoe220,6231
+werkzeug/debug/shared/console.png,sha256=bxax6RXXlvOij_KeqvSNX0ojJf83YbnZ7my-3Gx9w2A,507
+werkzeug/debug/shared/FONT_LICENSE,sha256=LwAVEI1oYnvXiNMT9SnCH_TaLCxCpeHziDrMg0gPkAI,4673
+werkzeug/debug/shared/jquery.js,sha256=7LkWEzqTdpEfELxcZZlS6wAx5Ff13zZ83lYO2_ujj7g,95957
+werkzeug/debug/shared/ubuntu.ttf,sha256=1eaHFyepmy4FyDvjLVzpITrGEBu_CZYY94jE0nED1c0,70220
+werkzeug/debug/shared/more.png,sha256=GngN7CioHQoV58rH6ojnkYi8c_qED2Aka5FO5UXrReY,200
+Werkzeug-0.11.9.dist-info/DESCRIPTION.rst,sha256=5sTwZ_Sj5aeEN8mlcOdNJ_ng40HiGazGmILLyTMX8o0,1595
+Werkzeug-0.11.9.dist-info/metadata.json,sha256=zC1u535SNbO3sxu0WAql5aLgc86z0spMFyWFODz8krA,1095
+Werkzeug-0.11.9.dist-info/RECORD,,
+Werkzeug-0.11.9.dist-info/top_level.txt,sha256=QRyj2VjwJoQkrwjwFIOlB8Xg3r9un0NtqVHQF-15xaw,9
+Werkzeug-0.11.9.dist-info/WHEEL,sha256=AvR0WeTpDaxT645bl5FQxUK6NPsTls2ttpcGJg3j1Xg,110
+Werkzeug-0.11.9.dist-info/METADATA,sha256=aW4j7GGJ1ZJfvmq6bGkePD3QlBXgmTEuTBjDncU0h4w,2599
+Werkzeug-0.11.9.dist-info/INSTALLER,sha256=zuuue4knoyJ-UwPPXg8fezS7VCrXJQrAP7zeNuwvFQg,4
+werkzeug/_reloader.pyc,,
+werkzeug/filesystem.pyc,,
+werkzeug/contrib/testtools.pyc,,
+werkzeug/formparser.pyc,,
+werkzeug/_compat.pyc,,
+werkzeug/posixemulation.pyc,,
+werkzeug/wsgi.pyc,,
+werkzeug/serving.pyc,,
+werkzeug/contrib/__init__.pyc,,
+werkzeug/contrib/iterio.pyc,,
+werkzeug/test.pyc,,
+werkzeug/__init__.pyc,,
+werkzeug/contrib/limiter.pyc,,
+werkzeug/debug/tbtools.pyc,,
+werkzeug/contrib/sessions.pyc,,
+werkzeug/exceptions.pyc,,
+werkzeug/local.pyc,,
+werkzeug/utils.pyc,,
+werkzeug/contrib/lint.pyc,,
+werkzeug/security.pyc,,
+werkzeug/contrib/cache.pyc,,
+werkzeug/contrib/securecookie.pyc,,
+werkzeug/script.pyc,,
+werkzeug/routing.pyc,,
+werkzeug/wrappers.pyc,,
+werkzeug/contrib/jsrouting.pyc,,
+werkzeug/contrib/fixers.pyc,,
+werkzeug/contrib/profiler.pyc,,
+werkzeug/debug/console.pyc,,
+werkzeug/debug/__init__.pyc,,
+werkzeug/datastructures.pyc,,
+werkzeug/http.pyc,,
+werkzeug/urls.pyc,,
+werkzeug/_internal.pyc,,
+werkzeug/contrib/wrappers.pyc,,
+werkzeug/contrib/atom.pyc,,
+werkzeug/testapp.pyc,,
+werkzeug/useragents.pyc,,
+werkzeug/debug/repr.pyc,,
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/Werkzeug-0.11.9.dist-info/WHEEL b/Assignments/microblog/flask/lib/python2.7/site-packages/Werkzeug-0.11.9.dist-info/WHEEL
new file mode 100644
index 0000000..9dff69d
--- /dev/null
+++ b/Assignments/microblog/flask/lib/python2.7/site-packages/Werkzeug-0.11.9.dist-info/WHEEL
@@ -0,0 +1,6 @@
+Wheel-Version: 1.0
+Generator: bdist_wheel (0.24.0)
+Root-Is-Purelib: true
+Tag: py2-none-any
+Tag: py3-none-any
+
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/Werkzeug-0.11.9.dist-info/metadata.json b/Assignments/microblog/flask/lib/python2.7/site-packages/Werkzeug-0.11.9.dist-info/metadata.json
new file mode 100644
index 0000000..be749ea
--- /dev/null
+++ b/Assignments/microblog/flask/lib/python2.7/site-packages/Werkzeug-0.11.9.dist-info/metadata.json
@@ -0,0 +1 @@
+{"license": "BSD", "name": "Werkzeug", "metadata_version": "2.0", "generator": "bdist_wheel (0.24.0)", "summary": "The Swiss Army knife of Python web development", "platform": "any", "version": "0.11.9", "extensions": {"python.details": {"project_urls": {"Home": "http://werkzeug.pocoo.org/"}, "document_names": {"description": "DESCRIPTION.rst"}, "contacts": [{"role": "author", "email": "armin.ronacher@active-4.com", "name": "Armin Ronacher"}]}}, "classifiers": ["Development Status :: 5 - Production/Stable", "Environment :: Web Environment", "Intended Audience :: Developers", "License :: OSI Approved :: BSD License", "Operating System :: OS Independent", "Programming Language :: Python", "Programming Language :: Python :: 2", "Programming Language :: Python :: 2.6", "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.3", "Programming Language :: Python :: 3.4", "Programming Language :: Python :: 3.5", "Topic :: Internet :: WWW/HTTP :: Dynamic Content", "Topic :: Software Development :: Libraries :: Python Modules"]}
\ No newline at end of file
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/Werkzeug-0.11.9.dist-info/top_level.txt b/Assignments/microblog/flask/lib/python2.7/site-packages/Werkzeug-0.11.9.dist-info/top_level.txt
new file mode 100644
index 0000000..6fe8da8
--- /dev/null
+++ b/Assignments/microblog/flask/lib/python2.7/site-packages/Werkzeug-0.11.9.dist-info/top_level.txt
@@ -0,0 +1 @@
+werkzeug
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/Whoosh-2.7.4.dist-info/DESCRIPTION.rst b/Assignments/microblog/flask/lib/python2.7/site-packages/Whoosh-2.7.4.dist-info/DESCRIPTION.rst
new file mode 100644
index 0000000..3bfbaa0
--- /dev/null
+++ b/Assignments/microblog/flask/lib/python2.7/site-packages/Whoosh-2.7.4.dist-info/DESCRIPTION.rst
@@ -0,0 +1,70 @@
+About Whoosh
+============
+
+Whoosh is a fast, featureful full-text indexing and searching library
+implemented in pure Python. Programmers can use it to easily add search
+functionality to their applications and websites. Every part of how Whoosh
+works can be extended or replaced to meet your needs exactly.
+
+Some of Whoosh's features include:
+
+* Pythonic API.
+* Pure-Python. No compilation or binary packages needed, no mysterious crashes.
+* Fielded indexing and search.
+* Fast indexing and retrieval -- faster than any other pure-Python, scoring,
+ full-text search solution I know of.
+* Pluggable scoring algorithm (including BM25F), text analysis, storage,
+ posting format, etc.
+* Powerful query language.
+* Pure Python spell-checker (as far as I know, the only one).
+
+Whoosh might be useful in the following circumstances:
+
+* Anywhere a pure-Python solution is desirable to avoid having to build/compile
+ native libraries (or force users to build/compile them).
+* As a research platform (at least for programmers that find Python easier to
+ read and work with than Java ;)
+* When an easy-to-use Pythonic interface is more important to you than raw
+ speed.
+
+Whoosh was created and is maintained by Matt Chaput. It was originally created
+for use in the online help system of Side Effects Software's 3D animation
+software Houdini. Side Effects Software Inc. graciously agreed to open-source
+the code.
+
+This software is licensed under the terms of the simplified BSD (A.K.A. "two
+clause" or "FreeBSD") license. See LICENSE.txt for information.
+
+Installing Whoosh
+=================
+
+If you have ``setuptools`` or ``pip`` installed, you can use ``easy_install``
+or ``pip`` to download and install Whoosh automatically::
+
+ $ easy_install Whoosh
+
+ or
+
+ $ pip install Whoosh
+
+Learning more
+=============
+
+* Read the online documentation at https://whoosh.readthedocs.org/en/latest/
+
+* Join the Whoosh mailing list at http://groups.google.com/group/whoosh
+
+* File bug reports and view the Whoosh wiki at
+ http://bitbucket.org/mchaput/whoosh/
+
+Getting the source
+==================
+
+Download source releases from PyPI at http://pypi.python.org/pypi/Whoosh/
+
+You can check out the latest version of the source code using Mercurial::
+
+ hg clone http://bitbucket.org/mchaput/whoosh
+
+
+
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/Whoosh-2.7.4.dist-info/INSTALLER b/Assignments/microblog/flask/lib/python2.7/site-packages/Whoosh-2.7.4.dist-info/INSTALLER
new file mode 100644
index 0000000..a1b589e
--- /dev/null
+++ b/Assignments/microblog/flask/lib/python2.7/site-packages/Whoosh-2.7.4.dist-info/INSTALLER
@@ -0,0 +1 @@
+pip
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/Whoosh-2.7.4.dist-info/METADATA b/Assignments/microblog/flask/lib/python2.7/site-packages/Whoosh-2.7.4.dist-info/METADATA
new file mode 100644
index 0000000..f81c878
--- /dev/null
+++ b/Assignments/microblog/flask/lib/python2.7/site-packages/Whoosh-2.7.4.dist-info/METADATA
@@ -0,0 +1,90 @@
+Metadata-Version: 2.0
+Name: Whoosh
+Version: 2.7.4
+Summary: Fast, pure-Python full text indexing, search, and spell checking library.
+Home-page: http://bitbucket.org/mchaput/whoosh
+Author: Matt Chaput
+Author-email: matt@whoosh.ca
+License: Two-clause BSD license
+Keywords: index search text spell
+Platform: UNKNOWN
+Classifier: Development Status :: 5 - Production/Stable
+Classifier: Intended Audience :: Developers
+Classifier: License :: OSI Approved :: BSD License
+Classifier: Natural Language :: English
+Classifier: Operating System :: OS Independent
+Classifier: Programming Language :: Python :: 2.5
+Classifier: Programming Language :: Python :: 3
+Classifier: Topic :: Software Development :: Libraries :: Python Modules
+Classifier: Topic :: Text Processing :: Indexing
+
+About Whoosh
+============
+
+Whoosh is a fast, featureful full-text indexing and searching library
+implemented in pure Python. Programmers can use it to easily add search
+functionality to their applications and websites. Every part of how Whoosh
+works can be extended or replaced to meet your needs exactly.
+
+Some of Whoosh's features include:
+
+* Pythonic API.
+* Pure-Python. No compilation or binary packages needed, no mysterious crashes.
+* Fielded indexing and search.
+* Fast indexing and retrieval -- faster than any other pure-Python, scoring,
+ full-text search solution I know of.
+* Pluggable scoring algorithm (including BM25F), text analysis, storage,
+ posting format, etc.
+* Powerful query language.
+* Pure Python spell-checker (as far as I know, the only one).
+
+Whoosh might be useful in the following circumstances:
+
+* Anywhere a pure-Python solution is desirable to avoid having to build/compile
+ native libraries (or force users to build/compile them).
+* As a research platform (at least for programmers that find Python easier to
+ read and work with than Java ;)
+* When an easy-to-use Pythonic interface is more important to you than raw
+ speed.
+
+Whoosh was created and is maintained by Matt Chaput. It was originally created
+for use in the online help system of Side Effects Software's 3D animation
+software Houdini. Side Effects Software Inc. graciously agreed to open-source
+the code.
+
+This software is licensed under the terms of the simplified BSD (A.K.A. "two
+clause" or "FreeBSD") license. See LICENSE.txt for information.
+
+Installing Whoosh
+=================
+
+If you have ``setuptools`` or ``pip`` installed, you can use ``easy_install``
+or ``pip`` to download and install Whoosh automatically::
+
+ $ easy_install Whoosh
+
+ or
+
+ $ pip install Whoosh
+
+Learning more
+=============
+
+* Read the online documentation at https://whoosh.readthedocs.org/en/latest/
+
+* Join the Whoosh mailing list at http://groups.google.com/group/whoosh
+
+* File bug reports and view the Whoosh wiki at
+ http://bitbucket.org/mchaput/whoosh/
+
+Getting the source
+==================
+
+Download source releases from PyPI at http://pypi.python.org/pypi/Whoosh/
+
+You can check out the latest version of the source code using Mercurial::
+
+ hg clone http://bitbucket.org/mchaput/whoosh
+
+
+
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/Whoosh-2.7.4.dist-info/RECORD b/Assignments/microblog/flask/lib/python2.7/site-packages/Whoosh-2.7.4.dist-info/RECORD
new file mode 100644
index 0000000..81e1165
--- /dev/null
+++ b/Assignments/microblog/flask/lib/python2.7/site-packages/Whoosh-2.7.4.dist-info/RECORD
@@ -0,0 +1,232 @@
+Whoosh-2.7.4.dist-info/DESCRIPTION.rst,sha256=ALJFP8eoDPEyyRkuCQv2BJtHVIyskBA3Rhue7FUs3bo,2293
+Whoosh-2.7.4.dist-info/METADATA,sha256=e2TMDLSiJGrIYhrhroUNszaEM-4tPSLc3NrSm-hdwdI,3065
+Whoosh-2.7.4.dist-info/RECORD,,
+Whoosh-2.7.4.dist-info/WHEEL,sha256=GrqQvamwgBV4nLoJe0vhYRSWzWsx7xjlt74FT0SWYfE,110
+Whoosh-2.7.4.dist-info/metadata.json,sha256=YbRoPesd5Wd6v6NcsVVMp_dQ_eU2XU7Ds7p5lJm4X1I,955
+Whoosh-2.7.4.dist-info/top_level.txt,sha256=SAR0yfE_ZtL-e1XlhOFajAOWQoQODZeveki7YCB7_0M,7
+Whoosh-2.7.4.dist-info/zip-safe,sha256=AbpHGcgLb-kRsJGnwFEktk7uzpZOCcBY74-YBdrKVGs,1
+whoosh/__init__.py,sha256=JbJE8mqQZmXD5NMe6OfR5adqbfMi8JOXUa3Ag1u4Uzk,2059
+whoosh/classify.py,sha256=vw8Q-bhqtgJIWSdqvVkHbkaNUkY85dPoQ_Nxp9w3m4E,11727
+whoosh/collectors.py,sha256=vCq85DafYTX-0EkV3_0p018zs-L2d49EHtJrmlESAmc,42330
+whoosh/columns.py,sha256=MU4e7CUYlna4OlkLIF5B_UhIAEWlYhFmFrNbsncfh7Q,48805
+whoosh/compat.py,sha256=GC7TAjvIM7-cSH_RS6_6eKvF0xSTNcYyIELggPaTiLQ,5357
+whoosh/externalsort.py,sha256=cJaBYL57WoRJQahOiDF1snWrMobCoXVWEDopuq1vqOU,7984
+whoosh/fields.py,sha256=wuOduItkQtkpLqmLbsHfnNyuHb1LVEvjEmcGHvpMSgQ,56513
+whoosh/formats.py,sha256=USvdxDblLj2D0U0c0mWN2mvR72MGf8mPRCS2DQaOjg4,16706
+whoosh/highlight.py,sha256=T88S3JCqYQV8q15uvsi4mjHMYwvjpIrdZAnd7gGHkLo,33812
+whoosh/idsets.py,sha256=go2AmAwKpR-zjlqwnwqcW8qoUONoiMZ69Xny2b99NQQ,19132
+whoosh/index.py,sha256=yYjR88Bs2MYj4nEkrCzN0uxFoMudaQ12EjpyNcuKqgY,24207
+whoosh/legacy.py,sha256=Yb6yAP17QK2t_gORiBVtO0h2QnPlalVDTTpWaHDMQaQ,3459
+whoosh/multiproc.py,sha256=iTjIjUS65DcP2UnOZwXYQXP3nIcSNcJrizYGg2wz9uI,15162
+whoosh/reading.py,sha256=YVgLHuv6kLRs0Uis79LOQqWFWJIda6rQ5CAnmwJns68,41925
+whoosh/scoring.py,sha256=IOEeMsN2AJc8vB99qbghlmR8Zu5VEOU0uGj8ji4rI-s,20940
+whoosh/searching.py,sha256=7OVWFPxsGp5EKZQ0F3rk6latYBjJrt-cfZFncOv7F0k,64442
+whoosh/sorting.py,sha256=Q6M6SONAu6Yfz4wa9Ol89-MintzQGiwQo1uTwOGArH8,41936
+whoosh/spelling.py,sha256=x6KJ6lZH85nYewfP9nSf3LuymguGa9hO7ZO5Do0KzL0,12538
+whoosh/system.py,sha256=0w6NLA32UFvApCVmiW4EzpRNCF9XmfOtgD4aBs0xyaE,2964
+whoosh/writing.py,sha256=Bv1zBK1PDmOeZQS_PHP4s99i7x-WJo3IBg39R74FyVE,45949
+whoosh/analysis/__init__.py,sha256=x4IWXUf6Fn0zONwhvPM4YpbMChSjAFfnW92yIxT0RIo,3288
+whoosh/analysis/acore.py,sha256=V0fhsILYWFM-FnAEO09kroaXgemIAH8yG3vzJkX4x_s,5525
+whoosh/analysis/analyzers.py,sha256=7YVO00UQuRYBwk-jwe41IliFNabtrtS_EGkf8jGm_CY,11277
+whoosh/analysis/filters.py,sha256=r1GX628JPRHpCuqz8r71UV0BYRCIsE7m0Yhg2XtlJRw,16437
+whoosh/analysis/intraword.py,sha256=MiMFr9Y0hM7Pd-olgibIMUgU4YJFWz3TuTe1lz_u-nc,18991
+whoosh/analysis/morph.py,sha256=rYO00-ZXH4oTcJctWclqLbYoNHuZUuvqdneYN_Z3xE4,10125
+whoosh/analysis/ngrams.py,sha256=cY4EGvPM8ZGBozT248j0KD4DhN5tQgfHxxbY297zLI0,8788
+whoosh/analysis/tokenizers.py,sha256=fGVhwBfsgP1v0cXSFKU63kUPQk5ow5WzyiG_Qr1T6x4,12678
+whoosh/automata/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
+whoosh/automata/fsa.py,sha256=VUL5HQZk4WkzPnyf9gBb44HCLJXYuMIYrucJEn_dJr8,20607
+whoosh/automata/glob.py,sha256=o6h3dRaRVqtOj5XWdUYY99NrnLTvO9frxfVNEfZYZP8,3333
+whoosh/automata/lev.py,sha256=kYj958xBlOkTHfZlcElW-4g55ZTsS4jTccCjXrjxVe0,989
+whoosh/automata/nfa.py,sha256=biGHU9iCd3hlg-jeHHZO2SVDbkYap6yE2nfNHyL1H9k,10498
+whoosh/automata/reg.py,sha256=425WbjQjVLk0Y3CujZ5njN98FdAQ_mDIaGTAIEcRZPA,3984
+whoosh/codec/__init__.py,sha256=yU2r9rGuo8pKddViRkTuMCZF7I0uruFt2GET-VXcQTI,1649
+whoosh/codec/base.py,sha256=xdixufAF4rSf6fvnXx1re2V5whmX0hR5uR23j2aO9No,24009
+whoosh/codec/memory.py,sha256=VNC7Pao_Kotvq87XWTP3SDn_orx7oZPmJZXSMUcFVYs,11007
+whoosh/codec/plaintext.py,sha256=sOvWNwP-lcnFspQITtldvnzSn8uO_tJ12zEtTuiwZh0,14256
+whoosh/codec/whoosh3.py,sha256=d0jRf3eik_UoPy-UxaHtYa_h46PxlD8XjfrFFAhmm24,42660
+whoosh/filedb/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
+whoosh/filedb/compound.py,sha256=EZy021Imvam-YzcWiq2uquFavW7-chMtUihqTo957cM,11090
+whoosh/filedb/filestore.py,sha256=Tv36TehxPplSSpv2UFykAG8V9LiwdUicQfBR1bFbiTo,21584
+whoosh/filedb/filetables.py,sha256=NS7xRc6rnia_ZnH0y1jkdwv4G9lm60en9kh-_VtmNvM,25256
+whoosh/filedb/gae.py,sha256=ky7YlA4AIp6YgeOua_gGwnHYcP7oNixmgeKTNMLRWhM,4872
+whoosh/filedb/structfile.py,sha256=mM2UCM5wSdFCCkf6aV7LwXxQVUrwCQqEllPXuoVTELc,12453
+whoosh/lang/__init__.py,sha256=SmsilTP8cvXPdwNkP1A9tKr7bNNbB19q3AMNds8FCZY,4308
+whoosh/lang/dmetaphone.py,sha256=9IYX6KVIcTpnnPirGRMWpJ1dmmPQ0cTek2jXKBuz7kc,17520
+whoosh/lang/isri.py,sha256=_SNE9ss2WmgcK8BmHwCb6H2oJUTGtWb8i8mioN1ixEQ,17041
+whoosh/lang/lovins.py,sha256=DyISws4oQAqumowrTeSRs3AVYv0IXrzw4GF06Ojm0lQ,12645
+whoosh/lang/morph_en.py,sha256=-MVkhGTUaPrZx6wT4lqjVPx4PKfo8_QUe3c0xHtUwWc,48468
+whoosh/lang/paicehusk.py,sha256=IZG2N8C1Q0Qq1c2F-8YMD87FFubKv-l0lVMBMa4bECE,6788
+whoosh/lang/phonetic.py,sha256=cRhtHeoNOym8SY9qiAKkquQFR-X1cu47AMR9jkze1rQ,3369
+whoosh/lang/porter.py,sha256=wLzqTEuFkyykfZi6snDBecr1wGERmN7b8JsP-FKMMu4,4231
+whoosh/lang/porter2.py,sha256=am1-xz0JdEYyJXhyyEFCtqv_okcYejR363a71ZSTENI,8314
+whoosh/lang/stopwords.py,sha256=fDaErbS-CS1pvB5mjYQJam3fj2oHxiYwIZ4TTiGzbjk,16679
+whoosh/lang/wordnet.py,sha256=K7EOnnPEO-M0Pcz5DS8PQ4c4_H5U-QVvyT4LY_uaEk8,8672
+whoosh/lang/snowball/__init__.py,sha256=JnGYTF0ixDIKOykY0CRL4hIyf0KT0s5CX3hijfZ_SYU,2622
+whoosh/lang/snowball/bases.py,sha256=M4V_rN9Q5d_w7zc4_2V_2gWgUyDqN1xjejIYEe7pK9c,4874
+whoosh/lang/snowball/danish.py,sha256=LrR_7ogbf053Ow-Nye6ppcBky1wmQ_yuCUXxDMtglcg,4112
+whoosh/lang/snowball/dutch.py,sha256=E6VjDkA_g7yUZ_pgEusBL17O2r36w3kv-_NLYG0yJnA,6194
+whoosh/lang/snowball/english.py,sha256=qPVvKVKfHmBG-kAJzyUGhAhrOUdQpezDX03LjVawgBk,17347
+whoosh/lang/snowball/finnish.py,sha256=ZdUlnb_mLRtAzt_9SxFqGlzyEE0XwaCyvMRhJ7d4xNU,10074
+whoosh/lang/snowball/french.py,sha256=9skXimUouQ2nUa9T1wvPJouGSyDWUFyu5afemjM58mo,14461
+whoosh/lang/snowball/german.py,sha256=AEKzGYZiRpGMLcEuKSACmB6-U0w4pNjlJ5ST8X6OTU4,5347
+whoosh/lang/snowball/hungarian.py,sha256=fsPF6K9OAu89ebIgNyoeWP5xNLqVPk2f7LpwdVyFr6s,11694
+whoosh/lang/snowball/italian.py,sha256=xOZBqCCtIhpymvDw8Jd83fq-ev5KunYBbN5Oot24X3o,9125
+whoosh/lang/snowball/norwegian.py,sha256=uoxYpKVPcQ5TUMNC5E5eGpp0nwmj6LjPm_1ABAJGe0M,2803
+whoosh/lang/snowball/portugese.py,sha256=vzGC1SzZ37iObYEDvE8FqXXPgQvIquc-xssPodJ6GGA,8221
+whoosh/lang/snowball/romanian.py,sha256=MFWbSo2a3reksn4lg6ygMqyMCzeTkRfrsFact_9_yWs,11966
+whoosh/lang/snowball/russian.py,sha256=Ss2HQV9lHjdFwrDkyLto-YqONAKs-y4CdEB689-1Iog,20904
+whoosh/lang/snowball/spanish.py,sha256=4ztspqoP6ToSyZ3_71TxPYqf0xZNWw4ehu3AqztYVcA,10997
+whoosh/lang/snowball/swedish.py,sha256=jh9v8_xl8VecGYQd9h-fBMfa863NIu_W8aYN3N9rCxs,2760
+whoosh/matching/__init__.py,sha256=4bNIoJ6gNN8bUh2WxeJw1hQ8UKsHLpW_6N88nRl8eGg,1678
+whoosh/matching/binary.py,sha256=gUeOnZfQfX_Ms_OEjVxAQh4h0sJlbe2BDYpCQRgG1fk,24452
+whoosh/matching/combo.py,sha256=QrrSxVTBbDpJU3BKXmW1MbdoS7843a8gzVlOlh4Y_6Q,9926
+whoosh/matching/mcore.py,sha256=dj0DPI7Y6OJJpGLkJ0vMuHzzk1ZVXw4ETlFPVLG4iqw,18841
+whoosh/matching/wrappers.py,sha256=9j1qMaTCTdyjanl0jB_IjB-ESeacF8FOitr4P8bgC0Q,17446
+whoosh/qparser/__init__.py,sha256=52wEqNHMb06XSosbnQpwJeebOo5Y8WtNXYw-Tk0_kKY,1640
+whoosh/qparser/common.py,sha256=t2-EmPgOyjKXTGsAu9cm3Gx9XAiAyUj3d-lGZCoYa2w,2447
+whoosh/qparser/dateparse.py,sha256=ByHn7HTKypIguHz4IznAvNokqdzLXpHhpNScOEJj0m0,32771
+whoosh/qparser/default.py,sha256=E2HuR9PcUsEkK6wviZYlN4OAG2uikthyT1u-_5kzKzA,17071
+whoosh/qparser/plugins.py,sha256=AwKAd9wlNW503r1v5TVFyZghdHzcw4_cT7oT-tMF7Tg,50289
+whoosh/qparser/syntax.py,sha256=A7pS8YT9MgoWmfCFCGKaAuROCCzYaBeihk4RcDRTCW8,18620
+whoosh/qparser/taggers.py,sha256=EL2itoxCZfDyizoVL3iQEUMEOdLraKQbSGsxJMdzjOM,3624
+whoosh/query/__init__.py,sha256=EtrMP5JSn1ubcTPjSrDON0G--ot7ZnOKOI727VCNF3c,1843
+whoosh/query/compound.py,sha256=_Q2eZzNZbNNtj1Dd0nbOPjcj8EoJvc1uyIWyDBgG8qU,22179
+whoosh/query/nested.py,sha256=lWm_3MHqLpRyFhDUDC1SDfF20WnDtHfLZ7pstvyYfW4,15612
+whoosh/query/positional.py,sha256=rwgAS0NwTqJht_YUpCIH27aKdZdZ7GgD4ygxQYN0rEg,9427
+whoosh/query/qcolumns.py,sha256=vOGXJUtdd_NPkAX9BzYeq3Im4PG3yXM6ASqgT2yR9B8,4197
+whoosh/query/qcore.py,sha256=RhtHIc5UazMzQK-5xtsx3tvwviaIrsKWmMeXVgp6y0o,22789
+whoosh/query/ranges.py,sha256=kg0Ktk168mj0Y6m-A20uAhgZ07qvfxmBXiEF4-vIVHE,13420
+whoosh/query/spans.py,sha256=oMvLJ25W-hrrdCcYmZZW-jVAMFdzwhGCUSana2Gm6N4,29071
+whoosh/query/terms.py,sha256=BhstNKPH-fVChXXPeZKCaybBnd3OtU2q-2uwpZGGMJQ,17916
+whoosh/query/wrappers.py,sha256=7qx3JEJGBwYUDL0qnIZQN9YrM3YfQA__SIcqgnpj6F0,6748
+whoosh/support/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
+whoosh/support/base85.py,sha256=_FG3gRbvL0YzvZvpAhcRlLo_zqJuNjGvPIylleMcOjE,2473
+whoosh/support/bench.py,sha256=TEbeTyNSw2cm8hDHdolbC1HU39brkpiTEv2_B9POPhY,21240
+whoosh/support/charset.py,sha256=87cCQdwRwS5V6UJ85Lxq8aqrc1nzGlRcdjRC9f4jCzY,80576
+whoosh/support/levenshtein.py,sha256=qxZ78dmdGFN0tmFCDUp56h3-Wnp4wJNPqBL1OFNpmEY,2385
+whoosh/support/relativedelta.py,sha256=QJXdGCBtEVp4LDTI62Ki8w7T6hDv1gThve5jC0eZ6JU,17347
+whoosh/support/unicode.py,sha256=cgbVGmNJmt3Gcd-58bFSXGeicJIAtPnDb_7OvUC1_is,26604
+whoosh/util/__init__.py,sha256=nCBYxYgEQsPle3CHQYHzW5UmdoeaPeXKVYBP3dFFHh4,4424
+whoosh/util/cache.py,sha256=9vjQEede9sw4jKTnIQ4477dTQVQO6tJ9O_9RsOgrhtU,13382
+whoosh/util/filelock.py,sha256=wBtMePDhUWT0KtUUj3mq8XwYbdVa0VZZdwKMUmn6W-A,5291
+whoosh/util/loading.py,sha256=LQME3AjeJAGScjsQEQfk9hHbtBhglsQZDXWQE2MdG-Y,3221
+whoosh/util/numeric.py,sha256=W1mXVQ66L0-wkPcG-4ty0TVmGcNKeLNWdUEvsXIY8gQ,11285
+whoosh/util/numlists.py,sha256=1cTtEMqoUhEKcolnQ3V7GPT6rvRoB6zr9hJ8e3WeJQ4,10425
+whoosh/util/testing.py,sha256=IPteVq5sd1UYeDtkn7yUVCFnpOPWyPAaVwa9wic-mK4,4517
+whoosh/util/text.py,sha256=Fh6EcgA-t8xVayIFJ8hZYZ30VjHiY8q2cxKL1FpkVhk,4372
+whoosh/util/times.py,sha256=iWWcsaur1lYgHmk4KGop3AMomVqsWV93MlfoWhkWAPU,16936
+whoosh/util/varints.py,sha256=9_sJhSqrA-nZHl0NQy6RCDwtU4aGiAWUvE4ymyFvXcY,3198
+whoosh/util/versions.py,sha256=BIePTAYc7VR1X8CBZimOjR6Cp1_zt3j_ZUqe0_sN0Uk,5275
+Whoosh-2.7.4.dist-info/INSTALLER,sha256=zuuue4knoyJ-UwPPXg8fezS7VCrXJQrAP7zeNuwvFQg,4
+whoosh/sorting.pyc,,
+whoosh/lang/snowball/norwegian.pyc,,
+whoosh/util/testing.pyc,,
+whoosh/util/versions.pyc,,
+whoosh/externalsort.pyc,,
+whoosh/lang/wordnet.pyc,,
+whoosh/query/compound.pyc,,
+whoosh/reading.pyc,,
+whoosh/compat.pyc,,
+whoosh/support/levenshtein.pyc,,
+whoosh/query/ranges.pyc,,
+whoosh/lang/__init__.pyc,,
+whoosh/qparser/dateparse.pyc,,
+whoosh/util/numlists.pyc,,
+whoosh/matching/binary.pyc,,
+whoosh/matching/mcore.pyc,,
+whoosh/support/relativedelta.pyc,,
+whoosh/analysis/filters.pyc,,
+whoosh/query/qcolumns.pyc,,
+whoosh/analysis/ngrams.pyc,,
+whoosh/analysis/intraword.pyc,,
+whoosh/lang/snowball/french.pyc,,
+whoosh/lang/snowball/bases.pyc,,
+whoosh/support/charset.pyc,,
+whoosh/automata/lev.pyc,,
+whoosh/qparser/taggers.pyc,,
+whoosh/query/nested.pyc,,
+whoosh/lang/snowball/hungarian.pyc,,
+whoosh/codec/whoosh3.pyc,,
+whoosh/analysis/acore.pyc,,
+whoosh/lang/snowball/romanian.pyc,,
+whoosh/index.pyc,,
+whoosh/query/qcore.pyc,,
+whoosh/classify.pyc,,
+whoosh/query/__init__.pyc,,
+whoosh/codec/plaintext.pyc,,
+whoosh/qparser/default.pyc,,
+whoosh/__init__.pyc,,
+whoosh/qparser/common.pyc,,
+whoosh/matching/wrappers.pyc,,
+whoosh/automata/nfa.pyc,,
+whoosh/automata/glob.pyc,,
+whoosh/legacy.pyc,,
+whoosh/query/wrappers.pyc,,
+whoosh/lang/porter.pyc,,
+whoosh/lang/snowball/swedish.pyc,,
+whoosh/lang/isri.pyc,,
+whoosh/lang/snowball/german.pyc,,
+whoosh/lang/snowball/italian.pyc,,
+whoosh/qparser/plugins.pyc,,
+whoosh/query/spans.pyc,,
+whoosh/util/text.pyc,,
+whoosh/multiproc.pyc,,
+whoosh/util/varints.pyc,,
+whoosh/support/__init__.pyc,,
+whoosh/system.pyc,,
+whoosh/formats.pyc,,
+whoosh/util/filelock.pyc,,
+whoosh/filedb/__init__.pyc,,
+whoosh/filedb/filestore.pyc,,
+whoosh/lang/snowball/spanish.pyc,,
+whoosh/filedb/gae.pyc,,
+whoosh/columns.pyc,,
+whoosh/searching.pyc,,
+whoosh/automata/__init__.pyc,,
+whoosh/analysis/morph.pyc,,
+whoosh/analysis/tokenizers.pyc,,
+whoosh/lang/snowball/dutch.pyc,,
+whoosh/scoring.pyc,,
+whoosh/lang/porter2.pyc,,
+whoosh/filedb/filetables.pyc,,
+whoosh/filedb/compound.pyc,,
+whoosh/automata/reg.pyc,,
+whoosh/lang/paicehusk.pyc,,
+whoosh/qparser/syntax.pyc,,
+whoosh/idsets.pyc,,
+whoosh/codec/base.pyc,,
+whoosh/writing.pyc,,
+whoosh/lang/snowball/english.pyc,,
+whoosh/lang/dmetaphone.pyc,,
+whoosh/qparser/__init__.pyc,,
+whoosh/lang/snowball/finnish.pyc,,
+whoosh/filedb/structfile.pyc,,
+whoosh/util/cache.pyc,,
+whoosh/codec/memory.pyc,,
+whoosh/util/numeric.pyc,,
+whoosh/support/base85.pyc,,
+whoosh/query/terms.pyc,,
+whoosh/matching/__init__.pyc,,
+whoosh/util/loading.pyc,,
+whoosh/spelling.pyc,,
+whoosh/util/times.pyc,,
+whoosh/lang/snowball/portugese.pyc,,
+whoosh/lang/morph_en.pyc,,
+whoosh/fields.pyc,,
+whoosh/lang/phonetic.pyc,,
+whoosh/analysis/analyzers.pyc,,
+whoosh/lang/lovins.pyc,,
+whoosh/highlight.pyc,,
+whoosh/support/unicode.pyc,,
+whoosh/matching/combo.pyc,,
+whoosh/lang/snowball/russian.pyc,,
+whoosh/support/bench.pyc,,
+whoosh/automata/fsa.pyc,,
+whoosh/lang/stopwords.pyc,,
+whoosh/query/positional.pyc,,
+whoosh/analysis/__init__.pyc,,
+whoosh/codec/__init__.pyc,,
+whoosh/collectors.pyc,,
+whoosh/lang/snowball/__init__.pyc,,
+whoosh/util/__init__.pyc,,
+whoosh/lang/snowball/danish.pyc,,
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/Whoosh-2.7.4.dist-info/WHEEL b/Assignments/microblog/flask/lib/python2.7/site-packages/Whoosh-2.7.4.dist-info/WHEEL
new file mode 100644
index 0000000..0de529b
--- /dev/null
+++ b/Assignments/microblog/flask/lib/python2.7/site-packages/Whoosh-2.7.4.dist-info/WHEEL
@@ -0,0 +1,6 @@
+Wheel-Version: 1.0
+Generator: bdist_wheel (0.26.0)
+Root-Is-Purelib: true
+Tag: py2-none-any
+Tag: py3-none-any
+
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/Whoosh-2.7.4.dist-info/metadata.json b/Assignments/microblog/flask/lib/python2.7/site-packages/Whoosh-2.7.4.dist-info/metadata.json
new file mode 100644
index 0000000..f50331e
--- /dev/null
+++ b/Assignments/microblog/flask/lib/python2.7/site-packages/Whoosh-2.7.4.dist-info/metadata.json
@@ -0,0 +1 @@
+{"generator": "bdist_wheel (0.26.0)", "summary": "Fast, pure-Python full text indexing, search, and spell checking library.", "classifiers": ["Development Status :: 5 - Production/Stable", "Intended Audience :: Developers", "License :: OSI Approved :: BSD License", "Natural Language :: English", "Operating System :: OS Independent", "Programming Language :: Python :: 2.5", "Programming Language :: Python :: 3", "Topic :: Software Development :: Libraries :: Python Modules", "Topic :: Text Processing :: Indexing"], "extensions": {"python.details": {"project_urls": {"Home": "http://bitbucket.org/mchaput/whoosh"}, "contacts": [{"email": "matt@whoosh.ca", "name": "Matt Chaput", "role": "author"}], "document_names": {"description": "DESCRIPTION.rst"}}}, "keywords": ["index", "search", "text", "spell"], "license": "Two-clause BSD license", "metadata_version": "2.0", "name": "Whoosh", "version": "2.7.4", "test_requires": [{"requires": ["pytest"]}]}
\ No newline at end of file
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/Whoosh-2.7.4.dist-info/top_level.txt b/Assignments/microblog/flask/lib/python2.7/site-packages/Whoosh-2.7.4.dist-info/top_level.txt
new file mode 100644
index 0000000..d752255
--- /dev/null
+++ b/Assignments/microblog/flask/lib/python2.7/site-packages/Whoosh-2.7.4.dist-info/top_level.txt
@@ -0,0 +1 @@
+whoosh
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/Whoosh-2.7.4.dist-info/zip-safe b/Assignments/microblog/flask/lib/python2.7/site-packages/Whoosh-2.7.4.dist-info/zip-safe
new file mode 100644
index 0000000..8b13789
--- /dev/null
+++ b/Assignments/microblog/flask/lib/python2.7/site-packages/Whoosh-2.7.4.dist-info/zip-safe
@@ -0,0 +1 @@
+
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/__init__.py b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/__init__.py
new file mode 100644
index 0000000..ecc4059
--- /dev/null
+++ b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/__init__.py
@@ -0,0 +1,24 @@
+# -*- coding: utf-8 -*-
+"""
+ babel
+ ~~~~~
+
+ Integrated collection of utilities that assist in internationalizing and
+ localizing applications.
+
+ This package is basically composed of two major parts:
+
+ * tools to build and work with ``gettext`` message catalogs
+ * a Python interface to the CLDR (Common Locale Data Repository), providing
+ access to various locale display names, localized number and date
+ formatting, etc.
+
+ :copyright: (c) 2013 by the Babel Team.
+ :license: BSD, see LICENSE for more details.
+"""
+
+from babel.core import UnknownLocaleError, Locale, default_locale, \
+ negotiate_locale, parse_locale, get_locale_identifier
+
+
+__version__ = '2.3.4'
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/__init__.pyc b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/__init__.pyc
new file mode 100644
index 0000000..a98d966
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/__init__.pyc differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/_compat.py b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/_compat.py
new file mode 100644
index 0000000..75abf9e
--- /dev/null
+++ b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/_compat.py
@@ -0,0 +1,76 @@
+import sys
+import array
+
+PY2 = sys.version_info[0] == 2
+
+_identity = lambda x: x
+
+
+if not PY2:
+ text_type = str
+ string_types = (str,)
+ integer_types = (int, )
+ unichr = chr
+
+ text_to_native = lambda s, enc: s
+
+ iterkeys = lambda d: iter(d.keys())
+ itervalues = lambda d: iter(d.values())
+ iteritems = lambda d: iter(d.items())
+
+ from io import StringIO, BytesIO
+ import pickle
+
+ izip = zip
+ imap = map
+ range_type = range
+
+ cmp = lambda a, b: (a > b) - (a < b)
+
+ array_tobytes = array.array.tobytes
+
+else:
+ text_type = unicode
+ string_types = (str, unicode)
+ integer_types = (int, long)
+
+ text_to_native = lambda s, enc: s.encode(enc)
+ unichr = unichr
+
+ iterkeys = lambda d: d.iterkeys()
+ itervalues = lambda d: d.itervalues()
+ iteritems = lambda d: d.iteritems()
+
+ from cStringIO import StringIO as BytesIO
+ from StringIO import StringIO
+ import cPickle as pickle
+
+ from itertools import imap
+ from itertools import izip
+ range_type = xrange
+
+ cmp = cmp
+
+ array_tobytes = array.array.tostring
+
+
+number_types = integer_types + (float,)
+
+
+#
+# Use cdecimal when available
+#
+from decimal import (Decimal as _dec,
+ InvalidOperation as _invop,
+ ROUND_HALF_EVEN as _RHE)
+try:
+ from cdecimal import (Decimal as _cdec,
+ InvalidOperation as _cinvop,
+ ROUND_HALF_EVEN as _CRHE)
+ Decimal = _cdec
+ InvalidOperation = (_invop, _cinvop)
+ ROUND_HALF_EVEN = _CRHE
+except ImportError:
+ Decimal = _dec
+ InvalidOperation = _invop
+ ROUND_HALF_EVEN = _RHE
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/_compat.pyc b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/_compat.pyc
new file mode 100644
index 0000000..6e27b2d
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/_compat.pyc differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/core.py b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/core.py
new file mode 100644
index 0000000..4e00ebf
--- /dev/null
+++ b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/core.py
@@ -0,0 +1,1135 @@
+# -*- coding: utf-8 -*-
+"""
+ babel.core
+ ~~~~~~~~~~
+
+ Core locale representation and locale data access.
+
+ :copyright: (c) 2013 by the Babel Team.
+ :license: BSD, see LICENSE for more details.
+"""
+
+import os
+
+from babel import localedata
+from babel._compat import pickle, string_types
+from babel.plural import PluralRule
+
+__all__ = ['UnknownLocaleError', 'Locale', 'default_locale', 'negotiate_locale',
+ 'parse_locale']
+
+
+_global_data = None
+_default_plural_rule = PluralRule({})
+
+
+def _raise_no_data_error():
+ raise RuntimeError('The babel data files are not available. '
+ 'This usually happens because you are using '
+ 'a source checkout from Babel and you did '
+ 'not build the data files. Just make sure '
+ 'to run "python setup.py import_cldr" before '
+ 'installing the library.')
+
+
+def get_global(key):
+ """Return the dictionary for the given key in the global data.
+
+ The global data is stored in the ``babel/global.dat`` file and contains
+ information independent of individual locales.
+
+ >>> get_global('zone_aliases')['UTC']
+ u'Etc/GMT'
+ >>> get_global('zone_territories')['Europe/Berlin']
+ u'DE'
+
+ The keys available are:
+
+ - ``currency_fractions``
+ - ``language_aliases``
+ - ``likely_subtags``
+ - ``parent_exceptions``
+ - ``script_aliases``
+ - ``territory_aliases``
+ - ``territory_currencies``
+ - ``territory_languages``
+ - ``territory_zones``
+ - ``variant_aliases``
+ - ``win_mapping``
+ - ``zone_aliases``
+ - ``zone_territories``
+
+ .. note:: The internal structure of the data may change between versions.
+
+ .. versionadded:: 0.9
+
+ :param key: the data key
+ """
+ global _global_data
+ if _global_data is None:
+ dirname = os.path.join(os.path.dirname(__file__))
+ filename = os.path.join(dirname, 'global.dat')
+ if not os.path.isfile(filename):
+ _raise_no_data_error()
+ fileobj = open(filename, 'rb')
+ try:
+ _global_data = pickle.load(fileobj)
+ finally:
+ fileobj.close()
+ return _global_data.get(key, {})
+
+
+LOCALE_ALIASES = {
+ 'ar': 'ar_SY', 'bg': 'bg_BG', 'bs': 'bs_BA', 'ca': 'ca_ES', 'cs': 'cs_CZ',
+ 'da': 'da_DK', 'de': 'de_DE', 'el': 'el_GR', 'en': 'en_US', 'es': 'es_ES',
+ 'et': 'et_EE', 'fa': 'fa_IR', 'fi': 'fi_FI', 'fr': 'fr_FR', 'gl': 'gl_ES',
+ 'he': 'he_IL', 'hu': 'hu_HU', 'id': 'id_ID', 'is': 'is_IS', 'it': 'it_IT',
+ 'ja': 'ja_JP', 'km': 'km_KH', 'ko': 'ko_KR', 'lt': 'lt_LT', 'lv': 'lv_LV',
+ 'mk': 'mk_MK', 'nl': 'nl_NL', 'nn': 'nn_NO', 'no': 'nb_NO', 'pl': 'pl_PL',
+ 'pt': 'pt_PT', 'ro': 'ro_RO', 'ru': 'ru_RU', 'sk': 'sk_SK', 'sl': 'sl_SI',
+ 'sv': 'sv_SE', 'th': 'th_TH', 'tr': 'tr_TR', 'uk': 'uk_UA'
+}
+
+
+class UnknownLocaleError(Exception):
+ """Exception thrown when a locale is requested for which no locale data
+ is available.
+ """
+
+ def __init__(self, identifier):
+ """Create the exception.
+
+ :param identifier: the identifier string of the unsupported locale
+ """
+ Exception.__init__(self, 'unknown locale %r' % identifier)
+
+ #: The identifier of the locale that could not be found.
+ self.identifier = identifier
+
+
+class Locale(object):
+ """Representation of a specific locale.
+
+ >>> locale = Locale('en', 'US')
+ >>> repr(locale)
+ "Locale('en', territory='US')"
+ >>> locale.display_name
+ u'English (United States)'
+
+ A `Locale` object can also be instantiated from a raw locale string:
+
+ >>> locale = Locale.parse('en-US', sep='-')
+ >>> repr(locale)
+ "Locale('en', territory='US')"
+
+ `Locale` objects provide access to a collection of locale data, such as
+ territory and language names, number and date format patterns, and more:
+
+ >>> locale.number_symbols['decimal']
+ u'.'
+
+ If a locale is requested for which no locale data is available, an
+ `UnknownLocaleError` is raised:
+
+ >>> Locale.parse('en_XX')
+ Traceback (most recent call last):
+ ...
+ UnknownLocaleError: unknown locale 'en_XX'
+
+ For more information see :rfc:`3066`.
+ """
+
+ def __init__(self, language, territory=None, script=None, variant=None):
+ """Initialize the locale object from the given identifier components.
+
+ >>> locale = Locale('en', 'US')
+ >>> locale.language
+ 'en'
+ >>> locale.territory
+ 'US'
+
+ :param language: the language code
+ :param territory: the territory (country or region) code
+ :param script: the script code
+ :param variant: the variant code
+ :raise `UnknownLocaleError`: if no locale data is available for the
+ requested locale
+ """
+ #: the language code
+ self.language = language
+ #: the territory (country or region) code
+ self.territory = territory
+ #: the script code
+ self.script = script
+ #: the variant code
+ self.variant = variant
+ self.__data = None
+
+ identifier = str(self)
+ if not localedata.exists(identifier):
+ raise UnknownLocaleError(identifier)
+
+ @classmethod
+ def default(cls, category=None, aliases=LOCALE_ALIASES):
+ """Return the system default locale for the specified category.
+
+ >>> for name in ['LANGUAGE', 'LC_ALL', 'LC_CTYPE', 'LC_MESSAGES']:
+ ... os.environ[name] = ''
+ >>> os.environ['LANG'] = 'fr_FR.UTF-8'
+ >>> Locale.default('LC_MESSAGES')
+ Locale('fr', territory='FR')
+
+ The following fallbacks to the variable are always considered:
+
+ - ``LANGUAGE``
+ - ``LC_ALL``
+ - ``LC_CTYPE``
+ - ``LANG``
+
+ :param category: one of the ``LC_XXX`` environment variable names
+ :param aliases: a dictionary of aliases for locale identifiers
+ """
+ # XXX: use likely subtag expansion here instead of the
+ # aliases dictionary.
+ locale_string = default_locale(category, aliases=aliases)
+ return cls.parse(locale_string)
+
+ @classmethod
+ def negotiate(cls, preferred, available, sep='_', aliases=LOCALE_ALIASES):
+ """Find the best match between available and requested locale strings.
+
+ >>> Locale.negotiate(['de_DE', 'en_US'], ['de_DE', 'de_AT'])
+ Locale('de', territory='DE')
+ >>> Locale.negotiate(['de_DE', 'en_US'], ['en', 'de'])
+ Locale('de')
+ >>> Locale.negotiate(['de_DE', 'de'], ['en_US'])
+
+ You can specify the character used in the locale identifiers to separate
+ the differnet components. This separator is applied to both lists. Also,
+ case is ignored in the comparison:
+
+ >>> Locale.negotiate(['de-DE', 'de'], ['en-us', 'de-de'], sep='-')
+ Locale('de', territory='DE')
+
+ :param preferred: the list of locale identifers preferred by the user
+ :param available: the list of locale identifiers available
+ :param aliases: a dictionary of aliases for locale identifiers
+ """
+ identifier = negotiate_locale(preferred, available, sep=sep,
+ aliases=aliases)
+ if identifier:
+ return Locale.parse(identifier, sep=sep)
+
+ @classmethod
+ def parse(cls, identifier, sep='_', resolve_likely_subtags=True):
+ """Create a `Locale` instance for the given locale identifier.
+
+ >>> l = Locale.parse('de-DE', sep='-')
+ >>> l.display_name
+ u'Deutsch (Deutschland)'
+
+ If the `identifier` parameter is not a string, but actually a `Locale`
+ object, that object is returned:
+
+ >>> Locale.parse(l)
+ Locale('de', territory='DE')
+
+ This also can perform resolving of likely subtags which it does
+ by default. This is for instance useful to figure out the most
+ likely locale for a territory you can use ``'und'`` as the
+ language tag:
+
+ >>> Locale.parse('und_AT')
+ Locale('de', territory='AT')
+
+ :param identifier: the locale identifier string
+ :param sep: optional component separator
+ :param resolve_likely_subtags: if this is specified then a locale will
+ have its likely subtag resolved if the
+ locale otherwise does not exist. For
+ instance ``zh_TW`` by itself is not a
+ locale that exists but Babel can
+ automatically expand it to the full
+ form of ``zh_hant_TW``. Note that this
+ expansion is only taking place if no
+ locale exists otherwise. For instance
+ there is a locale ``en`` that can exist
+ by itself.
+ :raise `ValueError`: if the string does not appear to be a valid locale
+ identifier
+ :raise `UnknownLocaleError`: if no locale data is available for the
+ requested locale
+ """
+ if identifier is None:
+ return None
+ elif isinstance(identifier, Locale):
+ return identifier
+ elif not isinstance(identifier, string_types):
+ raise TypeError('Unxpected value for identifier: %r' % (identifier,))
+
+ parts = parse_locale(identifier, sep=sep)
+ input_id = get_locale_identifier(parts)
+
+ def _try_load(parts):
+ try:
+ return cls(*parts)
+ except UnknownLocaleError:
+ return None
+
+ def _try_load_reducing(parts):
+ # Success on first hit, return it.
+ locale = _try_load(parts)
+ if locale is not None:
+ return locale
+
+ # Now try without script and variant
+ locale = _try_load(parts[:2])
+ if locale is not None:
+ return locale
+
+ locale = _try_load(parts)
+ if locale is not None:
+ return locale
+ if not resolve_likely_subtags:
+ raise UnknownLocaleError(input_id)
+
+ # From here onwards is some very bad likely subtag resolving. This
+ # whole logic is not entirely correct but good enough (tm) for the
+ # time being. This has been added so that zh_TW does not cause
+ # errors for people when they upgrade. Later we should properly
+ # implement ICU like fuzzy locale objects and provide a way to
+ # maximize and minimize locale tags.
+
+ language, territory, script, variant = parts
+ language = get_global('language_aliases').get(language, language)
+ territory = get_global('territory_aliases').get(territory, (territory,))[0]
+ script = get_global('script_aliases').get(script, script)
+ variant = get_global('variant_aliases').get(variant, variant)
+
+ if territory == 'ZZ':
+ territory = None
+ if script == 'Zzzz':
+ script = None
+
+ parts = language, territory, script, variant
+
+ # First match: try the whole identifier
+ new_id = get_locale_identifier(parts)
+ likely_subtag = get_global('likely_subtags').get(new_id)
+ if likely_subtag is not None:
+ locale = _try_load_reducing(parse_locale(likely_subtag))
+ if locale is not None:
+ return locale
+
+ # If we did not find anything so far, try again with a
+ # simplified identifier that is just the language
+ likely_subtag = get_global('likely_subtags').get(language)
+ if likely_subtag is not None:
+ language2, _, script2, variant2 = parse_locale(likely_subtag)
+ locale = _try_load_reducing((language2, territory, script2, variant2))
+ if locale is not None:
+ return locale
+
+ raise UnknownLocaleError(input_id)
+
+ def __eq__(self, other):
+ for key in ('language', 'territory', 'script', 'variant'):
+ if not hasattr(other, key):
+ return False
+ return (self.language == other.language) and \
+ (self.territory == other.territory) and \
+ (self.script == other.script) and \
+ (self.variant == other.variant)
+
+ def __ne__(self, other):
+ return not self.__eq__(other)
+
+ def __hash__(self):
+ return hash((self.language, self.territory, self.script, self.variant))
+
+ def __repr__(self):
+ parameters = ['']
+ for key in ('territory', 'script', 'variant'):
+ value = getattr(self, key)
+ if value is not None:
+ parameters.append('%s=%r' % (key, value))
+ parameter_string = '%r' % self.language + ', '.join(parameters)
+ return 'Locale(%s)' % parameter_string
+
+ def __str__(self):
+ return get_locale_identifier((self.language, self.territory,
+ self.script, self.variant))
+
+ @property
+ def _data(self):
+ if self.__data is None:
+ self.__data = localedata.LocaleDataDict(localedata.load(str(self)))
+ return self.__data
+
+ def get_display_name(self, locale=None):
+ """Return the display name of the locale using the given locale.
+
+ The display name will include the language, territory, script, and
+ variant, if those are specified.
+
+ >>> Locale('zh', 'CN', script='Hans').get_display_name('en')
+ u'Chinese (Simplified, China)'
+
+ :param locale: the locale to use
+ """
+ if locale is None:
+ locale = self
+ locale = Locale.parse(locale)
+ retval = locale.languages.get(self.language)
+ if self.territory or self.script or self.variant:
+ details = []
+ if self.script:
+ details.append(locale.scripts.get(self.script))
+ if self.territory:
+ details.append(locale.territories.get(self.territory))
+ if self.variant:
+ details.append(locale.variants.get(self.variant))
+ details = filter(None, details)
+ if details:
+ retval += ' (%s)' % u', '.join(details)
+ return retval
+
+ display_name = property(get_display_name, doc="""\
+ The localized display name of the locale.
+
+ >>> Locale('en').display_name
+ u'English'
+ >>> Locale('en', 'US').display_name
+ u'English (United States)'
+ >>> Locale('sv').display_name
+ u'svenska'
+
+ :type: `unicode`
+ """)
+
+ def get_language_name(self, locale=None):
+ """Return the language of this locale in the given locale.
+
+ >>> Locale('zh', 'CN', script='Hans').get_language_name('de')
+ u'Chinesisch'
+
+ .. versionadded:: 1.0
+
+ :param locale: the locale to use
+ """
+ if locale is None:
+ locale = self
+ locale = Locale.parse(locale)
+ return locale.languages.get(self.language)
+
+ language_name = property(get_language_name, doc="""\
+ The localized language name of the locale.
+
+ >>> Locale('en', 'US').language_name
+ u'English'
+ """)
+
+ def get_territory_name(self, locale=None):
+ """Return the territory name in the given locale."""
+ if locale is None:
+ locale = self
+ locale = Locale.parse(locale)
+ return locale.territories.get(self.territory)
+
+ territory_name = property(get_territory_name, doc="""\
+ The localized territory name of the locale if available.
+
+ >>> Locale('de', 'DE').territory_name
+ u'Deutschland'
+ """)
+
+ def get_script_name(self, locale=None):
+ """Return the script name in the given locale."""
+ if locale is None:
+ locale = self
+ locale = Locale.parse(locale)
+ return locale.scripts.get(self.script)
+
+ script_name = property(get_script_name, doc="""\
+ The localized script name of the locale if available.
+
+ >>> Locale('sr', 'ME', script='Latn').script_name
+ u'latinica'
+ """)
+
+ @property
+ def english_name(self):
+ """The english display name of the locale.
+
+ >>> Locale('de').english_name
+ u'German'
+ >>> Locale('de', 'DE').english_name
+ u'German (Germany)'
+
+ :type: `unicode`"""
+ return self.get_display_name(Locale('en'))
+
+ # { General Locale Display Names
+
+ @property
+ def languages(self):
+ """Mapping of language codes to translated language names.
+
+ >>> Locale('de', 'DE').languages['ja']
+ u'Japanisch'
+
+ See `ISO 639 `_ for
+ more information.
+ """
+ return self._data['languages']
+
+ @property
+ def scripts(self):
+ """Mapping of script codes to translated script names.
+
+ >>> Locale('en', 'US').scripts['Hira']
+ u'Hiragana'
+
+ See `ISO 15924 `_
+ for more information.
+ """
+ return self._data['scripts']
+
+ @property
+ def territories(self):
+ """Mapping of script codes to translated script names.
+
+ >>> Locale('es', 'CO').territories['DE']
+ u'Alemania'
+
+ See `ISO 3166 `_
+ for more information.
+ """
+ return self._data['territories']
+
+ @property
+ def variants(self):
+ """Mapping of script codes to translated script names.
+
+ >>> Locale('de', 'DE').variants['1901']
+ u'Alte deutsche Rechtschreibung'
+ """
+ return self._data['variants']
+
+ # { Number Formatting
+
+ @property
+ def currencies(self):
+ """Mapping of currency codes to translated currency names. This
+ only returns the generic form of the currency name, not the count
+ specific one. If an actual number is requested use the
+ :func:`babel.numbers.get_currency_name` function.
+
+ >>> Locale('en').currencies['COP']
+ u'Colombian Peso'
+ >>> Locale('de', 'DE').currencies['COP']
+ u'Kolumbianischer Peso'
+ """
+ return self._data['currency_names']
+
+ @property
+ def currency_symbols(self):
+ """Mapping of currency codes to symbols.
+
+ >>> Locale('en', 'US').currency_symbols['USD']
+ u'$'
+ >>> Locale('es', 'CO').currency_symbols['USD']
+ u'US$'
+ """
+ return self._data['currency_symbols']
+
+ @property
+ def number_symbols(self):
+ """Symbols used in number formatting.
+
+ .. note:: The format of the value returned may change between
+ Babel versions.
+
+ >>> Locale('fr', 'FR').number_symbols['decimal']
+ u','
+ """
+ return self._data['number_symbols']
+
+ @property
+ def decimal_formats(self):
+ """Locale patterns for decimal number formatting.
+
+ .. note:: The format of the value returned may change between
+ Babel versions.
+
+ >>> Locale('en', 'US').decimal_formats[None]
+
+ """
+ return self._data['decimal_formats']
+
+ @property
+ def currency_formats(self):
+ """Locale patterns for currency number formatting.
+
+ .. note:: The format of the value returned may change between
+ Babel versions.
+
+ >>> Locale('en', 'US').currency_formats['standard']
+
+ >>> Locale('en', 'US').currency_formats['accounting']
+
+ """
+ return self._data['currency_formats']
+
+ @property
+ def percent_formats(self):
+ """Locale patterns for percent number formatting.
+
+ .. note:: The format of the value returned may change between
+ Babel versions.
+
+ >>> Locale('en', 'US').percent_formats[None]
+
+ """
+ return self._data['percent_formats']
+
+ @property
+ def scientific_formats(self):
+ """Locale patterns for scientific number formatting.
+
+ .. note:: The format of the value returned may change between
+ Babel versions.
+
+ >>> Locale('en', 'US').scientific_formats[None]
+
+ """
+ return self._data['scientific_formats']
+
+ # { Calendar Information and Date Formatting
+
+ @property
+ def periods(self):
+ """Locale display names for day periods (AM/PM).
+
+ >>> Locale('en', 'US').periods['am']
+ u'AM'
+ """
+ try:
+ return self._data['day_periods']['stand-alone']['wide']
+ except KeyError:
+ return {}
+
+ @property
+ def day_periods(self):
+ """Locale display names for various day periods (not necessarily only AM/PM).
+
+ These are not meant to be used without the relevant `day_period_rules`.
+ """
+ return self._data['day_periods']
+
+ @property
+ def day_period_rules(self):
+ """Day period rules for the locale. Used by `get_period_id`.
+ """
+ return self._data.get('day_period_rules', {})
+
+ @property
+ def days(self):
+ """Locale display names for weekdays.
+
+ >>> Locale('de', 'DE').days['format']['wide'][3]
+ u'Donnerstag'
+ """
+ return self._data['days']
+
+ @property
+ def months(self):
+ """Locale display names for months.
+
+ >>> Locale('de', 'DE').months['format']['wide'][10]
+ u'Oktober'
+ """
+ return self._data['months']
+
+ @property
+ def quarters(self):
+ """Locale display names for quarters.
+
+ >>> Locale('de', 'DE').quarters['format']['wide'][1]
+ u'1. Quartal'
+ """
+ return self._data['quarters']
+
+ @property
+ def eras(self):
+ """Locale display names for eras.
+
+ .. note:: The format of the value returned may change between
+ Babel versions.
+
+ >>> Locale('en', 'US').eras['wide'][1]
+ u'Anno Domini'
+ >>> Locale('en', 'US').eras['abbreviated'][0]
+ u'BC'
+ """
+ return self._data['eras']
+
+ @property
+ def time_zones(self):
+ """Locale display names for time zones.
+
+ .. note:: The format of the value returned may change between
+ Babel versions.
+
+ >>> Locale('en', 'US').time_zones['Europe/London']['long']['daylight']
+ u'British Summer Time'
+ >>> Locale('en', 'US').time_zones['America/St_Johns']['city']
+ u'St. John\u2019s'
+ """
+ return self._data['time_zones']
+
+ @property
+ def meta_zones(self):
+ """Locale display names for meta time zones.
+
+ Meta time zones are basically groups of different Olson time zones that
+ have the same GMT offset and daylight savings time.
+
+ .. note:: The format of the value returned may change between
+ Babel versions.
+
+ >>> Locale('en', 'US').meta_zones['Europe_Central']['long']['daylight']
+ u'Central European Summer Time'
+
+ .. versionadded:: 0.9
+ """
+ return self._data['meta_zones']
+
+ @property
+ def zone_formats(self):
+ """Patterns related to the formatting of time zones.
+
+ .. note:: The format of the value returned may change between
+ Babel versions.
+
+ >>> Locale('en', 'US').zone_formats['fallback']
+ u'%(1)s (%(0)s)'
+ >>> Locale('pt', 'BR').zone_formats['region']
+ u'Hor\\xe1rio %s'
+
+ .. versionadded:: 0.9
+ """
+ return self._data['zone_formats']
+
+ @property
+ def first_week_day(self):
+ """The first day of a week, with 0 being Monday.
+
+ >>> Locale('de', 'DE').first_week_day
+ 0
+ >>> Locale('en', 'US').first_week_day
+ 6
+ """
+ return self._data['week_data']['first_day']
+
+ @property
+ def weekend_start(self):
+ """The day the weekend starts, with 0 being Monday.
+
+ >>> Locale('de', 'DE').weekend_start
+ 5
+ """
+ return self._data['week_data']['weekend_start']
+
+ @property
+ def weekend_end(self):
+ """The day the weekend ends, with 0 being Monday.
+
+ >>> Locale('de', 'DE').weekend_end
+ 6
+ """
+ return self._data['week_data']['weekend_end']
+
+ @property
+ def min_week_days(self):
+ """The minimum number of days in a week so that the week is counted as
+ the first week of a year or month.
+
+ >>> Locale('de', 'DE').min_week_days
+ 4
+ """
+ return self._data['week_data']['min_days']
+
+ @property
+ def date_formats(self):
+ """Locale patterns for date formatting.
+
+ .. note:: The format of the value returned may change between
+ Babel versions.
+
+ >>> Locale('en', 'US').date_formats['short']
+
+ >>> Locale('fr', 'FR').date_formats['long']
+
+ """
+ return self._data['date_formats']
+
+ @property
+ def time_formats(self):
+ """Locale patterns for time formatting.
+
+ .. note:: The format of the value returned may change between
+ Babel versions.
+
+ >>> Locale('en', 'US').time_formats['short']
+
+ >>> Locale('fr', 'FR').time_formats['long']
+
+ """
+ return self._data['time_formats']
+
+ @property
+ def datetime_formats(self):
+ """Locale patterns for datetime formatting.
+
+ .. note:: The format of the value returned may change between
+ Babel versions.
+
+ >>> Locale('en').datetime_formats['full']
+ u"{1} 'at' {0}"
+ >>> Locale('th').datetime_formats['medium']
+ u'{1} {0}'
+ """
+ return self._data['datetime_formats']
+
+ @property
+ def datetime_skeletons(self):
+ """Locale patterns for formatting parts of a datetime.
+
+ >>> Locale('en').datetime_skeletons['MEd']
+
+ >>> Locale('fr').datetime_skeletons['MEd']
+
+ >>> Locale('fr').datetime_skeletons['H']
+
+ """
+ return self._data['datetime_skeletons']
+
+ @property
+ def interval_formats(self):
+ """Locale patterns for interval formatting.
+
+ .. note:: The format of the value returned may change between
+ Babel versions.
+
+ How to format date intervals in Finnish when the day is the
+ smallest changing component:
+
+ >>> Locale('fi_FI').interval_formats['MEd']['d']
+ [u'E d. \u2013 ', u'E d.M.']
+
+ .. seealso::
+
+ The primary API to use this data is :py:func:`babel.dates.format_interval`.
+
+
+ :rtype: dict[str, dict[str, list[str]]]
+ """
+ return self._data['interval_formats']
+
+ @property
+ def plural_form(self):
+ """Plural rules for the locale.
+
+ >>> Locale('en').plural_form(1)
+ 'one'
+ >>> Locale('en').plural_form(0)
+ 'other'
+ >>> Locale('fr').plural_form(0)
+ 'one'
+ >>> Locale('ru').plural_form(100)
+ 'many'
+ """
+ return self._data.get('plural_form', _default_plural_rule)
+
+ @property
+ def list_patterns(self):
+ """Patterns for generating lists
+
+ .. note:: The format of the value returned may change between
+ Babel versions.
+
+ >>> Locale('en').list_patterns['start']
+ u'{0}, {1}'
+ >>> Locale('en').list_patterns['end']
+ u'{0}, and {1}'
+ >>> Locale('en_GB').list_patterns['end']
+ u'{0} and {1}'
+ """
+ return self._data['list_patterns']
+
+ @property
+ def ordinal_form(self):
+ """Plural rules for the locale.
+
+ >>> Locale('en').ordinal_form(1)
+ 'one'
+ >>> Locale('en').ordinal_form(2)
+ 'two'
+ >>> Locale('en').ordinal_form(3)
+ 'few'
+ >>> Locale('fr').ordinal_form(2)
+ 'other'
+ >>> Locale('ru').ordinal_form(100)
+ 'other'
+ """
+ return self._data.get('ordinal_form', _default_plural_rule)
+
+ @property
+ def measurement_systems(self):
+ """Localized names for various measurement systems.
+
+ >>> Locale('fr', 'FR').measurement_systems['US']
+ u'am\\xe9ricain'
+ >>> Locale('en', 'US').measurement_systems['US']
+ u'US'
+
+ """
+ return self._data['measurement_systems']
+
+ @property
+ def character_order(self):
+ """The text direction for the language.
+
+ >>> Locale('de', 'DE').character_order
+ 'left-to-right'
+ >>> Locale('ar', 'SA').character_order
+ 'right-to-left'
+ """
+ return self._data['character_order']
+
+ @property
+ def text_direction(self):
+ """The text direction for the language in CSS short-hand form.
+
+ >>> Locale('de', 'DE').text_direction
+ 'ltr'
+ >>> Locale('ar', 'SA').text_direction
+ 'rtl'
+ """
+ return ''.join(word[0] for word in self.character_order.split('-'))
+
+ @property
+ def unit_display_names(self):
+ """Display names for units of measurement.
+
+ .. seealso::
+
+ You may want to use :py:func:`babel.units.get_unit_name` instead.
+
+ .. note:: The format of the value returned may change between
+ Babel versions.
+
+ """
+ return self._data['unit_display_names']
+
+
+def default_locale(category=None, aliases=LOCALE_ALIASES):
+ """Returns the system default locale for a given category, based on
+ environment variables.
+
+ >>> for name in ['LANGUAGE', 'LC_ALL', 'LC_CTYPE']:
+ ... os.environ[name] = ''
+ >>> os.environ['LANG'] = 'fr_FR.UTF-8'
+ >>> default_locale('LC_MESSAGES')
+ 'fr_FR'
+
+ The "C" or "POSIX" pseudo-locales are treated as aliases for the
+ "en_US_POSIX" locale:
+
+ >>> os.environ['LC_MESSAGES'] = 'POSIX'
+ >>> default_locale('LC_MESSAGES')
+ 'en_US_POSIX'
+
+ The following fallbacks to the variable are always considered:
+
+ - ``LANGUAGE``
+ - ``LC_ALL``
+ - ``LC_CTYPE``
+ - ``LANG``
+
+ :param category: one of the ``LC_XXX`` environment variable names
+ :param aliases: a dictionary of aliases for locale identifiers
+ """
+ varnames = (category, 'LANGUAGE', 'LC_ALL', 'LC_CTYPE', 'LANG')
+ for name in filter(None, varnames):
+ locale = os.getenv(name)
+ if locale:
+ if name == 'LANGUAGE' and ':' in locale:
+ # the LANGUAGE variable may contain a colon-separated list of
+ # language codes; we just pick the language on the list
+ locale = locale.split(':')[0]
+ if locale.split('.')[0] in ('C', 'POSIX'):
+ locale = 'en_US_POSIX'
+ elif aliases and locale in aliases:
+ locale = aliases[locale]
+ try:
+ return get_locale_identifier(parse_locale(locale))
+ except ValueError:
+ pass
+
+
+def negotiate_locale(preferred, available, sep='_', aliases=LOCALE_ALIASES):
+ """Find the best match between available and requested locale strings.
+
+ >>> negotiate_locale(['de_DE', 'en_US'], ['de_DE', 'de_AT'])
+ 'de_DE'
+ >>> negotiate_locale(['de_DE', 'en_US'], ['en', 'de'])
+ 'de'
+
+ Case is ignored by the algorithm, the result uses the case of the preferred
+ locale identifier:
+
+ >>> negotiate_locale(['de_DE', 'en_US'], ['de_de', 'de_at'])
+ 'de_DE'
+
+ >>> negotiate_locale(['de_DE', 'en_US'], ['de_de', 'de_at'])
+ 'de_DE'
+
+ By default, some web browsers unfortunately do not include the territory
+ in the locale identifier for many locales, and some don't even allow the
+ user to easily add the territory. So while you may prefer using qualified
+ locale identifiers in your web-application, they would not normally match
+ the language-only locale sent by such browsers. To workaround that, this
+ function uses a default mapping of commonly used langauge-only locale
+ identifiers to identifiers including the territory:
+
+ >>> negotiate_locale(['ja', 'en_US'], ['ja_JP', 'en_US'])
+ 'ja_JP'
+
+ Some browsers even use an incorrect or outdated language code, such as "no"
+ for Norwegian, where the correct locale identifier would actually be "nb_NO"
+ (Bokmål) or "nn_NO" (Nynorsk). The aliases are intended to take care of
+ such cases, too:
+
+ >>> negotiate_locale(['no', 'sv'], ['nb_NO', 'sv_SE'])
+ 'nb_NO'
+
+ You can override this default mapping by passing a different `aliases`
+ dictionary to this function, or you can bypass the behavior althogher by
+ setting the `aliases` parameter to `None`.
+
+ :param preferred: the list of locale strings preferred by the user
+ :param available: the list of locale strings available
+ :param sep: character that separates the different parts of the locale
+ strings
+ :param aliases: a dictionary of aliases for locale identifiers
+ """
+ available = [a.lower() for a in available if a]
+ for locale in preferred:
+ ll = locale.lower()
+ if ll in available:
+ return locale
+ if aliases:
+ alias = aliases.get(ll)
+ if alias:
+ alias = alias.replace('_', sep)
+ if alias.lower() in available:
+ return alias
+ parts = locale.split(sep)
+ if len(parts) > 1 and parts[0].lower() in available:
+ return parts[0]
+ return None
+
+
+def parse_locale(identifier, sep='_'):
+ """Parse a locale identifier into a tuple of the form ``(language,
+ territory, script, variant)``.
+
+ >>> parse_locale('zh_CN')
+ ('zh', 'CN', None, None)
+ >>> parse_locale('zh_Hans_CN')
+ ('zh', 'CN', 'Hans', None)
+
+ The default component separator is "_", but a different separator can be
+ specified using the `sep` parameter:
+
+ >>> parse_locale('zh-CN', sep='-')
+ ('zh', 'CN', None, None)
+
+ If the identifier cannot be parsed into a locale, a `ValueError` exception
+ is raised:
+
+ >>> parse_locale('not_a_LOCALE_String')
+ Traceback (most recent call last):
+ ...
+ ValueError: 'not_a_LOCALE_String' is not a valid locale identifier
+
+ Encoding information and locale modifiers are removed from the identifier:
+
+ >>> parse_locale('it_IT@euro')
+ ('it', 'IT', None, None)
+ >>> parse_locale('en_US.UTF-8')
+ ('en', 'US', None, None)
+ >>> parse_locale('de_DE.iso885915@euro')
+ ('de', 'DE', None, None)
+
+ See :rfc:`4646` for more information.
+
+ :param identifier: the locale identifier string
+ :param sep: character that separates the different components of the locale
+ identifier
+ :raise `ValueError`: if the string does not appear to be a valid locale
+ identifier
+ """
+ if '.' in identifier:
+ # this is probably the charset/encoding, which we don't care about
+ identifier = identifier.split('.', 1)[0]
+ if '@' in identifier:
+ # this is a locale modifier such as @euro, which we don't care about
+ # either
+ identifier = identifier.split('@', 1)[0]
+
+ parts = identifier.split(sep)
+ lang = parts.pop(0).lower()
+ if not lang.isalpha():
+ raise ValueError('expected only letters, got %r' % lang)
+
+ script = territory = variant = None
+ if parts:
+ if len(parts[0]) == 4 and parts[0].isalpha():
+ script = parts.pop(0).title()
+
+ if parts:
+ if len(parts[0]) == 2 and parts[0].isalpha():
+ territory = parts.pop(0).upper()
+ elif len(parts[0]) == 3 and parts[0].isdigit():
+ territory = parts.pop(0)
+
+ if parts:
+ if len(parts[0]) == 4 and parts[0][0].isdigit() or \
+ len(parts[0]) >= 5 and parts[0][0].isalpha():
+ variant = parts.pop()
+
+ if parts:
+ raise ValueError('%r is not a valid locale identifier' % identifier)
+
+ return lang, territory, script, variant
+
+
+def get_locale_identifier(tup, sep='_'):
+ """The reverse of :func:`parse_locale`. It creates a locale identifier out
+ of a ``(language, territory, script, variant)`` tuple. Items can be set to
+ ``None`` and trailing ``None``\s can also be left out of the tuple.
+
+ >>> get_locale_identifier(('de', 'DE', None, '1999'))
+ 'de_DE_1999'
+
+ .. versionadded:: 1.0
+
+ :param tup: the tuple as returned by :func:`parse_locale`.
+ :param sep: the separator for the identifier.
+ """
+ tup = tuple(tup[:4])
+ lang, territory, script, variant = tup + (None,) * (4 - len(tup))
+ return sep.join(filter(None, (lang, script, territory, variant)))
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/core.pyc b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/core.pyc
new file mode 100644
index 0000000..356c27e
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/core.pyc differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/dates.py b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/dates.py
new file mode 100644
index 0000000..4a0bbd3
--- /dev/null
+++ b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/dates.py
@@ -0,0 +1,1754 @@
+# -*- coding: utf-8 -*-
+"""
+ babel.dates
+ ~~~~~~~~~~~
+
+ Locale dependent formatting and parsing of dates and times.
+
+ The default locale for the functions in this module is determined by the
+ following environment variables, in that order:
+
+ * ``LC_TIME``,
+ * ``LC_ALL``, and
+ * ``LANG``
+
+ :copyright: (c) 2013 by the Babel Team.
+ :license: BSD, see LICENSE for more details.
+"""
+
+from __future__ import division
+
+import re
+import warnings
+import pytz as _pytz
+
+from datetime import date, datetime, time, timedelta
+from bisect import bisect_right
+
+from babel.core import default_locale, get_global, Locale
+from babel.util import UTC, LOCALTZ
+from babel._compat import string_types, integer_types, number_types
+
+
+LC_TIME = default_locale('LC_TIME')
+
+# Aliases for use in scopes where the modules are shadowed by local variables
+date_ = date
+datetime_ = datetime
+time_ = time
+
+
+def _get_dt_and_tzinfo(dt_or_tzinfo):
+ """
+ Parse a `dt_or_tzinfo` value into a datetime and a tzinfo.
+
+ See the docs for this function's callers for semantics.
+
+ :rtype: tuple[datetime, tzinfo]
+ """
+ if dt_or_tzinfo is None:
+ dt = datetime.now()
+ tzinfo = LOCALTZ
+ elif isinstance(dt_or_tzinfo, string_types):
+ dt = None
+ tzinfo = get_timezone(dt_or_tzinfo)
+ elif isinstance(dt_or_tzinfo, integer_types):
+ dt = None
+ tzinfo = UTC
+ elif isinstance(dt_or_tzinfo, (datetime, time)):
+ dt = _get_datetime(dt_or_tzinfo)
+ if dt.tzinfo is not None:
+ tzinfo = dt.tzinfo
+ else:
+ tzinfo = UTC
+ else:
+ dt = None
+ tzinfo = dt_or_tzinfo
+ return dt, tzinfo
+
+
+def _get_datetime(instant):
+ """
+ Get a datetime out of an "instant" (date, time, datetime, number).
+
+ .. warning:: The return values of this function may depend on the system clock.
+
+ If the instant is None, the current moment is used.
+ If the instant is a time, it's augmented with today's date.
+
+ Dates are converted to naive datetimes with midnight as the time component.
+
+ >>> _get_datetime(date(2015, 1, 1))
+ datetime.datetime(2015, 1, 1, 0, 0)
+
+ UNIX timestamps are converted to datetimes.
+
+ >>> _get_datetime(1400000000)
+ datetime.datetime(2014, 5, 13, 16, 53, 20)
+
+ Other values are passed through as-is.
+
+ >>> x = datetime(2015, 1, 1)
+ >>> _get_datetime(x) is x
+ True
+
+ :param instant: date, time, datetime, integer, float or None
+ :type instant: date|time|datetime|int|float|None
+ :return: a datetime
+ :rtype: datetime
+ """
+ if instant is None:
+ return datetime_.utcnow()
+ elif isinstance(instant, integer_types) or isinstance(instant, float):
+ return datetime_.utcfromtimestamp(instant)
+ elif isinstance(instant, time):
+ return datetime_.combine(date.today(), instant)
+ elif isinstance(instant, date) and not isinstance(instant, datetime):
+ return datetime_.combine(instant, time())
+ # TODO (3.x): Add an assertion/type check for this fallthrough branch:
+ return instant
+
+
+def _ensure_datetime_tzinfo(datetime, tzinfo=None):
+ """
+ Ensure the datetime passed has an attached tzinfo.
+
+ If the datetime is tz-naive to begin with, UTC is attached.
+
+ If a tzinfo is passed in, the datetime is normalized to that timezone.
+
+ >>> _ensure_datetime_tzinfo(datetime(2015, 1, 1)).tzinfo.zone
+ 'UTC'
+
+ >>> tz = get_timezone("Europe/Stockholm")
+ >>> _ensure_datetime_tzinfo(datetime(2015, 1, 1, 13, 15, tzinfo=UTC), tzinfo=tz).hour
+ 14
+
+ :param datetime: Datetime to augment.
+ :param tzinfo: Optional tznfo.
+ :return: datetime with tzinfo
+ :rtype: datetime
+ """
+ if datetime.tzinfo is None:
+ datetime = datetime.replace(tzinfo=UTC)
+ if tzinfo is not None:
+ datetime = datetime.astimezone(get_timezone(tzinfo))
+ if hasattr(tzinfo, 'normalize'): # pytz
+ datetime = tzinfo.normalize(datetime)
+ return datetime
+
+
+def _get_time(time, tzinfo=None):
+ """
+ Get a timezoned time from a given instant.
+
+ .. warning:: The return values of this function may depend on the system clock.
+
+ :param time: time, datetime or None
+ :rtype: time
+ """
+ if time is None:
+ time = datetime.utcnow()
+ elif isinstance(time, number_types):
+ time = datetime.utcfromtimestamp(time)
+ if time.tzinfo is None:
+ time = time.replace(tzinfo=UTC)
+ if isinstance(time, datetime):
+ if tzinfo is not None:
+ time = time.astimezone(tzinfo)
+ if hasattr(tzinfo, 'normalize'): # pytz
+ time = tzinfo.normalize(time)
+ time = time.timetz()
+ elif tzinfo is not None:
+ time = time.replace(tzinfo=tzinfo)
+ return time
+
+
+def get_timezone(zone=None):
+ """Looks up a timezone by name and returns it. The timezone object
+ returned comes from ``pytz`` and corresponds to the `tzinfo` interface and
+ can be used with all of the functions of Babel that operate with dates.
+
+ If a timezone is not known a :exc:`LookupError` is raised. If `zone`
+ is ``None`` a local zone object is returned.
+
+ :param zone: the name of the timezone to look up. If a timezone object
+ itself is passed in, mit's returned unchanged.
+ """
+ if zone is None:
+ return LOCALTZ
+ if not isinstance(zone, string_types):
+ return zone
+ try:
+ return _pytz.timezone(zone)
+ except _pytz.UnknownTimeZoneError:
+ raise LookupError('Unknown timezone %s' % zone)
+
+
+def get_next_timezone_transition(zone=None, dt=None):
+ """Given a timezone it will return a :class:`TimezoneTransition` object
+ that holds the information about the next timezone transition that's going
+ to happen. For instance this can be used to detect when the next DST
+ change is going to happen and how it looks like.
+
+ The transition is calculated relative to the given datetime object. The
+ next transition that follows the date is used. If a transition cannot
+ be found the return value will be `None`.
+
+ Transition information can only be provided for timezones returned by
+ the :func:`get_timezone` function.
+
+ :param zone: the timezone for which the transition should be looked up.
+ If not provided the local timezone is used.
+ :param dt: the date after which the next transition should be found.
+ If not given the current time is assumed.
+ """
+ zone = get_timezone(zone)
+ dt = _get_datetime(dt).replace(tzinfo=None)
+
+ if not hasattr(zone, '_utc_transition_times'):
+ raise TypeError('Given timezone does not have UTC transition '
+ 'times. This can happen because the operating '
+ 'system fallback local timezone is used or a '
+ 'custom timezone object')
+
+ try:
+ idx = max(0, bisect_right(zone._utc_transition_times, dt))
+ old_trans = zone._transition_info[idx - 1]
+ new_trans = zone._transition_info[idx]
+ old_tz = zone._tzinfos[old_trans]
+ new_tz = zone._tzinfos[new_trans]
+ except (LookupError, ValueError):
+ return None
+
+ return TimezoneTransition(
+ activates=zone._utc_transition_times[idx],
+ from_tzinfo=old_tz,
+ to_tzinfo=new_tz,
+ reference_date=dt
+ )
+
+
+class TimezoneTransition(object):
+ """A helper object that represents the return value from
+ :func:`get_next_timezone_transition`.
+ """
+
+ def __init__(self, activates, from_tzinfo, to_tzinfo, reference_date=None):
+ #: the time of the activation of the timezone transition in UTC.
+ self.activates = activates
+ #: the timezone from where the transition starts.
+ self.from_tzinfo = from_tzinfo
+ #: the timezone for after the transition.
+ self.to_tzinfo = to_tzinfo
+ #: the reference date that was provided. This is the `dt` parameter
+ #: to the :func:`get_next_timezone_transition`.
+ self.reference_date = reference_date
+
+ @property
+ def from_tz(self):
+ """The name of the timezone before the transition."""
+ return self.from_tzinfo._tzname
+
+ @property
+ def to_tz(self):
+ """The name of the timezone after the transition."""
+ return self.to_tzinfo._tzname
+
+ @property
+ def from_offset(self):
+ """The UTC offset in seconds before the transition."""
+ return int(self.from_tzinfo._utcoffset.total_seconds())
+
+ @property
+ def to_offset(self):
+ """The UTC offset in seconds after the transition."""
+ return int(self.to_tzinfo._utcoffset.total_seconds())
+
+ def __repr__(self):
+ return ' %s (%s)>' % (
+ self.from_tz,
+ self.to_tz,
+ self.activates,
+ )
+
+
+def get_period_names(width='wide', context='stand-alone', locale=LC_TIME):
+ """Return the names for day periods (AM/PM) used by the locale.
+
+ >>> get_period_names(locale='en_US')['am']
+ u'AM'
+
+ :param width: the width to use, one of "abbreviated", "narrow", or "wide"
+ :param context: the context, either "format" or "stand-alone"
+ :param locale: the `Locale` object, or a locale string
+ """
+ return Locale.parse(locale).day_periods[context][width]
+
+
+def get_day_names(width='wide', context='format', locale=LC_TIME):
+ """Return the day names used by the locale for the specified format.
+
+ >>> get_day_names('wide', locale='en_US')[1]
+ u'Tuesday'
+ >>> get_day_names('short', locale='en_US')[1]
+ u'Tu'
+ >>> get_day_names('abbreviated', locale='es')[1]
+ u'mar.'
+ >>> get_day_names('narrow', context='stand-alone', locale='de_DE')[1]
+ u'D'
+
+ :param width: the width to use, one of "wide", "abbreviated", "short" or "narrow"
+ :param context: the context, either "format" or "stand-alone"
+ :param locale: the `Locale` object, or a locale string
+ """
+ return Locale.parse(locale).days[context][width]
+
+
+def get_month_names(width='wide', context='format', locale=LC_TIME):
+ """Return the month names used by the locale for the specified format.
+
+ >>> get_month_names('wide', locale='en_US')[1]
+ u'January'
+ >>> get_month_names('abbreviated', locale='es')[1]
+ u'ene.'
+ >>> get_month_names('narrow', context='stand-alone', locale='de_DE')[1]
+ u'J'
+
+ :param width: the width to use, one of "wide", "abbreviated", or "narrow"
+ :param context: the context, either "format" or "stand-alone"
+ :param locale: the `Locale` object, or a locale string
+ """
+ return Locale.parse(locale).months[context][width]
+
+
+def get_quarter_names(width='wide', context='format', locale=LC_TIME):
+ """Return the quarter names used by the locale for the specified format.
+
+ >>> get_quarter_names('wide', locale='en_US')[1]
+ u'1st quarter'
+ >>> get_quarter_names('abbreviated', locale='de_DE')[1]
+ u'Q1'
+ >>> get_quarter_names('narrow', locale='de_DE')[1]
+ u'1'
+
+ :param width: the width to use, one of "wide", "abbreviated", or "narrow"
+ :param context: the context, either "format" or "stand-alone"
+ :param locale: the `Locale` object, or a locale string
+ """
+ return Locale.parse(locale).quarters[context][width]
+
+
+def get_era_names(width='wide', locale=LC_TIME):
+ """Return the era names used by the locale for the specified format.
+
+ >>> get_era_names('wide', locale='en_US')[1]
+ u'Anno Domini'
+ >>> get_era_names('abbreviated', locale='de_DE')[1]
+ u'n. Chr.'
+
+ :param width: the width to use, either "wide", "abbreviated", or "narrow"
+ :param locale: the `Locale` object, or a locale string
+ """
+ return Locale.parse(locale).eras[width]
+
+
+def get_date_format(format='medium', locale=LC_TIME):
+ """Return the date formatting patterns used by the locale for the specified
+ format.
+
+ >>> get_date_format(locale='en_US')
+
+ >>> get_date_format('full', locale='de_DE')
+
+
+ :param format: the format to use, one of "full", "long", "medium", or
+ "short"
+ :param locale: the `Locale` object, or a locale string
+ """
+ return Locale.parse(locale).date_formats[format]
+
+
+def get_datetime_format(format='medium', locale=LC_TIME):
+ """Return the datetime formatting patterns used by the locale for the
+ specified format.
+
+ >>> get_datetime_format(locale='en_US')
+ u'{1}, {0}'
+
+ :param format: the format to use, one of "full", "long", "medium", or
+ "short"
+ :param locale: the `Locale` object, or a locale string
+ """
+ patterns = Locale.parse(locale).datetime_formats
+ if format not in patterns:
+ format = None
+ return patterns[format]
+
+
+def get_time_format(format='medium', locale=LC_TIME):
+ """Return the time formatting patterns used by the locale for the specified
+ format.
+
+ >>> get_time_format(locale='en_US')
+
+ >>> get_time_format('full', locale='de_DE')
+
+
+ :param format: the format to use, one of "full", "long", "medium", or
+ "short"
+ :param locale: the `Locale` object, or a locale string
+ """
+ return Locale.parse(locale).time_formats[format]
+
+
+def get_timezone_gmt(datetime=None, width='long', locale=LC_TIME, return_z=False):
+ """Return the timezone associated with the given `datetime` object formatted
+ as string indicating the offset from GMT.
+
+ >>> dt = datetime(2007, 4, 1, 15, 30)
+ >>> get_timezone_gmt(dt, locale='en')
+ u'GMT+00:00'
+ >>> get_timezone_gmt(dt, locale='en', return_z=True)
+ 'Z'
+ >>> get_timezone_gmt(dt, locale='en', width='iso8601_short')
+ u'+00'
+ >>> tz = get_timezone('America/Los_Angeles')
+ >>> dt = tz.localize(datetime(2007, 4, 1, 15, 30))
+ >>> get_timezone_gmt(dt, locale='en')
+ u'GMT-07:00'
+ >>> get_timezone_gmt(dt, 'short', locale='en')
+ u'-0700'
+ >>> get_timezone_gmt(dt, locale='en', width='iso8601_short')
+ u'-07'
+
+ The long format depends on the locale, for example in France the acronym
+ UTC string is used instead of GMT:
+
+ >>> get_timezone_gmt(dt, 'long', locale='fr_FR')
+ u'UTC-07:00'
+
+ .. versionadded:: 0.9
+
+ :param datetime: the ``datetime`` object; if `None`, the current date and
+ time in UTC is used
+ :param width: either "long" or "short" or "iso8601" or "iso8601_short"
+ :param locale: the `Locale` object, or a locale string
+ :param return_z: True or False; Function returns indicator "Z"
+ when local time offset is 0
+ """
+ datetime = _ensure_datetime_tzinfo(_get_datetime(datetime))
+ locale = Locale.parse(locale)
+
+ offset = datetime.tzinfo.utcoffset(datetime)
+ seconds = offset.days * 24 * 60 * 60 + offset.seconds
+ hours, seconds = divmod(seconds, 3600)
+ if return_z and hours == 0 and seconds == 0:
+ return 'Z'
+ elif seconds == 0 and width == 'iso8601_short':
+ return u'%+03d' % hours
+ elif width == 'short' or width == 'iso8601_short':
+ pattern = u'%+03d%02d'
+ elif width == 'iso8601':
+ pattern = u'%+03d:%02d'
+ else:
+ pattern = locale.zone_formats['gmt'] % '%+03d:%02d'
+ return pattern % (hours, seconds // 60)
+
+
+def get_timezone_location(dt_or_tzinfo=None, locale=LC_TIME, return_city=False):
+ u"""Return a representation of the given timezone using "location format".
+
+ The result depends on both the local display name of the country and the
+ city associated with the time zone:
+
+ >>> tz = get_timezone('America/St_Johns')
+ >>> print(get_timezone_location(tz, locale='de_DE'))
+ Kanada (St. John’s) Zeit
+ >>> print(get_timezone_location(tz, locale='en'))
+ Canada (St. John’s) Time
+ >>> print(get_timezone_location(tz, locale='en', return_city=True))
+ St. John’s
+ >>> tz = get_timezone('America/Mexico_City')
+ >>> get_timezone_location(tz, locale='de_DE')
+ u'Mexiko (Mexiko-Stadt) Zeit'
+
+ If the timezone is associated with a country that uses only a single
+ timezone, just the localized country name is returned:
+
+ >>> tz = get_timezone('Europe/Berlin')
+ >>> get_timezone_name(tz, locale='de_DE')
+ u'Mitteleurop\\xe4ische Zeit'
+
+ .. versionadded:: 0.9
+
+ :param dt_or_tzinfo: the ``datetime`` or ``tzinfo`` object that determines
+ the timezone; if `None`, the current date and time in
+ UTC is assumed
+ :param locale: the `Locale` object, or a locale string
+ :param return_city: True or False, if True then return exemplar city (location)
+ for the time zone
+ :return: the localized timezone name using location format
+
+ """
+ dt, tzinfo = _get_dt_and_tzinfo(dt_or_tzinfo)
+ locale = Locale.parse(locale)
+
+ if hasattr(tzinfo, 'zone'):
+ zone = tzinfo.zone
+ else:
+ zone = tzinfo.tzname(dt or datetime.utcnow())
+
+ # Get the canonical time-zone code
+ zone = get_global('zone_aliases').get(zone, zone)
+
+ info = locale.time_zones.get(zone, {})
+
+ # Otherwise, if there is only one timezone for the country, return the
+ # localized country name
+ region_format = locale.zone_formats['region']
+ territory = get_global('zone_territories').get(zone)
+ if territory not in locale.territories:
+ territory = 'ZZ' # invalid/unknown
+ territory_name = locale.territories[territory]
+ if not return_city and territory and len(get_global('territory_zones').get(territory, [])) == 1:
+ return region_format % (territory_name)
+
+ # Otherwise, include the city in the output
+ fallback_format = locale.zone_formats['fallback']
+ if 'city' in info:
+ city_name = info['city']
+ else:
+ metazone = get_global('meta_zones').get(zone)
+ metazone_info = locale.meta_zones.get(metazone, {})
+ if 'city' in metazone_info:
+ city_name = metazone_info['city']
+ elif '/' in zone:
+ city_name = zone.split('/', 1)[1].replace('_', ' ')
+ else:
+ city_name = zone.replace('_', ' ')
+
+ if return_city:
+ return city_name
+ return region_format % (fallback_format % {
+ '0': city_name,
+ '1': territory_name
+ })
+
+
+def get_timezone_name(dt_or_tzinfo=None, width='long', uncommon=False,
+ locale=LC_TIME, zone_variant=None, return_zone=False):
+ r"""Return the localized display name for the given timezone. The timezone
+ may be specified using a ``datetime`` or `tzinfo` object.
+
+ >>> dt = time(15, 30, tzinfo=get_timezone('America/Los_Angeles'))
+ >>> get_timezone_name(dt, locale='en_US')
+ u'Pacific Standard Time'
+ >>> get_timezone_name(dt, locale='en_US', return_zone=True)
+ 'America/Los_Angeles'
+ >>> get_timezone_name(dt, width='short', locale='en_US')
+ u'PST'
+
+ If this function gets passed only a `tzinfo` object and no concrete
+ `datetime`, the returned display name is indenpendent of daylight savings
+ time. This can be used for example for selecting timezones, or to set the
+ time of events that recur across DST changes:
+
+ >>> tz = get_timezone('America/Los_Angeles')
+ >>> get_timezone_name(tz, locale='en_US')
+ u'Pacific Time'
+ >>> get_timezone_name(tz, 'short', locale='en_US')
+ u'PT'
+
+ If no localized display name for the timezone is available, and the timezone
+ is associated with a country that uses only a single timezone, the name of
+ that country is returned, formatted according to the locale:
+
+ >>> tz = get_timezone('Europe/Berlin')
+ >>> get_timezone_name(tz, locale='de_DE')
+ u'Mitteleurop\xe4ische Zeit'
+ >>> get_timezone_name(tz, locale='pt_BR')
+ u'Hor\xe1rio da Europa Central'
+
+ On the other hand, if the country uses multiple timezones, the city is also
+ included in the representation:
+
+ >>> tz = get_timezone('America/St_Johns')
+ >>> get_timezone_name(tz, locale='de_DE')
+ u'Neufundland-Zeit'
+
+ Note that short format is currently not supported for all timezones and
+ all locales. This is partially because not every timezone has a short
+ code in every locale. In that case it currently falls back to the long
+ format.
+
+ For more information see `LDML Appendix J: Time Zone Display Names
+ `_
+
+ .. versionadded:: 0.9
+
+ .. versionchanged:: 1.0
+ Added `zone_variant` support.
+
+ :param dt_or_tzinfo: the ``datetime`` or ``tzinfo`` object that determines
+ the timezone; if a ``tzinfo`` object is used, the
+ resulting display name will be generic, i.e.
+ independent of daylight savings time; if `None`, the
+ current date in UTC is assumed
+ :param width: either "long" or "short"
+ :param uncommon: deprecated and ignored
+ :param zone_variant: defines the zone variation to return. By default the
+ variation is defined from the datetime object
+ passed in. If no datetime object is passed in, the
+ ``'generic'`` variation is assumed. The following
+ values are valid: ``'generic'``, ``'daylight'`` and
+ ``'standard'``.
+ :param locale: the `Locale` object, or a locale string
+ :param return_zone: True or False. If true then function
+ returns long time zone ID
+ """
+ dt, tzinfo = _get_dt_and_tzinfo(dt_or_tzinfo)
+ locale = Locale.parse(locale)
+
+ if hasattr(tzinfo, 'zone'):
+ zone = tzinfo.zone
+ else:
+ zone = tzinfo.tzname(dt)
+
+ if zone_variant is None:
+ if dt is None:
+ zone_variant = 'generic'
+ else:
+ dst = tzinfo.dst(dt)
+ if dst:
+ zone_variant = 'daylight'
+ else:
+ zone_variant = 'standard'
+ else:
+ if zone_variant not in ('generic', 'standard', 'daylight'):
+ raise ValueError('Invalid zone variation')
+
+ # Get the canonical time-zone code
+ zone = get_global('zone_aliases').get(zone, zone)
+ if return_zone:
+ return zone
+ info = locale.time_zones.get(zone, {})
+ # Try explicitly translated zone names first
+ if width in info:
+ if zone_variant in info[width]:
+ return info[width][zone_variant]
+
+ metazone = get_global('meta_zones').get(zone)
+ if metazone:
+ metazone_info = locale.meta_zones.get(metazone, {})
+ if width in metazone_info:
+ if zone_variant in metazone_info[width]:
+ return metazone_info[width][zone_variant]
+
+ # If we have a concrete datetime, we assume that the result can't be
+ # independent of daylight savings time, so we return the GMT offset
+ if dt is not None:
+ return get_timezone_gmt(dt, width=width, locale=locale)
+
+ return get_timezone_location(dt_or_tzinfo, locale=locale)
+
+
+def format_date(date=None, format='medium', locale=LC_TIME):
+ """Return a date formatted according to the given pattern.
+
+ >>> d = date(2007, 4, 1)
+ >>> format_date(d, locale='en_US')
+ u'Apr 1, 2007'
+ >>> format_date(d, format='full', locale='de_DE')
+ u'Sonntag, 1. April 2007'
+
+ If you don't want to use the locale default formats, you can specify a
+ custom date pattern:
+
+ >>> format_date(d, "EEE, MMM d, ''yy", locale='en')
+ u"Sun, Apr 1, '07"
+
+ :param date: the ``date`` or ``datetime`` object; if `None`, the current
+ date is used
+ :param format: one of "full", "long", "medium", or "short", or a custom
+ date/time pattern
+ :param locale: a `Locale` object or a locale identifier
+ """
+ if date is None:
+ date = date_.today()
+ elif isinstance(date, datetime):
+ date = date.date()
+
+ locale = Locale.parse(locale)
+ if format in ('full', 'long', 'medium', 'short'):
+ format = get_date_format(format, locale=locale)
+ pattern = parse_pattern(format)
+ return pattern.apply(date, locale)
+
+
+def format_datetime(datetime=None, format='medium', tzinfo=None,
+ locale=LC_TIME):
+ r"""Return a date formatted according to the given pattern.
+
+ >>> dt = datetime(2007, 4, 1, 15, 30)
+ >>> format_datetime(dt, locale='en_US')
+ u'Apr 1, 2007, 3:30:00 PM'
+
+ For any pattern requiring the display of the time-zone, the third-party
+ ``pytz`` package is needed to explicitly specify the time-zone:
+
+ >>> format_datetime(dt, 'full', tzinfo=get_timezone('Europe/Paris'),
+ ... locale='fr_FR')
+ u'dimanche 1 avril 2007 \xe0 17:30:00 heure d\u2019\xe9t\xe9 d\u2019Europe centrale'
+ >>> format_datetime(dt, "yyyy.MM.dd G 'at' HH:mm:ss zzz",
+ ... tzinfo=get_timezone('US/Eastern'), locale='en')
+ u'2007.04.01 AD at 11:30:00 EDT'
+
+ :param datetime: the `datetime` object; if `None`, the current date and
+ time is used
+ :param format: one of "full", "long", "medium", or "short", or a custom
+ date/time pattern
+ :param tzinfo: the timezone to apply to the time for display
+ :param locale: a `Locale` object or a locale identifier
+ """
+ datetime = _ensure_datetime_tzinfo(_get_datetime(datetime), tzinfo)
+
+ locale = Locale.parse(locale)
+ if format in ('full', 'long', 'medium', 'short'):
+ return get_datetime_format(format, locale=locale) \
+ .replace("'", "") \
+ .replace('{0}', format_time(datetime, format, tzinfo=None,
+ locale=locale)) \
+ .replace('{1}', format_date(datetime, format, locale=locale))
+ else:
+ return parse_pattern(format).apply(datetime, locale)
+
+
+def format_time(time=None, format='medium', tzinfo=None, locale=LC_TIME):
+ r"""Return a time formatted according to the given pattern.
+
+ >>> t = time(15, 30)
+ >>> format_time(t, locale='en_US')
+ u'3:30:00 PM'
+ >>> format_time(t, format='short', locale='de_DE')
+ u'15:30'
+
+ If you don't want to use the locale default formats, you can specify a
+ custom time pattern:
+
+ >>> format_time(t, "hh 'o''clock' a", locale='en')
+ u"03 o'clock PM"
+
+ For any pattern requiring the display of the time-zone a
+ timezone has to be specified explicitly:
+
+ >>> t = datetime(2007, 4, 1, 15, 30)
+ >>> tzinfo = get_timezone('Europe/Paris')
+ >>> t = tzinfo.localize(t)
+ >>> format_time(t, format='full', tzinfo=tzinfo, locale='fr_FR')
+ u'15:30:00 heure d\u2019\xe9t\xe9 d\u2019Europe centrale'
+ >>> format_time(t, "hh 'o''clock' a, zzzz", tzinfo=get_timezone('US/Eastern'),
+ ... locale='en')
+ u"09 o'clock AM, Eastern Daylight Time"
+
+ As that example shows, when this function gets passed a
+ ``datetime.datetime`` value, the actual time in the formatted string is
+ adjusted to the timezone specified by the `tzinfo` parameter. If the
+ ``datetime`` is "naive" (i.e. it has no associated timezone information),
+ it is assumed to be in UTC.
+
+ These timezone calculations are **not** performed if the value is of type
+ ``datetime.time``, as without date information there's no way to determine
+ what a given time would translate to in a different timezone without
+ information about whether daylight savings time is in effect or not. This
+ means that time values are left as-is, and the value of the `tzinfo`
+ parameter is only used to display the timezone name if needed:
+
+ >>> t = time(15, 30)
+ >>> format_time(t, format='full', tzinfo=get_timezone('Europe/Paris'),
+ ... locale='fr_FR')
+ u'15:30:00 heure normale d\u2019Europe centrale'
+ >>> format_time(t, format='full', tzinfo=get_timezone('US/Eastern'),
+ ... locale='en_US')
+ u'3:30:00 PM Eastern Standard Time'
+
+ :param time: the ``time`` or ``datetime`` object; if `None`, the current
+ time in UTC is used
+ :param format: one of "full", "long", "medium", or "short", or a custom
+ date/time pattern
+ :param tzinfo: the time-zone to apply to the time for display
+ :param locale: a `Locale` object or a locale identifier
+ """
+ time = _get_time(time, tzinfo)
+
+ locale = Locale.parse(locale)
+ if format in ('full', 'long', 'medium', 'short'):
+ format = get_time_format(format, locale=locale)
+ return parse_pattern(format).apply(time, locale)
+
+
+def format_skeleton(skeleton, datetime=None, tzinfo=None, fuzzy=True, locale=LC_TIME):
+ r"""Return a time and/or date formatted according to the given pattern.
+
+ The skeletons are defined in the CLDR data and provide more flexibility
+ than the simple short/long/medium formats, but are a bit harder to use.
+ The are defined using the date/time symbols without order or punctuation
+ and map to a suitable format for the given locale.
+
+ >>> t = datetime(2007, 4, 1, 15, 30)
+ >>> format_skeleton('MMMEd', t, locale='fr')
+ u'dim. 1 avr.'
+ >>> format_skeleton('MMMEd', t, locale='en')
+ u'Sun, Apr 1'
+ >>> format_skeleton('yMMd', t, locale='fi') # yMMd is not in the Finnish locale; yMd gets used
+ u'1.4.2007'
+ >>> format_skeleton('yMMd', t, fuzzy=False, locale='fi') # yMMd is not in the Finnish locale, an error is thrown
+ Traceback (most recent call last):
+ ...
+ KeyError: yMMd
+
+ After the skeleton is resolved to a pattern `format_datetime` is called so
+ all timezone processing etc is the same as for that.
+
+ :param skeleton: A date time skeleton as defined in the cldr data.
+ :param datetime: the ``time`` or ``datetime`` object; if `None`, the current
+ time in UTC is used
+ :param tzinfo: the time-zone to apply to the time for display
+ :param fuzzy: If the skeleton is not found, allow choosing a skeleton that's
+ close enough to it.
+ :param locale: a `Locale` object or a locale identifier
+ """
+ locale = Locale.parse(locale)
+ if fuzzy and skeleton not in locale.datetime_skeletons:
+ skeleton = match_skeleton(skeleton, locale.datetime_skeletons)
+ format = locale.datetime_skeletons[skeleton]
+ return format_datetime(datetime, format, tzinfo, locale)
+
+
+TIMEDELTA_UNITS = (
+ ('year', 3600 * 24 * 365),
+ ('month', 3600 * 24 * 30),
+ ('week', 3600 * 24 * 7),
+ ('day', 3600 * 24),
+ ('hour', 3600),
+ ('minute', 60),
+ ('second', 1)
+)
+
+
+def format_timedelta(delta, granularity='second', threshold=.85,
+ add_direction=False, format='long',
+ locale=LC_TIME):
+ """Return a time delta according to the rules of the given locale.
+
+ >>> format_timedelta(timedelta(weeks=12), locale='en_US')
+ u'3 months'
+ >>> format_timedelta(timedelta(seconds=1), locale='es')
+ u'1 segundo'
+
+ The granularity parameter can be provided to alter the lowest unit
+ presented, which defaults to a second.
+
+ >>> format_timedelta(timedelta(hours=3), granularity='day',
+ ... locale='en_US')
+ u'1 day'
+
+ The threshold parameter can be used to determine at which value the
+ presentation switches to the next higher unit. A higher threshold factor
+ means the presentation will switch later. For example:
+
+ >>> format_timedelta(timedelta(hours=23), threshold=0.9, locale='en_US')
+ u'1 day'
+ >>> format_timedelta(timedelta(hours=23), threshold=1.1, locale='en_US')
+ u'23 hours'
+
+ In addition directional information can be provided that informs
+ the user if the date is in the past or in the future:
+
+ >>> format_timedelta(timedelta(hours=1), add_direction=True, locale='en')
+ u'in 1 hour'
+ >>> format_timedelta(timedelta(hours=-1), add_direction=True, locale='en')
+ u'1 hour ago'
+
+ The format parameter controls how compact or wide the presentation is:
+
+ >>> format_timedelta(timedelta(hours=3), format='short', locale='en')
+ u'3 hr'
+ >>> format_timedelta(timedelta(hours=3), format='narrow', locale='en')
+ u'3h'
+
+ :param delta: a ``timedelta`` object representing the time difference to
+ format, or the delta in seconds as an `int` value
+ :param granularity: determines the smallest unit that should be displayed,
+ the value can be one of "year", "month", "week", "day",
+ "hour", "minute" or "second"
+ :param threshold: factor that determines at which point the presentation
+ switches to the next higher unit
+ :param add_direction: if this flag is set to `True` the return value will
+ include directional information. For instance a
+ positive timedelta will include the information about
+ it being in the future, a negative will be information
+ about the value being in the past.
+ :param format: the format, can be "narrow", "short" or "long". (
+ "medium" is deprecated, currently converted to "long" to
+ maintain compatibility)
+ :param locale: a `Locale` object or a locale identifier
+ """
+ if format not in ('narrow', 'short', 'medium', 'long'):
+ raise TypeError('Format must be one of "narrow", "short" or "long"')
+ if format == 'medium':
+ warnings.warn('"medium" value for format param of format_timedelta'
+ ' is deprecated. Use "long" instead',
+ category=DeprecationWarning)
+ format = 'long'
+ if isinstance(delta, timedelta):
+ seconds = int((delta.days * 86400) + delta.seconds)
+ else:
+ seconds = delta
+ locale = Locale.parse(locale)
+
+ def _iter_patterns(a_unit):
+ if add_direction:
+ unit_rel_patterns = locale._data['date_fields'][a_unit]
+ if seconds >= 0:
+ yield unit_rel_patterns['future']
+ else:
+ yield unit_rel_patterns['past']
+ a_unit = 'duration-' + a_unit
+ yield locale._data['unit_patterns'].get(a_unit, {}).get(format)
+
+ for unit, secs_per_unit in TIMEDELTA_UNITS:
+ value = abs(seconds) / secs_per_unit
+ if value >= threshold or unit == granularity:
+ if unit == granularity and value > 0:
+ value = max(1, value)
+ value = int(round(value))
+ plural_form = locale.plural_form(value)
+ pattern = None
+ for patterns in _iter_patterns(unit):
+ if patterns is not None:
+ pattern = patterns[plural_form]
+ break
+ # This really should not happen
+ if pattern is None:
+ return u''
+ return pattern.replace('{0}', str(value))
+
+ return u''
+
+
+def _format_fallback_interval(start, end, skeleton, tzinfo, locale):
+ if skeleton in locale.datetime_skeletons: # Use the given skeleton
+ format = lambda dt: format_skeleton(skeleton, dt, tzinfo, locale=locale)
+ elif all((isinstance(d, date) and not isinstance(d, datetime)) for d in (start, end)): # Both are just dates
+ format = lambda dt: format_date(dt, locale=locale)
+ elif all((isinstance(d, time) and not isinstance(d, date)) for d in (start, end)): # Both are times
+ format = lambda dt: format_time(dt, tzinfo=tzinfo, locale=locale)
+ else:
+ format = lambda dt: format_datetime(dt, tzinfo=tzinfo, locale=locale)
+
+ formatted_start = format(start)
+ formatted_end = format(end)
+
+ if formatted_start == formatted_end:
+ return format(start)
+
+ return (
+ locale.interval_formats.get(None, "{0}-{1}").
+ replace("{0}", formatted_start).
+ replace("{1}", formatted_end)
+ )
+
+
+def format_interval(start, end, skeleton=None, tzinfo=None, fuzzy=True, locale=LC_TIME):
+ """
+ Format an interval between two instants according to the locale's rules.
+
+ >>> format_interval(date(2016, 1, 15), date(2016, 1, 17), "yMd", locale="fi")
+ u'15.\u201317.1.2016'
+
+ >>> format_interval(time(12, 12), time(16, 16), "Hm", locale="en_GB")
+ '12:12 \u2013 16:16'
+
+ >>> format_interval(time(5, 12), time(16, 16), "hm", locale="en_US")
+ '5:12 AM \u2013 4:16 PM'
+
+ >>> format_interval(time(16, 18), time(16, 24), "Hm", locale="it")
+ '16:18\u201316:24'
+
+ If the start instant equals the end instant, the interval is formatted like the instant.
+
+ >>> format_interval(time(16, 18), time(16, 18), "Hm", locale="it")
+ '16:18'
+
+ Unknown skeletons fall back to "default" formatting.
+
+ >>> format_interval(date(2015, 1, 1), date(2017, 1, 1), "wzq", locale="ja")
+ '2015/01/01\uff5e2017/01/01'
+
+ >>> format_interval(time(16, 18), time(16, 24), "xxx", locale="ja")
+ '16:18:00\uff5e16:24:00'
+
+ >>> format_interval(date(2016, 1, 15), date(2016, 1, 17), "xxx", locale="de")
+ '15.01.2016 \u2013 17.01.2016'
+
+ :param start: First instant (datetime/date/time)
+ :param end: Second instant (datetime/date/time)
+ :param skeleton: The "skeleton format" to use for formatting.
+ :param tzinfo: tzinfo to use (if none is already attached)
+ :param fuzzy: If the skeleton is not found, allow choosing a skeleton that's
+ close enough to it.
+ :param locale: A locale object or identifier.
+ :return: Formatted interval
+ """
+ locale = Locale.parse(locale)
+
+ # NB: The quote comments below are from the algorithm description in
+ # http://www.unicode.org/reports/tr35/tr35-dates.html#intervalFormats
+
+ # > Look for the intervalFormatItem element that matches the "skeleton",
+ # > starting in the current locale and then following the locale fallback
+ # > chain up to, but not including root.
+
+ interval_formats = locale.interval_formats
+
+ if skeleton not in interval_formats or not skeleton:
+ # > If no match was found from the previous step, check what the closest
+ # > match is in the fallback locale chain, as in availableFormats. That
+ # > is, this allows for adjusting the string value field's width,
+ # > including adjusting between "MMM" and "MMMM", and using different
+ # > variants of the same field, such as 'v' and 'z'.
+ if skeleton and fuzzy:
+ skeleton = match_skeleton(skeleton, interval_formats)
+ else:
+ skeleton = None
+ if not skeleton: # Still no match whatsoever?
+ # > Otherwise, format the start and end datetime using the fallback pattern.
+ return _format_fallback_interval(start, end, skeleton, tzinfo, locale)
+
+ skel_formats = interval_formats[skeleton]
+
+ if start == end:
+ return format_skeleton(skeleton, start, tzinfo, fuzzy=fuzzy, locale=locale)
+
+ start = _ensure_datetime_tzinfo(_get_datetime(start), tzinfo=tzinfo)
+ end = _ensure_datetime_tzinfo(_get_datetime(end), tzinfo=tzinfo)
+
+ start_fmt = DateTimeFormat(start, locale=locale)
+ end_fmt = DateTimeFormat(end, locale=locale)
+
+ # > If a match is found from previous steps, compute the calendar field
+ # > with the greatest difference between start and end datetime. If there
+ # > is no difference among any of the fields in the pattern, format as a
+ # > single date using availableFormats, and return.
+
+ for field in PATTERN_CHAR_ORDER: # These are in largest-to-smallest order
+ if field in skel_formats:
+ if start_fmt.extract(field) != end_fmt.extract(field):
+ # > If there is a match, use the pieces of the corresponding pattern to
+ # > format the start and end datetime, as above.
+ return "".join(
+ parse_pattern(pattern).apply(instant, locale)
+ for pattern, instant
+ in zip(skel_formats[field], (start, end))
+ )
+
+ # > Otherwise, format the start and end datetime using the fallback pattern.
+
+ return _format_fallback_interval(start, end, skeleton, tzinfo, locale)
+
+
+def get_period_id(time, tzinfo=None, type=None, locale=LC_TIME):
+ """
+ Get the day period ID for a given time.
+
+ This ID can be used as a key for the period name dictionary.
+
+ >>> get_period_names(locale="de")[get_period_id(time(7, 42), locale="de")]
+ u'Morgen'
+
+ :param time: The time to inspect.
+ :param tzinfo: The timezone for the time. See ``format_time``.
+ :param type: The period type to use. Either "selection" or None.
+ The selection type is used for selecting among phrases such as
+ “Your email arrived yesterday evening” or “Your email arrived last night”.
+ :param locale: the `Locale` object, or a locale string
+ :return: period ID. Something is always returned -- even if it's just "am" or "pm".
+ """
+ time = _get_time(time, tzinfo)
+ seconds_past_midnight = int(time.hour * 60 * 60 + time.minute * 60 + time.second)
+ locale = Locale.parse(locale)
+
+ # The LDML rules state that the rules may not overlap, so iterating in arbitrary
+ # order should be alright.
+ for rule_id, rules in locale.day_period_rules.get(type, {}).items():
+ for rule in rules:
+ if "at" in rule and rule["at"] == seconds_past_midnight:
+ return rule_id
+
+ start_ok = end_ok = False
+
+ if "from" in rule and seconds_past_midnight >= rule["from"]:
+ start_ok = True
+ if "to" in rule and seconds_past_midnight <= rule["to"]:
+ # This rule type does not exist in the present CLDR data;
+ # excuse the lack of test coverage.
+ end_ok = True
+ if "before" in rule and seconds_past_midnight < rule["before"]:
+ end_ok = True
+ if "after" in rule and seconds_past_midnight > rule["after"]:
+ start_ok = True
+
+ if start_ok and end_ok:
+ return rule_id
+
+ if seconds_past_midnight < 43200:
+ return "am"
+ else:
+ return "pm"
+
+
+def parse_date(string, locale=LC_TIME):
+ """Parse a date from a string.
+
+ This function uses the date format for the locale as a hint to determine
+ the order in which the date fields appear in the string.
+
+ >>> parse_date('4/1/04', locale='en_US')
+ datetime.date(2004, 4, 1)
+ >>> parse_date('01.04.2004', locale='de_DE')
+ datetime.date(2004, 4, 1)
+
+ :param string: the string containing the date
+ :param locale: a `Locale` object or a locale identifier
+ """
+ # TODO: try ISO format first?
+ format = get_date_format(locale=locale).pattern.lower()
+ year_idx = format.index('y')
+ month_idx = format.index('m')
+ if month_idx < 0:
+ month_idx = format.index('l')
+ day_idx = format.index('d')
+
+ indexes = [(year_idx, 'Y'), (month_idx, 'M'), (day_idx, 'D')]
+ indexes.sort()
+ indexes = dict([(item[1], idx) for idx, item in enumerate(indexes)])
+
+ # FIXME: this currently only supports numbers, but should also support month
+ # names, both in the requested locale, and english
+
+ numbers = re.findall('(\d+)', string)
+ year = numbers[indexes['Y']]
+ if len(year) == 2:
+ year = 2000 + int(year)
+ else:
+ year = int(year)
+ month = int(numbers[indexes['M']])
+ day = int(numbers[indexes['D']])
+ if month > 12:
+ month, day = day, month
+ return date(year, month, day)
+
+
+def parse_time(string, locale=LC_TIME):
+ """Parse a time from a string.
+
+ This function uses the time format for the locale as a hint to determine
+ the order in which the time fields appear in the string.
+
+ >>> parse_time('15:30:00', locale='en_US')
+ datetime.time(15, 30)
+
+ :param string: the string containing the time
+ :param locale: a `Locale` object or a locale identifier
+ :return: the parsed time
+ :rtype: `time`
+ """
+ # TODO: try ISO format first?
+ format = get_time_format(locale=locale).pattern.lower()
+ hour_idx = format.index('h')
+ if hour_idx < 0:
+ hour_idx = format.index('k')
+ min_idx = format.index('m')
+ sec_idx = format.index('s')
+
+ indexes = [(hour_idx, 'H'), (min_idx, 'M'), (sec_idx, 'S')]
+ indexes.sort()
+ indexes = dict([(item[1], idx) for idx, item in enumerate(indexes)])
+
+ # FIXME: support 12 hour clock, and 0-based hour specification
+ # and seconds should be optional, maybe minutes too
+ # oh, and time-zones, of course
+
+ numbers = re.findall('(\d+)', string)
+ hour = int(numbers[indexes['H']])
+ minute = int(numbers[indexes['M']])
+ second = int(numbers[indexes['S']])
+ return time(hour, minute, second)
+
+
+class DateTimePattern(object):
+
+ def __init__(self, pattern, format):
+ self.pattern = pattern
+ self.format = format
+
+ def __repr__(self):
+ return '<%s %r>' % (type(self).__name__, self.pattern)
+
+ def __unicode__(self):
+ return self.pattern
+
+ def __mod__(self, other):
+ if type(other) is not DateTimeFormat:
+ return NotImplemented
+ return self.format % other
+
+ def apply(self, datetime, locale):
+ return self % DateTimeFormat(datetime, locale)
+
+
+class DateTimeFormat(object):
+
+ def __init__(self, value, locale):
+ assert isinstance(value, (date, datetime, time))
+ if isinstance(value, (datetime, time)) and value.tzinfo is None:
+ value = value.replace(tzinfo=UTC)
+ self.value = value
+ self.locale = Locale.parse(locale)
+
+ def __getitem__(self, name):
+ char = name[0]
+ num = len(name)
+ if char == 'G':
+ return self.format_era(char, num)
+ elif char in ('y', 'Y', 'u'):
+ return self.format_year(char, num)
+ elif char in ('Q', 'q'):
+ return self.format_quarter(char, num)
+ elif char in ('M', 'L'):
+ return self.format_month(char, num)
+ elif char in ('w', 'W'):
+ return self.format_week(char, num)
+ elif char == 'd':
+ return self.format(self.value.day, num)
+ elif char == 'D':
+ return self.format_day_of_year(num)
+ elif char == 'F':
+ return self.format_day_of_week_in_month()
+ elif char in ('E', 'e', 'c'):
+ return self.format_weekday(char, num)
+ elif char == 'a':
+ # TODO: Add support for the rest of the period formats (a*, b*, B*)
+ return self.format_period(char)
+ elif char == 'h':
+ if self.value.hour % 12 == 0:
+ return self.format(12, num)
+ else:
+ return self.format(self.value.hour % 12, num)
+ elif char == 'H':
+ return self.format(self.value.hour, num)
+ elif char == 'K':
+ return self.format(self.value.hour % 12, num)
+ elif char == 'k':
+ if self.value.hour == 0:
+ return self.format(24, num)
+ else:
+ return self.format(self.value.hour, num)
+ elif char == 'm':
+ return self.format(self.value.minute, num)
+ elif char == 's':
+ return self.format(self.value.second, num)
+ elif char == 'S':
+ return self.format_frac_seconds(num)
+ elif char == 'A':
+ return self.format_milliseconds_in_day(num)
+ elif char in ('z', 'Z', 'v', 'V', 'x', 'X', 'O'):
+ return self.format_timezone(char, num)
+ else:
+ raise KeyError('Unsupported date/time field %r' % char)
+
+ def extract(self, char):
+ char = str(char)[0]
+ if char == 'y':
+ return self.value.year
+ elif char == 'M':
+ return self.value.month
+ elif char == 'd':
+ return self.value.day
+ elif char == 'H':
+ return self.value.hour
+ elif char == 'h':
+ return (self.value.hour % 12 or 12)
+ elif char == 'm':
+ return self.value.minute
+ elif char == 'a':
+ return int(self.value.hour >= 12) # 0 for am, 1 for pm
+ else:
+ raise NotImplementedError("Not implemented: extracting %r from %r" % (char, self.value))
+
+ def format_era(self, char, num):
+ width = {3: 'abbreviated', 4: 'wide', 5: 'narrow'}[max(3, num)]
+ era = int(self.value.year >= 0)
+ return get_era_names(width, self.locale)[era]
+
+ def format_year(self, char, num):
+ value = self.value.year
+ if char.isupper():
+ week = self.get_week_number(self.get_day_of_year())
+ if week == 0:
+ value -= 1
+ year = self.format(value, num)
+ if num == 2:
+ year = year[-2:]
+ return year
+
+ def format_quarter(self, char, num):
+ quarter = (self.value.month - 1) // 3 + 1
+ if num <= 2:
+ return ('%%0%dd' % num) % quarter
+ width = {3: 'abbreviated', 4: 'wide', 5: 'narrow'}[num]
+ context = {'Q': 'format', 'q': 'stand-alone'}[char]
+ return get_quarter_names(width, context, self.locale)[quarter]
+
+ def format_month(self, char, num):
+ if num <= 2:
+ return ('%%0%dd' % num) % self.value.month
+ width = {3: 'abbreviated', 4: 'wide', 5: 'narrow'}[num]
+ context = {'M': 'format', 'L': 'stand-alone'}[char]
+ return get_month_names(width, context, self.locale)[self.value.month]
+
+ def format_week(self, char, num):
+ if char.islower(): # week of year
+ day_of_year = self.get_day_of_year()
+ week = self.get_week_number(day_of_year)
+ if week == 0:
+ date = self.value - timedelta(days=day_of_year)
+ week = self.get_week_number(self.get_day_of_year(date),
+ date.weekday())
+ return self.format(week, num)
+ else: # week of month
+ week = self.get_week_number(self.value.day)
+ if week == 0:
+ date = self.value - timedelta(days=self.value.day)
+ week = self.get_week_number(date.day, date.weekday())
+ return '%d' % week
+
+ def format_weekday(self, char='E', num=4):
+ """
+ Return weekday from parsed datetime according to format pattern.
+
+ >>> format = DateTimeFormat(date(2016, 2, 28), Locale.parse('en_US'))
+ >>> format.format_weekday()
+ u'Sunday'
+
+ 'E': Day of week - Use one through three letters for the abbreviated day name, four for the full (wide) name,
+ five for the narrow name, or six for the short name.
+ >>> format.format_weekday('E',2)
+ u'Sun'
+
+ 'e': Local day of week. Same as E except adds a numeric value that will depend on the local starting day of the
+ week, using one or two letters. For this example, Monday is the first day of the week.
+ >>> format.format_weekday('e',2)
+ '01'
+
+ 'c': Stand-Alone local day of week - Use one letter for the local numeric value (same as 'e'), three for the
+ abbreviated day name, four for the full (wide) name, five for the narrow name, or six for the short name.
+ >>> format.format_weekday('c',1)
+ '1'
+
+ :param char: pattern format character ('e','E','c')
+ :param num: count of format character
+
+ """
+ if num < 3:
+ if char.islower():
+ value = 7 - self.locale.first_week_day + self.value.weekday()
+ return self.format(value % 7 + 1, num)
+ num = 3
+ weekday = self.value.weekday()
+ width = {3: 'abbreviated', 4: 'wide', 5: 'narrow', 6: 'short'}[num]
+ if char == 'c':
+ context = 'stand-alone'
+ else:
+ context = 'format'
+ return get_day_names(width, context, self.locale)[weekday]
+
+ def format_day_of_year(self, num):
+ return self.format(self.get_day_of_year(), num)
+
+ def format_day_of_week_in_month(self):
+ return '%d' % ((self.value.day - 1) // 7 + 1)
+
+ def format_period(self, char):
+ period = {0: 'am', 1: 'pm'}[int(self.value.hour >= 12)]
+ for width in ('wide', 'narrow', 'abbreviated'):
+ period_names = get_period_names(context='format', width=width, locale=self.locale)
+ if period in period_names:
+ return period_names[period]
+ raise ValueError('Could not format period %s in %s' % (period, self.locale))
+
+ def format_frac_seconds(self, num):
+ """ Return fractional seconds.
+
+ Rounds the time's microseconds to the precision given by the number \
+ of digits passed in.
+ """
+ value = self.value.microsecond / 1000000
+ return self.format(round(value, num) * 10**num, num)
+
+ def format_milliseconds_in_day(self, num):
+ msecs = self.value.microsecond // 1000 + self.value.second * 1000 + \
+ self.value.minute * 60000 + self.value.hour * 3600000
+ return self.format(msecs, num)
+
+ def format_timezone(self, char, num):
+ width = {3: 'short', 4: 'long', 5: 'iso8601'}[max(3, num)]
+ if char == 'z':
+ return get_timezone_name(self.value, width, locale=self.locale)
+ elif char == 'Z':
+ if num == 5:
+ return get_timezone_gmt(self.value, width, locale=self.locale, return_z=True)
+ return get_timezone_gmt(self.value, width, locale=self.locale)
+ elif char == 'O':
+ if num == 4:
+ return get_timezone_gmt(self.value, width, locale=self.locale)
+ # TODO: To add support for O:1
+ elif char == 'v':
+ return get_timezone_name(self.value.tzinfo, width,
+ locale=self.locale)
+ elif char == 'V':
+ if num == 1:
+ return get_timezone_name(self.value.tzinfo, width,
+ uncommon=True, locale=self.locale)
+ elif num == 2:
+ return get_timezone_name(self.value.tzinfo, locale=self.locale, return_zone=True)
+ elif num == 3:
+ return get_timezone_location(self.value.tzinfo, locale=self.locale, return_city=True)
+ return get_timezone_location(self.value.tzinfo, locale=self.locale)
+ # Included additional elif condition to add support for 'Xx' in timezone format
+ elif char == 'X':
+ if num == 1:
+ return get_timezone_gmt(self.value, width='iso8601_short', locale=self.locale,
+ return_z=True)
+ elif num in (2, 4):
+ return get_timezone_gmt(self.value, width='short', locale=self.locale,
+ return_z=True)
+ elif num in (3, 5):
+ return get_timezone_gmt(self.value, width='iso8601', locale=self.locale,
+ return_z=True)
+ elif char == 'x':
+ if num == 1:
+ return get_timezone_gmt(self.value, width='iso8601_short', locale=self.locale)
+ elif num in (2, 4):
+ return get_timezone_gmt(self.value, width='short', locale=self.locale)
+ elif num in (3, 5):
+ return get_timezone_gmt(self.value, width='iso8601', locale=self.locale)
+
+ def format(self, value, length):
+ return ('%%0%dd' % length) % value
+
+ def get_day_of_year(self, date=None):
+ if date is None:
+ date = self.value
+ return (date - date.replace(month=1, day=1)).days + 1
+
+ def get_week_number(self, day_of_period, day_of_week=None):
+ """Return the number of the week of a day within a period. This may be
+ the week number in a year or the week number in a month.
+
+ Usually this will return a value equal to or greater than 1, but if the
+ first week of the period is so short that it actually counts as the last
+ week of the previous period, this function will return 0.
+
+ >>> format = DateTimeFormat(date(2006, 1, 8), Locale.parse('de_DE'))
+ >>> format.get_week_number(6)
+ 1
+
+ >>> format = DateTimeFormat(date(2006, 1, 8), Locale.parse('en_US'))
+ >>> format.get_week_number(6)
+ 2
+
+ :param day_of_period: the number of the day in the period (usually
+ either the day of month or the day of year)
+ :param day_of_week: the week day; if ommitted, the week day of the
+ current date is assumed
+ """
+ if day_of_week is None:
+ day_of_week = self.value.weekday()
+ first_day = (day_of_week - self.locale.first_week_day -
+ day_of_period + 1) % 7
+ if first_day < 0:
+ first_day += 7
+ week_number = (day_of_period + first_day - 1) // 7
+ if 7 - first_day >= self.locale.min_week_days:
+ week_number += 1
+ return week_number
+
+
+PATTERN_CHARS = {
+ 'G': [1, 2, 3, 4, 5], # era
+ 'y': None, 'Y': None, 'u': None, # year
+ 'Q': [1, 2, 3, 4, 5], 'q': [1, 2, 3, 4, 5], # quarter
+ 'M': [1, 2, 3, 4, 5], 'L': [1, 2, 3, 4, 5], # month
+ 'w': [1, 2], 'W': [1], # week
+ 'd': [1, 2], 'D': [1, 2, 3], 'F': [1], 'g': None, # day
+ 'E': [1, 2, 3, 4, 5, 6], 'e': [1, 2, 3, 4, 5, 6], 'c': [1, 3, 4, 5, 6], # week day
+ 'a': [1], # period
+ 'h': [1, 2], 'H': [1, 2], 'K': [1, 2], 'k': [1, 2], # hour
+ 'm': [1, 2], # minute
+ 's': [1, 2], 'S': None, 'A': None, # second
+ 'z': [1, 2, 3, 4], 'Z': [1, 2, 3, 4, 5], 'O': [1, 4], 'v': [1, 4], # zone
+ 'V': [1, 2, 3, 4], 'x': [1, 2, 3, 4, 5], 'X': [1, 2, 3, 4, 5] # zone
+}
+
+#: The pattern characters declared in the Date Field Symbol Table
+#: (http://www.unicode.org/reports/tr35/tr35-dates.html#Date_Field_Symbol_Table)
+#: in order of decreasing magnitude.
+PATTERN_CHAR_ORDER = "GyYuUQqMLlwWdDFgEecabBChHKkjJmsSAzZOvVXx"
+
+_pattern_cache = {}
+
+
+def parse_pattern(pattern):
+ """Parse date, time, and datetime format patterns.
+
+ >>> parse_pattern("MMMMd").format
+ u'%(MMMM)s%(d)s'
+ >>> parse_pattern("MMM d, yyyy").format
+ u'%(MMM)s %(d)s, %(yyyy)s'
+
+ Pattern can contain literal strings in single quotes:
+
+ >>> parse_pattern("H:mm' Uhr 'z").format
+ u'%(H)s:%(mm)s Uhr %(z)s'
+
+ An actual single quote can be used by using two adjacent single quote
+ characters:
+
+ >>> parse_pattern("hh' o''clock'").format
+ u"%(hh)s o'clock"
+
+ :param pattern: the formatting pattern to parse
+ """
+ if type(pattern) is DateTimePattern:
+ return pattern
+
+ if pattern in _pattern_cache:
+ return _pattern_cache[pattern]
+
+ result = []
+
+ for tok_type, tok_value in tokenize_pattern(pattern):
+ if tok_type == "chars":
+ result.append(tok_value.replace('%', '%%'))
+ elif tok_type == "field":
+ fieldchar, fieldnum = tok_value
+ limit = PATTERN_CHARS[fieldchar]
+ if limit and fieldnum not in limit:
+ raise ValueError('Invalid length for field: %r'
+ % (fieldchar * fieldnum))
+ result.append('%%(%s)s' % (fieldchar * fieldnum))
+ else:
+ raise NotImplementedError("Unknown token type: %s" % tok_type)
+
+ _pattern_cache[pattern] = pat = DateTimePattern(pattern, u''.join(result))
+ return pat
+
+
+def tokenize_pattern(pattern):
+ """
+ Tokenize date format patterns.
+
+ Returns a list of (token_type, token_value) tuples.
+
+ ``token_type`` may be either "chars" or "field".
+
+ For "chars" tokens, the value is the literal value.
+
+ For "field" tokens, the value is a tuple of (field character, repetition count).
+
+ :param pattern: Pattern string
+ :type pattern: str
+ :rtype: list[tuple]
+ """
+ result = []
+ quotebuf = None
+ charbuf = []
+ fieldchar = ['']
+ fieldnum = [0]
+
+ def append_chars():
+ result.append(('chars', ''.join(charbuf).replace('\0', "'")))
+ del charbuf[:]
+
+ def append_field():
+ result.append(('field', (fieldchar[0], fieldnum[0])))
+ fieldchar[0] = ''
+ fieldnum[0] = 0
+
+ for idx, char in enumerate(pattern.replace("''", '\0')):
+ if quotebuf is None:
+ if char == "'": # quote started
+ if fieldchar[0]:
+ append_field()
+ elif charbuf:
+ append_chars()
+ quotebuf = []
+ elif char in PATTERN_CHARS:
+ if charbuf:
+ append_chars()
+ if char == fieldchar[0]:
+ fieldnum[0] += 1
+ else:
+ if fieldchar[0]:
+ append_field()
+ fieldchar[0] = char
+ fieldnum[0] = 1
+ else:
+ if fieldchar[0]:
+ append_field()
+ charbuf.append(char)
+
+ elif quotebuf is not None:
+ if char == "'": # end of quote
+ charbuf.extend(quotebuf)
+ quotebuf = None
+ else: # inside quote
+ quotebuf.append(char)
+
+ if fieldchar[0]:
+ append_field()
+ elif charbuf:
+ append_chars()
+
+ return result
+
+
+def untokenize_pattern(tokens):
+ """
+ Turn a date format pattern token stream back into a string.
+
+ This is the reverse operation of ``tokenize_pattern``.
+
+ :type tokens: Iterable[tuple]
+ :rtype: str
+ """
+ output = []
+ for tok_type, tok_value in tokens:
+ if tok_type == "field":
+ output.append(tok_value[0] * tok_value[1])
+ elif tok_type == "chars":
+ if not any(ch in PATTERN_CHARS for ch in tok_value): # No need to quote
+ output.append(tok_value)
+ else:
+ output.append("'%s'" % tok_value.replace("'", "''"))
+ return "".join(output)
+
+
+def split_interval_pattern(pattern):
+ """
+ Split an interval-describing datetime pattern into multiple pieces.
+
+ > The pattern is then designed to be broken up into two pieces by determining the first repeating field.
+ - http://www.unicode.org/reports/tr35/tr35-dates.html#intervalFormats
+
+ >>> split_interval_pattern(u'E d.M. \u2013 E d.M.')
+ [u'E d.M. \u2013 ', 'E d.M.']
+ >>> split_interval_pattern("Y 'text' Y 'more text'")
+ ["Y 'text '", "Y 'more text'"]
+ >>> split_interval_pattern(u"E, MMM d \u2013 E")
+ [u'E, MMM d \u2013 ', u'E']
+ >>> split_interval_pattern("MMM d")
+ ['MMM d']
+ >>> split_interval_pattern("y G")
+ ['y G']
+ >>> split_interval_pattern(u"MMM d \u2013 d")
+ [u'MMM d \u2013 ', u'd']
+
+ :param pattern: Interval pattern string
+ :return: list of "subpatterns"
+ """
+
+ seen_fields = set()
+ parts = [[]]
+
+ for tok_type, tok_value in tokenize_pattern(pattern):
+ if tok_type == "field":
+ if tok_value[0] in seen_fields: # Repeated field
+ parts.append([])
+ seen_fields.clear()
+ seen_fields.add(tok_value[0])
+ parts[-1].append((tok_type, tok_value))
+
+ return [untokenize_pattern(tokens) for tokens in parts]
+
+
+def match_skeleton(skeleton, options, allow_different_fields=False):
+ """
+ Find the closest match for the given datetime skeleton among the options given.
+
+ This uses the rules outlined in the TR35 document.
+
+ >>> match_skeleton('yMMd', ('yMd', 'yMMMd'))
+ 'yMd'
+
+ >>> match_skeleton('yMMd', ('jyMMd',), allow_different_fields=True)
+ 'jyMMd'
+
+ >>> match_skeleton('yMMd', ('qyMMd',), allow_different_fields=False)
+
+ >>> match_skeleton('hmz', ('hmv',))
+ 'hmv'
+
+ :param skeleton: The skeleton to match
+ :type skeleton: str
+ :param options: An iterable of other skeletons to match against
+ :type options: Iterable[str]
+ :return: The closest skeleton match, or if no match was found, None.
+ :rtype: str|None
+ """
+
+ # TODO: maybe implement pattern expansion?
+
+ # Based on the implementation in
+ # http://source.icu-project.org/repos/icu/icu4j/trunk/main/classes/core/src/com/ibm/icu/text/DateIntervalInfo.java
+
+ # Filter out falsy values and sort for stability; when `interval_formats` is passed in, there may be a None key.
+ options = sorted(option for option in options if option)
+
+ if 'z' in skeleton and not any('z' in option for option in options):
+ skeleton = skeleton.replace('z', 'v')
+
+ get_input_field_width = dict(t[1] for t in tokenize_pattern(skeleton) if t[0] == "field").get
+ best_skeleton = None
+ best_distance = None
+ for option in options:
+ get_opt_field_width = dict(t[1] for t in tokenize_pattern(option) if t[0] == "field").get
+ distance = 0
+ for field in PATTERN_CHARS:
+ input_width = get_input_field_width(field, 0)
+ opt_width = get_opt_field_width(field, 0)
+ if input_width == opt_width:
+ continue
+ if opt_width == 0 or input_width == 0:
+ if not allow_different_fields: # This one is not okay
+ option = None
+ break
+ distance += 0x1000 # Magic weight constant for "entirely different fields"
+ elif field == 'M' and ((input_width > 2 and opt_width <= 2) or (input_width <= 2 and opt_width > 2)):
+ distance += 0x100 # Magic weight for "text turns into a number"
+ else:
+ distance += abs(input_width - opt_width)
+
+ if not option: # We lost the option along the way (probably due to "allow_different_fields")
+ continue
+
+ if not best_skeleton or distance < best_distance:
+ best_skeleton = option
+ best_distance = distance
+
+ if distance == 0: # Found a perfect match!
+ break
+
+ return best_skeleton
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/dates.pyc b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/dates.pyc
new file mode 100644
index 0000000..b433f5b
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/dates.pyc differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/global.dat b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/global.dat
new file mode 100644
index 0000000..722de1d
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/global.dat differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/languages.py b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/languages.py
new file mode 100644
index 0000000..40f5d98
--- /dev/null
+++ b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/languages.py
@@ -0,0 +1,71 @@
+# -- encoding: UTF-8 --
+from babel.core import get_global
+
+
+def get_official_languages(territory, regional=False, de_facto=False):
+ """
+ Get the official language(s) for the given territory.
+
+ The language codes, if any are known, are returned in order of descending popularity.
+
+ If the `regional` flag is set, then languages which are regionally official are also returned.
+
+ If the `de_facto` flag is set, then languages which are "de facto" official are also returned.
+
+ .. warning:: Note that the data is as up to date as the current version of the CLDR used
+ by Babel. If you need scientifically accurate information, use another source!
+
+ :param territory: Territory code
+ :type territory: str
+ :param regional: Whether to return regionally official languages too
+ :type regional: bool
+ :param de_facto: Whether to return de-facto official languages too
+ :type de_facto: bool
+ :return: Tuple of language codes
+ :rtype: tuple[str]
+ """
+
+ territory = str(territory).upper()
+ allowed_stati = set(("official",))
+ if regional:
+ allowed_stati.add("official_regional")
+ if de_facto:
+ allowed_stati.add("de_facto_official")
+
+ languages = get_global("territory_languages").get(territory, {})
+ pairs = [
+ (info['population_percent'], language)
+ for language, info in languages.items()
+ if info.get('official_status') in allowed_stati
+ ]
+ pairs.sort(reverse=True)
+ return tuple(lang for _, lang in pairs)
+
+
+def get_territory_language_info(territory):
+ """
+ Get a dictionary of language information for a territory.
+
+ The dictionary is keyed by language code; the values are dicts with more information.
+
+ The following keys are currently known for the values:
+
+ * `population_percent`: The percentage of the territory's population speaking the
+ language.
+ * `official_status`: An optional string describing the officiality status of the language.
+ Known values are "official", "official_regional" and "de_facto_official".
+
+ .. warning:: Note that the data is as up to date as the current version of the CLDR used
+ by Babel. If you need scientifically accurate information, use another source!
+
+ .. note:: Note that the format of the dict returned may change between Babel versions.
+
+ See http://www.unicode.org/cldr/charts/latest/supplemental/territory_language_information.html
+
+ :param territory: Territory code
+ :type territory: str
+ :return: Language information dictionary
+ :rtype: dict[str, dict]
+ """
+ territory = str(territory).upper()
+ return get_global("territory_languages").get(territory, {}).copy()
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/languages.pyc b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/languages.pyc
new file mode 100644
index 0000000..64ded60
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/languages.pyc differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/lists.py b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/lists.py
new file mode 100644
index 0000000..82e5590
--- /dev/null
+++ b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/lists.py
@@ -0,0 +1,48 @@
+# -*- coding: utf-8 -*-
+"""
+ babel.lists
+ ~~~~~~~~~~~
+
+ Locale dependent formatting of lists.
+
+ The default locale for the functions in this module is determined by the
+ following environment variables, in that order:
+
+ * ``LC_ALL``, and
+ * ``LANG``
+
+ :copyright: (c) 2015 by the Babel Team.
+ :license: BSD, see LICENSE for more details.
+"""
+
+from babel.core import Locale, default_locale
+
+DEFAULT_LOCALE = default_locale()
+
+
+def format_list(lst, locale=DEFAULT_LOCALE):
+ """
+ Format the items in `lst` as a list.
+
+ >>> format_list(['apples', 'oranges', 'pears'], 'en')
+ u'apples, oranges, and pears'
+ >>> format_list(['apples', 'oranges', 'pears'], 'zh')
+ u'apples\u3001oranges\u548cpears'
+
+ :param lst: a sequence of items to format in to a list
+ :param locale: the locale
+ """
+ locale = Locale.parse(locale)
+ if not lst:
+ return ''
+ if len(lst) == 1:
+ return lst[0]
+ if len(lst) == 2:
+ return locale.list_patterns['2'].format(*lst)
+
+ result = locale.list_patterns['start'].format(lst[0], lst[1])
+ for elem in lst[2:-1]:
+ result = locale.list_patterns['middle'].format(result, elem)
+ result = locale.list_patterns['end'].format(result, lst[-1])
+
+ return result
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/lists.pyc b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/lists.pyc
new file mode 100644
index 0000000..8d7721f
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/lists.pyc differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/af.dat b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/af.dat
new file mode 100644
index 0000000..f13005b
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/af.dat differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/af_NA.dat b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/af_NA.dat
new file mode 100644
index 0000000..17ae33f
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/af_NA.dat differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/af_ZA.dat b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/af_ZA.dat
new file mode 100644
index 0000000..301251e
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/af_ZA.dat differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/agq.dat b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/agq.dat
new file mode 100644
index 0000000..83744b1
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/agq.dat differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/agq_CM.dat b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/agq_CM.dat
new file mode 100644
index 0000000..113f82e
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/agq_CM.dat differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/ak.dat b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/ak.dat
new file mode 100644
index 0000000..090e1c0
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/ak.dat differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/ak_GH.dat b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/ak_GH.dat
new file mode 100644
index 0000000..ecf6549
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/ak_GH.dat differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/am.dat b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/am.dat
new file mode 100644
index 0000000..059447c
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/am.dat differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/am_ET.dat b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/am_ET.dat
new file mode 100644
index 0000000..301251e
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/am_ET.dat differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/ar.dat b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/ar.dat
new file mode 100644
index 0000000..ff4427f
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/ar.dat differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/ar_001.dat b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/ar_001.dat
new file mode 100644
index 0000000..81603a3
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/ar_001.dat differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/ar_AE.dat b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/ar_AE.dat
new file mode 100644
index 0000000..77cdbd6
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/ar_AE.dat differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/ar_BH.dat b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/ar_BH.dat
new file mode 100644
index 0000000..6ef5435
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/ar_BH.dat differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/ar_DJ.dat b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/ar_DJ.dat
new file mode 100644
index 0000000..798ada4
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/ar_DJ.dat differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/ar_DZ.dat b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/ar_DZ.dat
new file mode 100644
index 0000000..e5a35b9
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/ar_DZ.dat differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/ar_EG.dat b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/ar_EG.dat
new file mode 100644
index 0000000..67c65fb
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/ar_EG.dat differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/ar_EH.dat b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/ar_EH.dat
new file mode 100644
index 0000000..ecf6549
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/ar_EH.dat differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/ar_ER.dat b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/ar_ER.dat
new file mode 100644
index 0000000..509dc59
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/ar_ER.dat differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/ar_IL.dat b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/ar_IL.dat
new file mode 100644
index 0000000..5262dbb
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/ar_IL.dat differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/ar_IQ.dat b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/ar_IQ.dat
new file mode 100644
index 0000000..db60d29
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/ar_IQ.dat differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/ar_JO.dat b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/ar_JO.dat
new file mode 100644
index 0000000..01689f4
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/ar_JO.dat differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/ar_KM.dat b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/ar_KM.dat
new file mode 100644
index 0000000..e81dc0a
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/ar_KM.dat differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/ar_KW.dat b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/ar_KW.dat
new file mode 100644
index 0000000..6ef5435
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/ar_KW.dat differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/ar_LB.dat b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/ar_LB.dat
new file mode 100644
index 0000000..4b5a2ee
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/ar_LB.dat differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/ar_LY.dat b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/ar_LY.dat
new file mode 100644
index 0000000..2bd52d4
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/ar_LY.dat differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/ar_MA.dat b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/ar_MA.dat
new file mode 100644
index 0000000..9fe954e
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/ar_MA.dat differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/ar_MR.dat b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/ar_MR.dat
new file mode 100644
index 0000000..68e2c3e
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/ar_MR.dat differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/ar_OM.dat b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/ar_OM.dat
new file mode 100644
index 0000000..6ef5435
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/ar_OM.dat differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/ar_PS.dat b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/ar_PS.dat
new file mode 100644
index 0000000..c932e0a
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/ar_PS.dat differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/ar_QA.dat b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/ar_QA.dat
new file mode 100644
index 0000000..6ef5435
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/ar_QA.dat differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/ar_SA.dat b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/ar_SA.dat
new file mode 100644
index 0000000..e54f1ec
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/ar_SA.dat differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/ar_SD.dat b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/ar_SD.dat
new file mode 100644
index 0000000..6ef5435
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/ar_SD.dat differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/ar_SO.dat b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/ar_SO.dat
new file mode 100644
index 0000000..2e44ae2
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/ar_SO.dat differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/ar_SS.dat b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/ar_SS.dat
new file mode 100644
index 0000000..a51d6b9
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/ar_SS.dat differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/ar_SY.dat b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/ar_SY.dat
new file mode 100644
index 0000000..01689f4
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/ar_SY.dat differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/ar_TD.dat b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/ar_TD.dat
new file mode 100644
index 0000000..ecf6549
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/ar_TD.dat differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/ar_TN.dat b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/ar_TN.dat
new file mode 100644
index 0000000..00437cb
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/ar_TN.dat differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/ar_YE.dat b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/ar_YE.dat
new file mode 100644
index 0000000..e54f1ec
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/ar_YE.dat differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/as.dat b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/as.dat
new file mode 100644
index 0000000..5b30190
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/as.dat differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/as_IN.dat b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/as_IN.dat
new file mode 100644
index 0000000..2e3173b
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/as_IN.dat differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/asa.dat b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/asa.dat
new file mode 100644
index 0000000..629d726
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/asa.dat differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/asa_TZ.dat b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/asa_TZ.dat
new file mode 100644
index 0000000..ecf6549
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/asa_TZ.dat differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/ast.dat b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/ast.dat
new file mode 100644
index 0000000..61bfd46
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/ast.dat differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/ast_ES.dat b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/ast_ES.dat
new file mode 100644
index 0000000..b10ea1d
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/ast_ES.dat differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/az.dat b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/az.dat
new file mode 100644
index 0000000..b70d043
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/az.dat differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/az_Cyrl.dat b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/az_Cyrl.dat
new file mode 100644
index 0000000..b76a2c3
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/az_Cyrl.dat differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/az_Cyrl_AZ.dat b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/az_Cyrl_AZ.dat
new file mode 100644
index 0000000..113f82e
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/az_Cyrl_AZ.dat differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/az_Latn.dat b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/az_Latn.dat
new file mode 100644
index 0000000..effd506
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/az_Latn.dat differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/az_Latn_AZ.dat b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/az_Latn_AZ.dat
new file mode 100644
index 0000000..113f82e
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/az_Latn_AZ.dat differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/bas.dat b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/bas.dat
new file mode 100644
index 0000000..f198c93
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/bas.dat differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/bas_CM.dat b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/bas_CM.dat
new file mode 100644
index 0000000..113f82e
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/bas_CM.dat differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/be.dat b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/be.dat
new file mode 100644
index 0000000..0a358fd
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/be.dat differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/be_BY.dat b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/be_BY.dat
new file mode 100644
index 0000000..113f82e
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/be_BY.dat differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/bem.dat b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/bem.dat
new file mode 100644
index 0000000..a9f9ae4
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/bem.dat differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/bem_ZM.dat b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/bem_ZM.dat
new file mode 100644
index 0000000..ecf6549
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/bem_ZM.dat differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/bez.dat b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/bez.dat
new file mode 100644
index 0000000..756e189
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/bez.dat differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/bez_TZ.dat b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/bez_TZ.dat
new file mode 100644
index 0000000..ecf6549
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/bez_TZ.dat differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/bg.dat b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/bg.dat
new file mode 100644
index 0000000..e2de4dc
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/bg.dat differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/bg_BG.dat b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/bg_BG.dat
new file mode 100644
index 0000000..b10ea1d
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/bg_BG.dat differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/bm.dat b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/bm.dat
new file mode 100644
index 0000000..aca5bbd
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/bm.dat differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/bm_ML.dat b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/bm_ML.dat
new file mode 100644
index 0000000..ecf6549
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/bm_ML.dat differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/bn.dat b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/bn.dat
new file mode 100644
index 0000000..69c6f1b
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/bn.dat differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/bn_BD.dat b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/bn_BD.dat
new file mode 100644
index 0000000..71dbca2
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/bn_BD.dat differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/bn_IN.dat b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/bn_IN.dat
new file mode 100644
index 0000000..2e3173b
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/bn_IN.dat differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/bo.dat b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/bo.dat
new file mode 100644
index 0000000..d878dfa
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/bo.dat differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/bo_CN.dat b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/bo_CN.dat
new file mode 100644
index 0000000..301251e
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/bo_CN.dat differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/bo_IN.dat b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/bo_IN.dat
new file mode 100644
index 0000000..7ecbd3c
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/bo_IN.dat differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/br.dat b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/br.dat
new file mode 100644
index 0000000..ae77d88
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/br.dat differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/br_FR.dat b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/br_FR.dat
new file mode 100644
index 0000000..b10ea1d
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/br_FR.dat differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/brx.dat b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/brx.dat
new file mode 100644
index 0000000..5bbd966
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/brx.dat differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/brx_IN.dat b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/brx_IN.dat
new file mode 100644
index 0000000..2e3173b
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/brx_IN.dat differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/bs.dat b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/bs.dat
new file mode 100644
index 0000000..641d1d1
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/bs.dat differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/bs_Cyrl.dat b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/bs_Cyrl.dat
new file mode 100644
index 0000000..57c1159
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/bs_Cyrl.dat differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/bs_Cyrl_BA.dat b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/bs_Cyrl_BA.dat
new file mode 100644
index 0000000..113f82e
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/bs_Cyrl_BA.dat differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/bs_Latn.dat b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/bs_Latn.dat
new file mode 100644
index 0000000..4c7255e
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/bs_Latn.dat differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/bs_Latn_BA.dat b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/bs_Latn_BA.dat
new file mode 100644
index 0000000..113f82e
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/bs_Latn_BA.dat differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/ca.dat b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/ca.dat
new file mode 100644
index 0000000..8d7f2dc
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/ca.dat differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/ca_AD.dat b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/ca_AD.dat
new file mode 100644
index 0000000..b10ea1d
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/ca_AD.dat differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/ca_ES.dat b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/ca_ES.dat
new file mode 100644
index 0000000..b10ea1d
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/ca_ES.dat differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/ca_ES_VALENCIA.dat b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/ca_ES_VALENCIA.dat
new file mode 100644
index 0000000..495f020
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/ca_ES_VALENCIA.dat differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/ca_FR.dat b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/ca_FR.dat
new file mode 100644
index 0000000..300089b
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/ca_FR.dat differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/ca_IT.dat b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/ca_IT.dat
new file mode 100644
index 0000000..b10ea1d
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/ca_IT.dat differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/ce.dat b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/ce.dat
new file mode 100644
index 0000000..6339fd9
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/ce.dat differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/ce_RU.dat b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/ce_RU.dat
new file mode 100644
index 0000000..113f82e
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/ce_RU.dat differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/cgg.dat b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/cgg.dat
new file mode 100644
index 0000000..39c4a23
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/cgg.dat differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/cgg_UG.dat b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/cgg_UG.dat
new file mode 100644
index 0000000..ecf6549
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/cgg_UG.dat differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/chr.dat b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/chr.dat
new file mode 100644
index 0000000..dec59b6
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/chr.dat differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/chr_US.dat b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/chr_US.dat
new file mode 100644
index 0000000..a3e9cfa
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/chr_US.dat differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/ckb.dat b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/ckb.dat
new file mode 100644
index 0000000..7153b98
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/ckb.dat differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/ckb_IQ.dat b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/ckb_IQ.dat
new file mode 100644
index 0000000..6ef5435
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/ckb_IQ.dat differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/ckb_IR.dat b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/ckb_IR.dat
new file mode 100644
index 0000000..534294e
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/ckb_IR.dat differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/cs.dat b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/cs.dat
new file mode 100644
index 0000000..8c62eee
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/cs.dat differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/cs_CZ.dat b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/cs_CZ.dat
new file mode 100644
index 0000000..b10ea1d
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/cs_CZ.dat differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/cu.dat b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/cu.dat
new file mode 100644
index 0000000..2f36619
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/cu.dat differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/cu_RU.dat b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/cu_RU.dat
new file mode 100644
index 0000000..113f82e
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/cu_RU.dat differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/cy.dat b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/cy.dat
new file mode 100644
index 0000000..f8811a7
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/cy.dat differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/cy_GB.dat b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/cy_GB.dat
new file mode 100644
index 0000000..bf35389
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/cy_GB.dat differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/da.dat b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/da.dat
new file mode 100644
index 0000000..733268b
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/da.dat differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/da_DK.dat b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/da_DK.dat
new file mode 100644
index 0000000..b10ea1d
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/da_DK.dat differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/da_GL.dat b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/da_GL.dat
new file mode 100644
index 0000000..47adae3
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/da_GL.dat differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/dav.dat b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/dav.dat
new file mode 100644
index 0000000..39c4ca7
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/dav.dat differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/dav_KE.dat b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/dav_KE.dat
new file mode 100644
index 0000000..301251e
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/dav_KE.dat differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/de.dat b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/de.dat
new file mode 100644
index 0000000..01a1794
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/de.dat differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/de_AT.dat b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/de_AT.dat
new file mode 100644
index 0000000..b1ec8fa
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/de_AT.dat differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/de_BE.dat b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/de_BE.dat
new file mode 100644
index 0000000..b10ea1d
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/de_BE.dat differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/de_CH.dat b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/de_CH.dat
new file mode 100644
index 0000000..7dae4b0
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/de_CH.dat differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/de_DE.dat b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/de_DE.dat
new file mode 100644
index 0000000..b10ea1d
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/de_DE.dat differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/de_LI.dat b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/de_LI.dat
new file mode 100644
index 0000000..8760597
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/de_LI.dat differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/de_LU.dat b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/de_LU.dat
new file mode 100644
index 0000000..a8ceb1f
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/de_LU.dat differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/dje.dat b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/dje.dat
new file mode 100644
index 0000000..f7b6677
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/dje.dat differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/dje_NE.dat b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/dje_NE.dat
new file mode 100644
index 0000000..ecf6549
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/dje_NE.dat differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/dsb.dat b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/dsb.dat
new file mode 100644
index 0000000..52d6909
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/dsb.dat differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/dsb_DE.dat b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/dsb_DE.dat
new file mode 100644
index 0000000..b10ea1d
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/dsb_DE.dat differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/dua.dat b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/dua.dat
new file mode 100644
index 0000000..d27be09
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/dua.dat differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/dua_CM.dat b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/dua_CM.dat
new file mode 100644
index 0000000..113f82e
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/dua_CM.dat differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/dyo.dat b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/dyo.dat
new file mode 100644
index 0000000..f1a2078
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/dyo.dat differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/dyo_SN.dat b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/dyo_SN.dat
new file mode 100644
index 0000000..ecf6549
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/dyo_SN.dat differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/dz.dat b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/dz.dat
new file mode 100644
index 0000000..18f72f2
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/dz.dat differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/dz_BT.dat b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/dz_BT.dat
new file mode 100644
index 0000000..301251e
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/dz_BT.dat differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/ebu.dat b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/ebu.dat
new file mode 100644
index 0000000..fe64ba4
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/ebu.dat differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/ebu_KE.dat b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/ebu_KE.dat
new file mode 100644
index 0000000..301251e
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/ebu_KE.dat differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/ee.dat b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/ee.dat
new file mode 100644
index 0000000..7e10385
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/ee.dat differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/ee_GH.dat b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/ee_GH.dat
new file mode 100644
index 0000000..ecf6549
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/ee_GH.dat differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/ee_TG.dat b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/ee_TG.dat
new file mode 100644
index 0000000..e81dc0a
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/ee_TG.dat differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/el.dat b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/el.dat
new file mode 100644
index 0000000..2b0c586
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/el.dat differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/el_CY.dat b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/el_CY.dat
new file mode 100644
index 0000000..113f82e
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/el_CY.dat differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/el_GR.dat b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/el_GR.dat
new file mode 100644
index 0000000..b10ea1d
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/el_GR.dat differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/en.dat b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/en.dat
new file mode 100644
index 0000000..8b03cff
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/en.dat differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/en_001.dat b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/en_001.dat
new file mode 100644
index 0000000..778cbec
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/en_001.dat differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/en_150.dat b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/en_150.dat
new file mode 100644
index 0000000..ad02956
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/en_150.dat differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/en_AG.dat b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/en_AG.dat
new file mode 100644
index 0000000..b8f7203
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/en_AG.dat differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/en_AI.dat b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/en_AI.dat
new file mode 100644
index 0000000..40aafa5
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/en_AI.dat differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/en_AS.dat b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/en_AS.dat
new file mode 100644
index 0000000..301251e
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/en_AS.dat differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/en_AT.dat b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/en_AT.dat
new file mode 100644
index 0000000..f86a520
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/en_AT.dat differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/en_AU.dat b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/en_AU.dat
new file mode 100644
index 0000000..e5619cf
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/en_AU.dat differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/en_BB.dat b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/en_BB.dat
new file mode 100644
index 0000000..94ac305
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/en_BB.dat differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/en_BE.dat b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/en_BE.dat
new file mode 100644
index 0000000..ad1d6ad
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/en_BE.dat differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/en_BI.dat b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/en_BI.dat
new file mode 100644
index 0000000..cb07df7
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/en_BI.dat differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/en_BM.dat b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/en_BM.dat
new file mode 100644
index 0000000..6cd525d
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/en_BM.dat differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/en_BS.dat b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/en_BS.dat
new file mode 100644
index 0000000..a626d47
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/en_BS.dat differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/en_BW.dat b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/en_BW.dat
new file mode 100644
index 0000000..7e32fb3
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/en_BW.dat differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/en_BZ.dat b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/en_BZ.dat
new file mode 100644
index 0000000..c2cf5d9
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/en_BZ.dat differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/en_CA.dat b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/en_CA.dat
new file mode 100644
index 0000000..d10ae4a
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/en_CA.dat differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/en_CC.dat b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/en_CC.dat
new file mode 100644
index 0000000..cca18e0
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/en_CC.dat differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/en_CH.dat b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/en_CH.dat
new file mode 100644
index 0000000..f350895
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/en_CH.dat differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/en_CK.dat b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/en_CK.dat
new file mode 100644
index 0000000..6c982fa
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/en_CK.dat differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/en_CM.dat b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/en_CM.dat
new file mode 100644
index 0000000..c01aaa0
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/en_CM.dat differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/en_CX.dat b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/en_CX.dat
new file mode 100644
index 0000000..cca18e0
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/en_CX.dat differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/en_CY.dat b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/en_CY.dat
new file mode 100644
index 0000000..b6abb23
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/en_CY.dat differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/en_DE.dat b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/en_DE.dat
new file mode 100644
index 0000000..7f85707
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/en_DE.dat differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/en_DG.dat b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/en_DG.dat
new file mode 100644
index 0000000..e81dc0a
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/en_DG.dat differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/en_DK.dat b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/en_DK.dat
new file mode 100644
index 0000000..9458bb3
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/en_DK.dat differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/en_DM.dat b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/en_DM.dat
new file mode 100644
index 0000000..b8f7203
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/en_DM.dat differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/en_ER.dat b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/en_ER.dat
new file mode 100644
index 0000000..7335f03
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/en_ER.dat differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/en_FI.dat b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/en_FI.dat
new file mode 100644
index 0000000..d92be75
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/en_FI.dat differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/en_FJ.dat b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/en_FJ.dat
new file mode 100644
index 0000000..96801c3
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/en_FJ.dat differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/en_FK.dat b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/en_FK.dat
new file mode 100644
index 0000000..2d1d657
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/en_FK.dat differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/en_FM.dat b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/en_FM.dat
new file mode 100644
index 0000000..ecf6549
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/en_FM.dat differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/en_GB.dat b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/en_GB.dat
new file mode 100644
index 0000000..3c8d46c
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/en_GB.dat differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/en_GD.dat b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/en_GD.dat
new file mode 100644
index 0000000..f67c516
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/en_GD.dat differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/en_GG.dat b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/en_GG.dat
new file mode 100644
index 0000000..8bf64bc
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/en_GG.dat differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/en_GH.dat b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/en_GH.dat
new file mode 100644
index 0000000..538f90f
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/en_GH.dat differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/en_GI.dat b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/en_GI.dat
new file mode 100644
index 0000000..ef5786f
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/en_GI.dat differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/en_GM.dat b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/en_GM.dat
new file mode 100644
index 0000000..d69c204
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/en_GM.dat differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/en_GU.dat b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/en_GU.dat
new file mode 100644
index 0000000..8fd3e76
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/en_GU.dat differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/en_GY.dat b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/en_GY.dat
new file mode 100644
index 0000000..526875a
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/en_GY.dat differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/en_HK.dat b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/en_HK.dat
new file mode 100644
index 0000000..8d16016
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/en_HK.dat differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/en_IE.dat b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/en_IE.dat
new file mode 100644
index 0000000..5b99f49
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/en_IE.dat differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/en_IL.dat b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/en_IL.dat
new file mode 100644
index 0000000..5672204
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/en_IL.dat differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/en_IM.dat b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/en_IM.dat
new file mode 100644
index 0000000..8bf64bc
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/en_IM.dat differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/en_IN.dat b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/en_IN.dat
new file mode 100644
index 0000000..4493a81
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/en_IN.dat differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/en_IO.dat b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/en_IO.dat
new file mode 100644
index 0000000..e81dc0a
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/en_IO.dat differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/en_JE.dat b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/en_JE.dat
new file mode 100644
index 0000000..8bf64bc
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/en_JE.dat differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/en_JM.dat b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/en_JM.dat
new file mode 100644
index 0000000..e869938
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/en_JM.dat differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/en_KE.dat b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/en_KE.dat
new file mode 100644
index 0000000..a8992a5
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/en_KE.dat differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/en_KI.dat b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/en_KI.dat
new file mode 100644
index 0000000..812aeac
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/en_KI.dat differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/en_KN.dat b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/en_KN.dat
new file mode 100644
index 0000000..f67c516
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/en_KN.dat differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/en_KY.dat b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/en_KY.dat
new file mode 100644
index 0000000..dbd8585
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/en_KY.dat differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/en_LC.dat b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/en_LC.dat
new file mode 100644
index 0000000..f67c516
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/en_LC.dat differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/en_LR.dat b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/en_LR.dat
new file mode 100644
index 0000000..ca40edd
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/en_LR.dat differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/en_LS.dat b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/en_LS.dat
new file mode 100644
index 0000000..9187f16
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/en_LS.dat differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/en_MG.dat b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/en_MG.dat
new file mode 100644
index 0000000..32a8e4e
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/en_MG.dat differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/en_MH.dat b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/en_MH.dat
new file mode 100644
index 0000000..275a110
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/en_MH.dat differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/en_MO.dat b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/en_MO.dat
new file mode 100644
index 0000000..e9949a1
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/en_MO.dat differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/en_MP.dat b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/en_MP.dat
new file mode 100644
index 0000000..04d04bf
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/en_MP.dat differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/en_MS.dat b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/en_MS.dat
new file mode 100644
index 0000000..844d9b6
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/en_MS.dat differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/en_MT.dat b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/en_MT.dat
new file mode 100644
index 0000000..e48e9dd
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/en_MT.dat differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/en_MU.dat b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/en_MU.dat
new file mode 100644
index 0000000..3cea0e2
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/en_MU.dat differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/en_MW.dat b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/en_MW.dat
new file mode 100644
index 0000000..ee5bbc9
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/en_MW.dat differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/en_MY.dat b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/en_MY.dat
new file mode 100644
index 0000000..02a5774
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/en_MY.dat differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/en_NA.dat b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/en_NA.dat
new file mode 100644
index 0000000..23f76c5
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/en_NA.dat differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/en_NF.dat b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/en_NF.dat
new file mode 100644
index 0000000..cca18e0
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/en_NF.dat differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/en_NG.dat b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/en_NG.dat
new file mode 100644
index 0000000..8eeea13
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/en_NG.dat differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/en_NL.dat b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/en_NL.dat
new file mode 100644
index 0000000..6a1ebed
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/en_NL.dat differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/en_NR.dat b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/en_NR.dat
new file mode 100644
index 0000000..cca18e0
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/en_NR.dat differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/en_NU.dat b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/en_NU.dat
new file mode 100644
index 0000000..6c982fa
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/en_NU.dat differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/en_NZ.dat b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/en_NZ.dat
new file mode 100644
index 0000000..85d5ada
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/en_NZ.dat differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/en_PG.dat b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/en_PG.dat
new file mode 100644
index 0000000..b67e10f
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/en_PG.dat differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/en_PH.dat b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/en_PH.dat
new file mode 100644
index 0000000..804ac28
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/en_PH.dat differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/en_PK.dat b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/en_PK.dat
new file mode 100644
index 0000000..29bfe7b
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/en_PK.dat differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/en_PN.dat b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/en_PN.dat
new file mode 100644
index 0000000..6c982fa
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/en_PN.dat differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/en_PR.dat b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/en_PR.dat
new file mode 100644
index 0000000..301251e
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/en_PR.dat differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/en_PW.dat b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/en_PW.dat
new file mode 100644
index 0000000..04475e4
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/en_PW.dat differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/en_RW.dat b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/en_RW.dat
new file mode 100644
index 0000000..2bc76ad
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/en_RW.dat differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/en_SB.dat b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/en_SB.dat
new file mode 100644
index 0000000..0caddda
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/en_SB.dat differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/en_SC.dat b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/en_SC.dat
new file mode 100644
index 0000000..00057d2
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/en_SC.dat differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/en_SD.dat b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/en_SD.dat
new file mode 100644
index 0000000..8d724a1
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/en_SD.dat differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/en_SE.dat b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/en_SE.dat
new file mode 100644
index 0000000..7427840
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/en_SE.dat differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/en_SG.dat b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/en_SG.dat
new file mode 100644
index 0000000..642a708
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/en_SG.dat differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/en_SH.dat b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/en_SH.dat
new file mode 100644
index 0000000..83affa4
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/en_SH.dat differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/en_SI.dat b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/en_SI.dat
new file mode 100644
index 0000000..3f57366
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/en_SI.dat differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/en_SL.dat b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/en_SL.dat
new file mode 100644
index 0000000..48bb0c5
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/en_SL.dat differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/en_SS.dat b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/en_SS.dat
new file mode 100644
index 0000000..0dd2047
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/en_SS.dat differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/en_SX.dat b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/en_SX.dat
new file mode 100644
index 0000000..d4b9caa
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/en_SX.dat differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/en_SZ.dat b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/en_SZ.dat
new file mode 100644
index 0000000..0d18e49
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/en_SZ.dat differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/en_TC.dat b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/en_TC.dat
new file mode 100644
index 0000000..ecf6549
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/en_TC.dat differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/en_TK.dat b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/en_TK.dat
new file mode 100644
index 0000000..6c982fa
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/en_TK.dat differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/en_TO.dat b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/en_TO.dat
new file mode 100644
index 0000000..d7ca87d
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/en_TO.dat differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/en_TT.dat b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/en_TT.dat
new file mode 100644
index 0000000..8d1a24e
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/en_TT.dat differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/en_TV.dat b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/en_TV.dat
new file mode 100644
index 0000000..cca18e0
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/en_TV.dat differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/en_TZ.dat b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/en_TZ.dat
new file mode 100644
index 0000000..12faf11
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/en_TZ.dat differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/en_UG.dat b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/en_UG.dat
new file mode 100644
index 0000000..f669af4
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/en_UG.dat differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/en_UM.dat b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/en_UM.dat
new file mode 100644
index 0000000..a3e9cfa
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/en_UM.dat differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/en_US.dat b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/en_US.dat
new file mode 100644
index 0000000..a3e9cfa
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/en_US.dat differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/en_US_POSIX.dat b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/en_US_POSIX.dat
new file mode 100644
index 0000000..67e9d63
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/en_US_POSIX.dat differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/en_VC.dat b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/en_VC.dat
new file mode 100644
index 0000000..f67c516
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/en_VC.dat differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/en_VG.dat b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/en_VG.dat
new file mode 100644
index 0000000..ecf6549
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/en_VG.dat differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/en_VI.dat b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/en_VI.dat
new file mode 100644
index 0000000..a3e9cfa
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/en_VI.dat differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/en_VU.dat b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/en_VU.dat
new file mode 100644
index 0000000..28a3040
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/en_VU.dat differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/en_WS.dat b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/en_WS.dat
new file mode 100644
index 0000000..f75d014
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/en_WS.dat differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/en_ZA.dat b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/en_ZA.dat
new file mode 100644
index 0000000..3e72421
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/en_ZA.dat differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/en_ZM.dat b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/en_ZM.dat
new file mode 100644
index 0000000..66306a2
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/en_ZM.dat differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/en_ZW.dat b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/en_ZW.dat
new file mode 100644
index 0000000..c795fc6
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/en_ZW.dat differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/eo.dat b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/eo.dat
new file mode 100644
index 0000000..94d6b11
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/eo.dat differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/eo_001.dat b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/eo_001.dat
new file mode 100644
index 0000000..373facb
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/eo_001.dat differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/es.dat b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/es.dat
new file mode 100644
index 0000000..d0d650e
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/es.dat differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/es_419.dat b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/es_419.dat
new file mode 100644
index 0000000..7f40b6b
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/es_419.dat differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/es_AR.dat b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/es_AR.dat
new file mode 100644
index 0000000..43e653d
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/es_AR.dat differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/es_BO.dat b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/es_BO.dat
new file mode 100644
index 0000000..4043adf
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/es_BO.dat differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/es_CL.dat b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/es_CL.dat
new file mode 100644
index 0000000..5ae6601
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/es_CL.dat differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/es_CO.dat b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/es_CO.dat
new file mode 100644
index 0000000..0a721e2
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/es_CO.dat differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/es_CR.dat b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/es_CR.dat
new file mode 100644
index 0000000..3e78fe0
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/es_CR.dat differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/es_CU.dat b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/es_CU.dat
new file mode 100644
index 0000000..d9824b1
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/es_CU.dat differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/es_DO.dat b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/es_DO.dat
new file mode 100644
index 0000000..eb32ea3
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/es_DO.dat differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/es_EA.dat b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/es_EA.dat
new file mode 100644
index 0000000..ecf6549
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/es_EA.dat differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/es_EC.dat b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/es_EC.dat
new file mode 100644
index 0000000..967b9a1
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/es_EC.dat differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/es_ES.dat b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/es_ES.dat
new file mode 100644
index 0000000..b10ea1d
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/es_ES.dat differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/es_GQ.dat b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/es_GQ.dat
new file mode 100644
index 0000000..a34d155
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/es_GQ.dat differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/es_GT.dat b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/es_GT.dat
new file mode 100644
index 0000000..c444f6a
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/es_GT.dat differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/es_HN.dat b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/es_HN.dat
new file mode 100644
index 0000000..6f8ab95
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/es_HN.dat differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/es_IC.dat b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/es_IC.dat
new file mode 100644
index 0000000..ecf6549
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/es_IC.dat differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/es_MX.dat b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/es_MX.dat
new file mode 100644
index 0000000..9adbc5a
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/es_MX.dat differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/es_NI.dat b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/es_NI.dat
new file mode 100644
index 0000000..6edc54b
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/es_NI.dat differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/es_PA.dat b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/es_PA.dat
new file mode 100644
index 0000000..d2e2fe0
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/es_PA.dat differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/es_PE.dat b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/es_PE.dat
new file mode 100644
index 0000000..dc9d0aa
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/es_PE.dat differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/es_PH.dat b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/es_PH.dat
new file mode 100644
index 0000000..167400d
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/es_PH.dat differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/es_PR.dat b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/es_PR.dat
new file mode 100644
index 0000000..72bab73
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/es_PR.dat differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/es_PY.dat b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/es_PY.dat
new file mode 100644
index 0000000..50cfc25
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/es_PY.dat differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/es_SV.dat b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/es_SV.dat
new file mode 100644
index 0000000..3ccfea6
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/es_SV.dat differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/es_US.dat b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/es_US.dat
new file mode 100644
index 0000000..521f9fb
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/es_US.dat differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/es_UY.dat b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/es_UY.dat
new file mode 100644
index 0000000..15d7e83
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/es_UY.dat differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/es_VE.dat b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/es_VE.dat
new file mode 100644
index 0000000..9fb8147
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/es_VE.dat differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/et.dat b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/et.dat
new file mode 100644
index 0000000..39332e4
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/et.dat differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/et_EE.dat b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/et_EE.dat
new file mode 100644
index 0000000..b10ea1d
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/et_EE.dat differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/eu.dat b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/eu.dat
new file mode 100644
index 0000000..def99aa
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/eu.dat differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/eu_ES.dat b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/eu_ES.dat
new file mode 100644
index 0000000..b10ea1d
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/eu_ES.dat differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/ewo.dat b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/ewo.dat
new file mode 100644
index 0000000..c0dea1f
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/ewo.dat differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/ewo_CM.dat b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/ewo_CM.dat
new file mode 100644
index 0000000..113f82e
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/ewo_CM.dat differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/fa.dat b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/fa.dat
new file mode 100644
index 0000000..9b7e24b
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/fa.dat differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/fa_AF.dat b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/fa_AF.dat
new file mode 100644
index 0000000..46ffb42
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/fa_AF.dat differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/fa_IR.dat b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/fa_IR.dat
new file mode 100644
index 0000000..d952d61
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/fa_IR.dat differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/ff.dat b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/ff.dat
new file mode 100644
index 0000000..f044474
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/ff.dat differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/ff_CM.dat b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/ff_CM.dat
new file mode 100644
index 0000000..113f82e
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/ff_CM.dat differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/ff_GN.dat b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/ff_GN.dat
new file mode 100644
index 0000000..16efd10
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/ff_GN.dat differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/ff_MR.dat b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/ff_MR.dat
new file mode 100644
index 0000000..97cec8b
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/ff_MR.dat differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/ff_SN.dat b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/ff_SN.dat
new file mode 100644
index 0000000..ecf6549
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/ff_SN.dat differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/fi.dat b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/fi.dat
new file mode 100644
index 0000000..4d9e9d5
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/fi.dat differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/fi_FI.dat b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/fi_FI.dat
new file mode 100644
index 0000000..b10ea1d
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/fi_FI.dat differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/fil.dat b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/fil.dat
new file mode 100644
index 0000000..65a482d
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/fil.dat differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/fil_PH.dat b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/fil_PH.dat
new file mode 100644
index 0000000..301251e
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/fil_PH.dat differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/fo.dat b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/fo.dat
new file mode 100644
index 0000000..eabfb46
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/fo.dat differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/fo_DK.dat b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/fo_DK.dat
new file mode 100644
index 0000000..ff0f284
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/fo_DK.dat differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/fo_FO.dat b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/fo_FO.dat
new file mode 100644
index 0000000..b10ea1d
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/fo_FO.dat differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/fr.dat b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/fr.dat
new file mode 100644
index 0000000..3a7b33d
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/fr.dat differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/fr_BE.dat b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/fr_BE.dat
new file mode 100644
index 0000000..caa0d81
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/fr_BE.dat differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/fr_BF.dat b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/fr_BF.dat
new file mode 100644
index 0000000..ecf6549
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/fr_BF.dat differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/fr_BI.dat b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/fr_BI.dat
new file mode 100644
index 0000000..cb07df7
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/fr_BI.dat differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/fr_BJ.dat b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/fr_BJ.dat
new file mode 100644
index 0000000..ecf6549
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/fr_BJ.dat differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/fr_BL.dat b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/fr_BL.dat
new file mode 100644
index 0000000..ecf6549
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/fr_BL.dat differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/fr_CA.dat b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/fr_CA.dat
new file mode 100644
index 0000000..8ac0ab6
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/fr_CA.dat differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/fr_CD.dat b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/fr_CD.dat
new file mode 100644
index 0000000..c70d91f
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/fr_CD.dat differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/fr_CF.dat b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/fr_CF.dat
new file mode 100644
index 0000000..ecf6549
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/fr_CF.dat differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/fr_CG.dat b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/fr_CG.dat
new file mode 100644
index 0000000..ecf6549
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/fr_CG.dat differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/fr_CH.dat b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/fr_CH.dat
new file mode 100644
index 0000000..36128df
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/fr_CH.dat differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/fr_CI.dat b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/fr_CI.dat
new file mode 100644
index 0000000..ecf6549
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/fr_CI.dat differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/fr_CM.dat b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/fr_CM.dat
new file mode 100644
index 0000000..113f82e
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/fr_CM.dat differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/fr_DJ.dat b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/fr_DJ.dat
new file mode 100644
index 0000000..2ff3c56
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/fr_DJ.dat differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/fr_DZ.dat b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/fr_DZ.dat
new file mode 100644
index 0000000..9a5ff81
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/fr_DZ.dat differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/fr_FR.dat b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/fr_FR.dat
new file mode 100644
index 0000000..b10ea1d
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/fr_FR.dat differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/fr_GA.dat b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/fr_GA.dat
new file mode 100644
index 0000000..ecf6549
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/fr_GA.dat differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/fr_GF.dat b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/fr_GF.dat
new file mode 100644
index 0000000..bca9dbf
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/fr_GF.dat differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/fr_GN.dat b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/fr_GN.dat
new file mode 100644
index 0000000..16efd10
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/fr_GN.dat differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/fr_GP.dat b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/fr_GP.dat
new file mode 100644
index 0000000..b10ea1d
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/fr_GP.dat differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/fr_GQ.dat b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/fr_GQ.dat
new file mode 100644
index 0000000..ecf6549
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/fr_GQ.dat differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/fr_HT.dat b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/fr_HT.dat
new file mode 100644
index 0000000..712703b
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/fr_HT.dat differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/fr_KM.dat b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/fr_KM.dat
new file mode 100644
index 0000000..4c99872
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/fr_KM.dat differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/fr_LU.dat b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/fr_LU.dat
new file mode 100644
index 0000000..95eb3ce
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/fr_LU.dat differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/fr_MA.dat b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/fr_MA.dat
new file mode 100644
index 0000000..baa1724
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/fr_MA.dat differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/fr_MC.dat b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/fr_MC.dat
new file mode 100644
index 0000000..b10ea1d
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/fr_MC.dat differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/fr_MF.dat b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/fr_MF.dat
new file mode 100644
index 0000000..ecf6549
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/fr_MF.dat differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/fr_MG.dat b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/fr_MG.dat
new file mode 100644
index 0000000..7212d4d
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/fr_MG.dat differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/fr_ML.dat b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/fr_ML.dat
new file mode 100644
index 0000000..ecf6549
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/fr_ML.dat differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/fr_MQ.dat b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/fr_MQ.dat
new file mode 100644
index 0000000..b10ea1d
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/fr_MQ.dat differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/fr_MR.dat b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/fr_MR.dat
new file mode 100644
index 0000000..97cec8b
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/fr_MR.dat differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/fr_MU.dat b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/fr_MU.dat
new file mode 100644
index 0000000..9a1c15d
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/fr_MU.dat differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/fr_NC.dat b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/fr_NC.dat
new file mode 100644
index 0000000..ecf6549
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/fr_NC.dat differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/fr_NE.dat b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/fr_NE.dat
new file mode 100644
index 0000000..ecf6549
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/fr_NE.dat differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/fr_PF.dat b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/fr_PF.dat
new file mode 100644
index 0000000..ecf6549
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/fr_PF.dat differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/fr_PM.dat b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/fr_PM.dat
new file mode 100644
index 0000000..ecf6549
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/fr_PM.dat differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/fr_RE.dat b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/fr_RE.dat
new file mode 100644
index 0000000..b10ea1d
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/fr_RE.dat differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/fr_RW.dat b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/fr_RW.dat
new file mode 100644
index 0000000..c1257c4
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/fr_RW.dat differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/fr_SC.dat b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/fr_SC.dat
new file mode 100644
index 0000000..0139731
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/fr_SC.dat differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/fr_SN.dat b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/fr_SN.dat
new file mode 100644
index 0000000..ecf6549
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/fr_SN.dat differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/fr_SY.dat b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/fr_SY.dat
new file mode 100644
index 0000000..7b28945
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/fr_SY.dat differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/fr_TD.dat b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/fr_TD.dat
new file mode 100644
index 0000000..12c89ff
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/fr_TD.dat differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/fr_TG.dat b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/fr_TG.dat
new file mode 100644
index 0000000..ecf6549
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/fr_TG.dat differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/fr_TN.dat b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/fr_TN.dat
new file mode 100644
index 0000000..76412dd
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/fr_TN.dat differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/fr_VU.dat b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/fr_VU.dat
new file mode 100644
index 0000000..3f8ef15
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/fr_VU.dat differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/fr_WF.dat b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/fr_WF.dat
new file mode 100644
index 0000000..ecf6549
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/fr_WF.dat differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/fr_YT.dat b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/fr_YT.dat
new file mode 100644
index 0000000..ecf6549
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/fr_YT.dat differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/fur.dat b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/fur.dat
new file mode 100644
index 0000000..9f29209
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/fur.dat differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/fur_IT.dat b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/fur_IT.dat
new file mode 100644
index 0000000..b10ea1d
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/fur_IT.dat differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/fy.dat b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/fy.dat
new file mode 100644
index 0000000..fca694e
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/fy.dat differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/fy_NL.dat b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/fy_NL.dat
new file mode 100644
index 0000000..b10ea1d
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/fy_NL.dat differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/ga.dat b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/ga.dat
new file mode 100644
index 0000000..1a8677f
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/ga.dat differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/ga_IE.dat b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/ga_IE.dat
new file mode 100644
index 0000000..bf35389
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/ga_IE.dat differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/gd.dat b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/gd.dat
new file mode 100644
index 0000000..4a9217e
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/gd.dat differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/gd_GB.dat b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/gd_GB.dat
new file mode 100644
index 0000000..bf35389
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/gd_GB.dat differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/gl.dat b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/gl.dat
new file mode 100644
index 0000000..124f1d6
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/gl.dat differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/gl_ES.dat b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/gl_ES.dat
new file mode 100644
index 0000000..b10ea1d
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/gl_ES.dat differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/gsw.dat b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/gsw.dat
new file mode 100644
index 0000000..837ebc3
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/gsw.dat differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/gsw_CH.dat b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/gsw_CH.dat
new file mode 100644
index 0000000..b10ea1d
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/gsw_CH.dat differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/gsw_FR.dat b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/gsw_FR.dat
new file mode 100644
index 0000000..b10ea1d
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/gsw_FR.dat differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/gsw_LI.dat b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/gsw_LI.dat
new file mode 100644
index 0000000..b10ea1d
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/gsw_LI.dat differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/gu.dat b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/gu.dat
new file mode 100644
index 0000000..699891d
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/gu.dat differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/gu_IN.dat b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/gu_IN.dat
new file mode 100644
index 0000000..2e3173b
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/gu_IN.dat differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/guz.dat b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/guz.dat
new file mode 100644
index 0000000..32ffb46
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/guz.dat differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/guz_KE.dat b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/guz_KE.dat
new file mode 100644
index 0000000..301251e
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/guz_KE.dat differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/gv.dat b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/gv.dat
new file mode 100644
index 0000000..0fb5bc9
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/gv.dat differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/gv_IM.dat b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/gv_IM.dat
new file mode 100644
index 0000000..1e3a600
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/gv_IM.dat differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/ha.dat b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/ha.dat
new file mode 100644
index 0000000..4b34af3
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/ha.dat differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/ha_GH.dat b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/ha_GH.dat
new file mode 100644
index 0000000..9f66110
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/ha_GH.dat differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/ha_NE.dat b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/ha_NE.dat
new file mode 100644
index 0000000..e81dc0a
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/ha_NE.dat differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/ha_NG.dat b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/ha_NG.dat
new file mode 100644
index 0000000..ecf6549
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/ha_NG.dat differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/haw.dat b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/haw.dat
new file mode 100644
index 0000000..5d4d249
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/haw.dat differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/haw_US.dat b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/haw_US.dat
new file mode 100644
index 0000000..a3e9cfa
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/haw_US.dat differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/he.dat b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/he.dat
new file mode 100644
index 0000000..6d2bf2a
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/he.dat differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/he_IL.dat b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/he_IL.dat
new file mode 100644
index 0000000..e54f1ec
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/he_IL.dat differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/hi.dat b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/hi.dat
new file mode 100644
index 0000000..0018db7
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/hi.dat differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/hi_IN.dat b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/hi_IN.dat
new file mode 100644
index 0000000..2e3173b
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/hi_IN.dat differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/hr.dat b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/hr.dat
new file mode 100644
index 0000000..ca5284a
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/hr.dat differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/hr_BA.dat b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/hr_BA.dat
new file mode 100644
index 0000000..cc19172
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/hr_BA.dat differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/hr_HR.dat b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/hr_HR.dat
new file mode 100644
index 0000000..113f82e
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/hr_HR.dat differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/hsb.dat b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/hsb.dat
new file mode 100644
index 0000000..dd2cf21
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/hsb.dat differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/hsb_DE.dat b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/hsb_DE.dat
new file mode 100644
index 0000000..b10ea1d
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/hsb_DE.dat differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/hu.dat b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/hu.dat
new file mode 100644
index 0000000..0f21390
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/hu.dat differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/hu_HU.dat b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/hu_HU.dat
new file mode 100644
index 0000000..b10ea1d
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/hu_HU.dat differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/hy.dat b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/hy.dat
new file mode 100644
index 0000000..0da4d64
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/hy.dat differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/hy_AM.dat b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/hy_AM.dat
new file mode 100644
index 0000000..113f82e
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/hy_AM.dat differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/id.dat b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/id.dat
new file mode 100644
index 0000000..20df4eb
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/id.dat differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/id_ID.dat b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/id_ID.dat
new file mode 100644
index 0000000..301251e
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/id_ID.dat differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/ig.dat b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/ig.dat
new file mode 100644
index 0000000..80db0ba
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/ig.dat differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/ig_NG.dat b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/ig_NG.dat
new file mode 100644
index 0000000..ecf6549
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/ig_NG.dat differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/ii.dat b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/ii.dat
new file mode 100644
index 0000000..a80b990
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/ii.dat differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/ii_CN.dat b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/ii_CN.dat
new file mode 100644
index 0000000..301251e
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/ii_CN.dat differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/is.dat b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/is.dat
new file mode 100644
index 0000000..1e1aa4a
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/is.dat differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/is_IS.dat b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/is_IS.dat
new file mode 100644
index 0000000..b10ea1d
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/is_IS.dat differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/it.dat b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/it.dat
new file mode 100644
index 0000000..4a9382f
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/it.dat differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/it_CH.dat b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/it_CH.dat
new file mode 100644
index 0000000..016ee3e
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/it_CH.dat differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/it_IT.dat b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/it_IT.dat
new file mode 100644
index 0000000..b10ea1d
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/it_IT.dat differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/it_SM.dat b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/it_SM.dat
new file mode 100644
index 0000000..b10ea1d
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/it_SM.dat differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/ja.dat b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/ja.dat
new file mode 100644
index 0000000..cef4cb2
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/ja.dat differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/ja_JP.dat b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/ja_JP.dat
new file mode 100644
index 0000000..301251e
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/ja_JP.dat differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/jgo.dat b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/jgo.dat
new file mode 100644
index 0000000..532ebd3
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/jgo.dat differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/jgo_CM.dat b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/jgo_CM.dat
new file mode 100644
index 0000000..113f82e
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/jgo_CM.dat differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/jmc.dat b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/jmc.dat
new file mode 100644
index 0000000..274f6ac
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/jmc.dat differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/jmc_TZ.dat b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/jmc_TZ.dat
new file mode 100644
index 0000000..ecf6549
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/jmc_TZ.dat differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/ka.dat b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/ka.dat
new file mode 100644
index 0000000..dacd865
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/ka.dat differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/ka_GE.dat b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/ka_GE.dat
new file mode 100644
index 0000000..113f82e
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/ka_GE.dat differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/kab.dat b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/kab.dat
new file mode 100644
index 0000000..c0212a5
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/kab.dat differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/kab_DZ.dat b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/kab_DZ.dat
new file mode 100644
index 0000000..6ef5435
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/kab_DZ.dat differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/kam.dat b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/kam.dat
new file mode 100644
index 0000000..74bce04
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/kam.dat differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/kam_KE.dat b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/kam_KE.dat
new file mode 100644
index 0000000..301251e
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/kam_KE.dat differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/kde.dat b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/kde.dat
new file mode 100644
index 0000000..3e28166
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/kde.dat differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/kde_TZ.dat b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/kde_TZ.dat
new file mode 100644
index 0000000..ecf6549
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/kde_TZ.dat differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/kea.dat b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/kea.dat
new file mode 100644
index 0000000..16664f3
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/kea.dat differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/kea_CV.dat b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/kea_CV.dat
new file mode 100644
index 0000000..ecf6549
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/kea_CV.dat differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/khq.dat b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/khq.dat
new file mode 100644
index 0000000..73d7243
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/khq.dat differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/khq_ML.dat b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/khq_ML.dat
new file mode 100644
index 0000000..ecf6549
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/khq_ML.dat differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/ki.dat b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/ki.dat
new file mode 100644
index 0000000..ff74a5f
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/ki.dat differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/ki_KE.dat b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/ki_KE.dat
new file mode 100644
index 0000000..301251e
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/ki_KE.dat differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/kk.dat b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/kk.dat
new file mode 100644
index 0000000..75fea63
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/kk.dat differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/kk_KZ.dat b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/kk_KZ.dat
new file mode 100644
index 0000000..113f82e
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/kk_KZ.dat differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/kkj.dat b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/kkj.dat
new file mode 100644
index 0000000..042dc2d
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/kkj.dat differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/kkj_CM.dat b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/kkj_CM.dat
new file mode 100644
index 0000000..113f82e
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/kkj_CM.dat differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/kl.dat b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/kl.dat
new file mode 100644
index 0000000..b6da6ff
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/kl.dat differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/kl_GL.dat b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/kl_GL.dat
new file mode 100644
index 0000000..ecf6549
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/kl_GL.dat differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/kln.dat b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/kln.dat
new file mode 100644
index 0000000..3410441
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/kln.dat differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/kln_KE.dat b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/kln_KE.dat
new file mode 100644
index 0000000..301251e
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/kln_KE.dat differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/km.dat b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/km.dat
new file mode 100644
index 0000000..94df896
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/km.dat differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/km_KH.dat b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/km_KH.dat
new file mode 100644
index 0000000..301251e
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/km_KH.dat differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/kn.dat b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/kn.dat
new file mode 100644
index 0000000..b9612d5
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/kn.dat differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/kn_IN.dat b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/kn_IN.dat
new file mode 100644
index 0000000..2e3173b
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/kn_IN.dat differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/ko.dat b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/ko.dat
new file mode 100644
index 0000000..50eb4b0
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/ko.dat differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/ko_KP.dat b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/ko_KP.dat
new file mode 100644
index 0000000..6cfd780
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/ko_KP.dat differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/ko_KR.dat b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/ko_KR.dat
new file mode 100644
index 0000000..301251e
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/ko_KR.dat differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/kok.dat b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/kok.dat
new file mode 100644
index 0000000..4788432
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/kok.dat differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/kok_IN.dat b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/kok_IN.dat
new file mode 100644
index 0000000..2e3173b
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/kok_IN.dat differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/ks.dat b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/ks.dat
new file mode 100644
index 0000000..32eee5d
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/ks.dat differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/ks_IN.dat b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/ks_IN.dat
new file mode 100644
index 0000000..2e3173b
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/ks_IN.dat differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/ksb.dat b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/ksb.dat
new file mode 100644
index 0000000..19fd387
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/ksb.dat differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/ksb_TZ.dat b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/ksb_TZ.dat
new file mode 100644
index 0000000..ecf6549
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/ksb_TZ.dat differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/ksf.dat b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/ksf.dat
new file mode 100644
index 0000000..b8e6743
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/ksf.dat differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/ksf_CM.dat b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/ksf_CM.dat
new file mode 100644
index 0000000..113f82e
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/ksf_CM.dat differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/ksh.dat b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/ksh.dat
new file mode 100644
index 0000000..617a1b5
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/ksh.dat differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/ksh_DE.dat b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/ksh_DE.dat
new file mode 100644
index 0000000..b10ea1d
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/ksh_DE.dat differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/kw.dat b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/kw.dat
new file mode 100644
index 0000000..64acba5
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/kw.dat differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/kw_GB.dat b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/kw_GB.dat
new file mode 100644
index 0000000..bf35389
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/kw_GB.dat differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/ky.dat b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/ky.dat
new file mode 100644
index 0000000..fe344c7
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/ky.dat differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/ky_KG.dat b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/ky_KG.dat
new file mode 100644
index 0000000..113f82e
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/ky_KG.dat differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/lag.dat b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/lag.dat
new file mode 100644
index 0000000..385a070
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/lag.dat differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/lag_TZ.dat b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/lag_TZ.dat
new file mode 100644
index 0000000..ecf6549
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/lag_TZ.dat differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/lb.dat b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/lb.dat
new file mode 100644
index 0000000..1c3c0a2
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/lb.dat differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/lb_LU.dat b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/lb_LU.dat
new file mode 100644
index 0000000..b10ea1d
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/lb_LU.dat differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/lg.dat b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/lg.dat
new file mode 100644
index 0000000..269bf1e
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/lg.dat differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/lg_UG.dat b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/lg_UG.dat
new file mode 100644
index 0000000..ecf6549
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/lg_UG.dat differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/lkt.dat b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/lkt.dat
new file mode 100644
index 0000000..36b411f
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/lkt.dat differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/lkt_US.dat b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/lkt_US.dat
new file mode 100644
index 0000000..a3e9cfa
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/lkt_US.dat differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/ln.dat b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/ln.dat
new file mode 100644
index 0000000..82926ec
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/ln.dat differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/ln_AO.dat b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/ln_AO.dat
new file mode 100644
index 0000000..535a13a
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/ln_AO.dat differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/ln_CD.dat b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/ln_CD.dat
new file mode 100644
index 0000000..ecf6549
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/ln_CD.dat differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/ln_CF.dat b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/ln_CF.dat
new file mode 100644
index 0000000..ecf6549
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/ln_CF.dat differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/ln_CG.dat b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/ln_CG.dat
new file mode 100644
index 0000000..ecf6549
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/ln_CG.dat differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/lo.dat b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/lo.dat
new file mode 100644
index 0000000..4eac8a3
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/lo.dat differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/lo_LA.dat b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/lo_LA.dat
new file mode 100644
index 0000000..301251e
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/lo_LA.dat differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/lrc.dat b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/lrc.dat
new file mode 100644
index 0000000..daaa873
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/lrc.dat differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/lrc_IQ.dat b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/lrc_IQ.dat
new file mode 100644
index 0000000..3aaf885
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/lrc_IQ.dat differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/lrc_IR.dat b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/lrc_IR.dat
new file mode 100644
index 0000000..d952d61
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/lrc_IR.dat differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/lt.dat b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/lt.dat
new file mode 100644
index 0000000..4f70a95
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/lt.dat differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/lt_LT.dat b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/lt_LT.dat
new file mode 100644
index 0000000..b10ea1d
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/lt_LT.dat differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/lu.dat b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/lu.dat
new file mode 100644
index 0000000..16b5f77
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/lu.dat differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/lu_CD.dat b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/lu_CD.dat
new file mode 100644
index 0000000..ecf6549
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/lu_CD.dat differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/luo.dat b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/luo.dat
new file mode 100644
index 0000000..5c8a95b
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/luo.dat differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/luo_KE.dat b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/luo_KE.dat
new file mode 100644
index 0000000..301251e
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/luo_KE.dat differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/luy.dat b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/luy.dat
new file mode 100644
index 0000000..b6bed4e
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/luy.dat differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/luy_KE.dat b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/luy_KE.dat
new file mode 100644
index 0000000..301251e
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/luy_KE.dat differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/lv.dat b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/lv.dat
new file mode 100644
index 0000000..3bbf958
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/lv.dat differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/lv_LV.dat b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/lv_LV.dat
new file mode 100644
index 0000000..113f82e
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/lv_LV.dat differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/mas.dat b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/mas.dat
new file mode 100644
index 0000000..9014e67
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/mas.dat differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/mas_KE.dat b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/mas_KE.dat
new file mode 100644
index 0000000..301251e
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/mas_KE.dat differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/mas_TZ.dat b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/mas_TZ.dat
new file mode 100644
index 0000000..28f21d6
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/mas_TZ.dat differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/mer.dat b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/mer.dat
new file mode 100644
index 0000000..54a9dac
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/mer.dat differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/mer_KE.dat b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/mer_KE.dat
new file mode 100644
index 0000000..301251e
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/mer_KE.dat differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/mfe.dat b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/mfe.dat
new file mode 100644
index 0000000..1024ece
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/mfe.dat differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/mfe_MU.dat b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/mfe_MU.dat
new file mode 100644
index 0000000..ecf6549
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/mfe_MU.dat differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/mg.dat b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/mg.dat
new file mode 100644
index 0000000..e500a3e
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/mg.dat differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/mg_MG.dat b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/mg_MG.dat
new file mode 100644
index 0000000..ecf6549
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/mg_MG.dat differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/mgh.dat b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/mgh.dat
new file mode 100644
index 0000000..880eae4
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/mgh.dat differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/mgh_MZ.dat b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/mgh_MZ.dat
new file mode 100644
index 0000000..301251e
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/mgh_MZ.dat differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/mgo.dat b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/mgo.dat
new file mode 100644
index 0000000..a4bbb04
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/mgo.dat differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/mgo_CM.dat b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/mgo_CM.dat
new file mode 100644
index 0000000..113f82e
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/mgo_CM.dat differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/mk.dat b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/mk.dat
new file mode 100644
index 0000000..5406358
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/mk.dat differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/mk_MK.dat b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/mk_MK.dat
new file mode 100644
index 0000000..113f82e
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/mk_MK.dat differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/ml.dat b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/ml.dat
new file mode 100644
index 0000000..e377237
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/ml.dat differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/ml_IN.dat b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/ml_IN.dat
new file mode 100644
index 0000000..2e3173b
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/ml_IN.dat differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/mn.dat b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/mn.dat
new file mode 100644
index 0000000..639fa48
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/mn.dat differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/mn_MN.dat b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/mn_MN.dat
new file mode 100644
index 0000000..113f82e
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/mn_MN.dat differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/mr.dat b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/mr.dat
new file mode 100644
index 0000000..182f378
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/mr.dat differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/mr_IN.dat b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/mr_IN.dat
new file mode 100644
index 0000000..2e3173b
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/mr_IN.dat differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/ms.dat b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/ms.dat
new file mode 100644
index 0000000..011a8fb
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/ms.dat differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/ms_BN.dat b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/ms_BN.dat
new file mode 100644
index 0000000..4a41635
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/ms_BN.dat differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/ms_MY.dat b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/ms_MY.dat
new file mode 100644
index 0000000..113f82e
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/ms_MY.dat differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/ms_SG.dat b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/ms_SG.dat
new file mode 100644
index 0000000..e8f8942
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/ms_SG.dat differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/mt.dat b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/mt.dat
new file mode 100644
index 0000000..18d047b
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/mt.dat differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/mt_MT.dat b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/mt_MT.dat
new file mode 100644
index 0000000..301251e
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/mt_MT.dat differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/mua.dat b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/mua.dat
new file mode 100644
index 0000000..5bbe549
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/mua.dat differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/mua_CM.dat b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/mua_CM.dat
new file mode 100644
index 0000000..113f82e
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/mua_CM.dat differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/my.dat b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/my.dat
new file mode 100644
index 0000000..11cad70
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/my.dat differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/my_MM.dat b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/my_MM.dat
new file mode 100644
index 0000000..301251e
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/my_MM.dat differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/mzn.dat b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/mzn.dat
new file mode 100644
index 0000000..7c2d0c6
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/mzn.dat differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/mzn_IR.dat b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/mzn_IR.dat
new file mode 100644
index 0000000..d952d61
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/mzn_IR.dat differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/naq.dat b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/naq.dat
new file mode 100644
index 0000000..f8b36b4
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/naq.dat differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/naq_NA.dat b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/naq_NA.dat
new file mode 100644
index 0000000..ecf6549
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/naq_NA.dat differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/nb.dat b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/nb.dat
new file mode 100644
index 0000000..19370af
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/nb.dat differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/nb_NO.dat b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/nb_NO.dat
new file mode 100644
index 0000000..b10ea1d
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/nb_NO.dat differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/nb_SJ.dat b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/nb_SJ.dat
new file mode 100644
index 0000000..1e3a600
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/nb_SJ.dat differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/nd.dat b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/nd.dat
new file mode 100644
index 0000000..4b93101
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/nd.dat differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/nd_ZW.dat b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/nd_ZW.dat
new file mode 100644
index 0000000..301251e
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/nd_ZW.dat differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/ne.dat b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/ne.dat
new file mode 100644
index 0000000..42d539f
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/ne.dat differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/ne_IN.dat b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/ne_IN.dat
new file mode 100644
index 0000000..1185794
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/ne_IN.dat differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/ne_NP.dat b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/ne_NP.dat
new file mode 100644
index 0000000..301251e
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/ne_NP.dat differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/nl.dat b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/nl.dat
new file mode 100644
index 0000000..1fcde79
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/nl.dat differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/nl_AW.dat b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/nl_AW.dat
new file mode 100644
index 0000000..5cdba38
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/nl_AW.dat differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/nl_BE.dat b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/nl_BE.dat
new file mode 100644
index 0000000..c8f6e59
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/nl_BE.dat differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/nl_BQ.dat b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/nl_BQ.dat
new file mode 100644
index 0000000..907df7d
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/nl_BQ.dat differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/nl_CW.dat b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/nl_CW.dat
new file mode 100644
index 0000000..ab71be3
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/nl_CW.dat differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/nl_NL.dat b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/nl_NL.dat
new file mode 100644
index 0000000..b10ea1d
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/nl_NL.dat differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/nl_SR.dat b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/nl_SR.dat
new file mode 100644
index 0000000..9db38be
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/nl_SR.dat differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/nl_SX.dat b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/nl_SX.dat
new file mode 100644
index 0000000..ab71be3
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/nl_SX.dat differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/nmg.dat b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/nmg.dat
new file mode 100644
index 0000000..862bd6f
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/nmg.dat differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/nmg_CM.dat b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/nmg_CM.dat
new file mode 100644
index 0000000..113f82e
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/nmg_CM.dat differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/nn.dat b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/nn.dat
new file mode 100644
index 0000000..16643db
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/nn.dat differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/nn_NO.dat b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/nn_NO.dat
new file mode 100644
index 0000000..b10ea1d
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/nn_NO.dat differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/nnh.dat b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/nnh.dat
new file mode 100644
index 0000000..52a7f53
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/nnh.dat differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/nnh_CM.dat b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/nnh_CM.dat
new file mode 100644
index 0000000..113f82e
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/nnh_CM.dat differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/nus.dat b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/nus.dat
new file mode 100644
index 0000000..ca47198
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/nus.dat differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/nus_SS.dat b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/nus_SS.dat
new file mode 100644
index 0000000..34ef9d4
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/nus_SS.dat differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/nyn.dat b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/nyn.dat
new file mode 100644
index 0000000..550752a
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/nyn.dat differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/nyn_UG.dat b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/nyn_UG.dat
new file mode 100644
index 0000000..ecf6549
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/nyn_UG.dat differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/om.dat b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/om.dat
new file mode 100644
index 0000000..2bf7277
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/om.dat differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/om_ET.dat b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/om_ET.dat
new file mode 100644
index 0000000..301251e
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/om_ET.dat differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/om_KE.dat b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/om_KE.dat
new file mode 100644
index 0000000..949848b
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/om_KE.dat differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/or.dat b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/or.dat
new file mode 100644
index 0000000..ff7d3de
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/or.dat differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/or_IN.dat b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/or_IN.dat
new file mode 100644
index 0000000..2e3173b
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/or_IN.dat differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/os.dat b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/os.dat
new file mode 100644
index 0000000..6758bd2
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/os.dat differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/os_GE.dat b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/os_GE.dat
new file mode 100644
index 0000000..113f82e
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/os_GE.dat differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/os_RU.dat b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/os_RU.dat
new file mode 100644
index 0000000..4c9568f
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/os_RU.dat differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/pa.dat b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/pa.dat
new file mode 100644
index 0000000..3ed1c43
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/pa.dat differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/pa_Arab.dat b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/pa_Arab.dat
new file mode 100644
index 0000000..05fad71
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/pa_Arab.dat differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/pa_Arab_PK.dat b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/pa_Arab_PK.dat
new file mode 100644
index 0000000..301251e
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/pa_Arab_PK.dat differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/pa_Guru.dat b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/pa_Guru.dat
new file mode 100644
index 0000000..ea76e95
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/pa_Guru.dat differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/pa_Guru_IN.dat b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/pa_Guru_IN.dat
new file mode 100644
index 0000000..2e3173b
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/pa_Guru_IN.dat differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/pl.dat b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/pl.dat
new file mode 100644
index 0000000..8c16040
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/pl.dat differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/pl_PL.dat b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/pl_PL.dat
new file mode 100644
index 0000000..b10ea1d
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/pl_PL.dat differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/prg.dat b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/prg.dat
new file mode 100644
index 0000000..86f903b
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/prg.dat differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/prg_001.dat b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/prg_001.dat
new file mode 100644
index 0000000..2b4c58b
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/prg_001.dat differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/ps.dat b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/ps.dat
new file mode 100644
index 0000000..252cd66
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/ps.dat differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/ps_AF.dat b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/ps_AF.dat
new file mode 100644
index 0000000..d05ad17
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/ps_AF.dat differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/pt.dat b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/pt.dat
new file mode 100644
index 0000000..75ba546
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/pt.dat differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/pt_AO.dat b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/pt_AO.dat
new file mode 100644
index 0000000..b4923b6
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/pt_AO.dat differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/pt_BR.dat b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/pt_BR.dat
new file mode 100644
index 0000000..301251e
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/pt_BR.dat differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/pt_CV.dat b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/pt_CV.dat
new file mode 100644
index 0000000..8b4fd69
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/pt_CV.dat differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/pt_GW.dat b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/pt_GW.dat
new file mode 100644
index 0000000..288cfe2
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/pt_GW.dat differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/pt_MO.dat b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/pt_MO.dat
new file mode 100644
index 0000000..0ffaf3e
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/pt_MO.dat differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/pt_MZ.dat b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/pt_MZ.dat
new file mode 100644
index 0000000..e2b479f
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/pt_MZ.dat differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/pt_PT.dat b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/pt_PT.dat
new file mode 100644
index 0000000..b8e2b08
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/pt_PT.dat differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/pt_ST.dat b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/pt_ST.dat
new file mode 100644
index 0000000..55bef7c
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/pt_ST.dat differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/pt_TL.dat b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/pt_TL.dat
new file mode 100644
index 0000000..288cfe2
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/pt_TL.dat differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/qu.dat b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/qu.dat
new file mode 100644
index 0000000..1e4e24c
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/qu.dat differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/qu_BO.dat b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/qu_BO.dat
new file mode 100644
index 0000000..e8a8e42
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/qu_BO.dat differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/qu_EC.dat b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/qu_EC.dat
new file mode 100644
index 0000000..37c6beb
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/qu_EC.dat differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/qu_PE.dat b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/qu_PE.dat
new file mode 100644
index 0000000..301251e
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/qu_PE.dat differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/rm.dat b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/rm.dat
new file mode 100644
index 0000000..b53a350
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/rm.dat differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/rm_CH.dat b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/rm_CH.dat
new file mode 100644
index 0000000..b10ea1d
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/rm_CH.dat differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/rn.dat b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/rn.dat
new file mode 100644
index 0000000..6870345
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/rn.dat differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/rn_BI.dat b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/rn_BI.dat
new file mode 100644
index 0000000..ecf6549
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/rn_BI.dat differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/ro.dat b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/ro.dat
new file mode 100644
index 0000000..b4af5bc
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/ro.dat differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/ro_MD.dat b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/ro_MD.dat
new file mode 100644
index 0000000..f66f6d2
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/ro_MD.dat differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/ro_RO.dat b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/ro_RO.dat
new file mode 100644
index 0000000..113f82e
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/ro_RO.dat differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/rof.dat b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/rof.dat
new file mode 100644
index 0000000..903d26d
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/rof.dat differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/rof_TZ.dat b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/rof_TZ.dat
new file mode 100644
index 0000000..ecf6549
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/rof_TZ.dat differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/root.dat b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/root.dat
new file mode 100644
index 0000000..324aeec
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/root.dat differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/ru.dat b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/ru.dat
new file mode 100644
index 0000000..eaf4139
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/ru.dat differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/ru_BY.dat b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/ru_BY.dat
new file mode 100644
index 0000000..5e64e86
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/ru_BY.dat differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/ru_KG.dat b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/ru_KG.dat
new file mode 100644
index 0000000..3c7d261
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/ru_KG.dat differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/ru_KZ.dat b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/ru_KZ.dat
new file mode 100644
index 0000000..83f88ed
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/ru_KZ.dat differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/ru_MD.dat b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/ru_MD.dat
new file mode 100644
index 0000000..4b98931
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/ru_MD.dat differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/ru_RU.dat b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/ru_RU.dat
new file mode 100644
index 0000000..113f82e
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/ru_RU.dat differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/ru_UA.dat b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/ru_UA.dat
new file mode 100644
index 0000000..dea4d61
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/ru_UA.dat differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/rw.dat b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/rw.dat
new file mode 100644
index 0000000..0493d4e
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/rw.dat differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/rw_RW.dat b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/rw_RW.dat
new file mode 100644
index 0000000..ecf6549
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/rw_RW.dat differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/rwk.dat b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/rwk.dat
new file mode 100644
index 0000000..9765816
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/rwk.dat differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/rwk_TZ.dat b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/rwk_TZ.dat
new file mode 100644
index 0000000..ecf6549
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/rwk_TZ.dat differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/sah.dat b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/sah.dat
new file mode 100644
index 0000000..835086d
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/sah.dat differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/sah_RU.dat b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/sah_RU.dat
new file mode 100644
index 0000000..113f82e
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/sah_RU.dat differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/saq.dat b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/saq.dat
new file mode 100644
index 0000000..4f1f025
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/saq.dat differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/saq_KE.dat b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/saq_KE.dat
new file mode 100644
index 0000000..301251e
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/saq_KE.dat differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/sbp.dat b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/sbp.dat
new file mode 100644
index 0000000..5145017
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/sbp.dat differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/sbp_TZ.dat b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/sbp_TZ.dat
new file mode 100644
index 0000000..ecf6549
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/sbp_TZ.dat differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/se.dat b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/se.dat
new file mode 100644
index 0000000..585bde9
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/se.dat differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/se_FI.dat b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/se_FI.dat
new file mode 100644
index 0000000..5d2dae1
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/se_FI.dat differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/se_NO.dat b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/se_NO.dat
new file mode 100644
index 0000000..b10ea1d
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/se_NO.dat differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/se_SE.dat b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/se_SE.dat
new file mode 100644
index 0000000..c5530cd
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/se_SE.dat differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/seh.dat b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/seh.dat
new file mode 100644
index 0000000..eb8065a
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/seh.dat differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/seh_MZ.dat b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/seh_MZ.dat
new file mode 100644
index 0000000..301251e
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/seh_MZ.dat differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/ses.dat b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/ses.dat
new file mode 100644
index 0000000..4f062a5
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/ses.dat differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/ses_ML.dat b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/ses_ML.dat
new file mode 100644
index 0000000..ecf6549
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/ses_ML.dat differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/sg.dat b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/sg.dat
new file mode 100644
index 0000000..4a7d026
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/sg.dat differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/sg_CF.dat b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/sg_CF.dat
new file mode 100644
index 0000000..ecf6549
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/sg_CF.dat differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/shi.dat b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/shi.dat
new file mode 100644
index 0000000..7e1dcb7
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/shi.dat differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/shi_Latn.dat b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/shi_Latn.dat
new file mode 100644
index 0000000..3728133
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/shi_Latn.dat differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/shi_Latn_MA.dat b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/shi_Latn_MA.dat
new file mode 100644
index 0000000..6ef5435
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/shi_Latn_MA.dat differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/shi_Tfng.dat b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/shi_Tfng.dat
new file mode 100644
index 0000000..122d3cb
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/shi_Tfng.dat differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/shi_Tfng_MA.dat b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/shi_Tfng_MA.dat
new file mode 100644
index 0000000..6ef5435
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/shi_Tfng_MA.dat differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/si.dat b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/si.dat
new file mode 100644
index 0000000..35510f9
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/si.dat differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/si_LK.dat b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/si_LK.dat
new file mode 100644
index 0000000..113f82e
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/si_LK.dat differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/sk.dat b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/sk.dat
new file mode 100644
index 0000000..4f296bb
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/sk.dat differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/sk_SK.dat b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/sk_SK.dat
new file mode 100644
index 0000000..b10ea1d
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/sk_SK.dat differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/sl.dat b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/sl.dat
new file mode 100644
index 0000000..07dc283
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/sl.dat differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/sl_SI.dat b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/sl_SI.dat
new file mode 100644
index 0000000..113f82e
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/sl_SI.dat differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/smn.dat b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/smn.dat
new file mode 100644
index 0000000..991fe1a
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/smn.dat differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/smn_FI.dat b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/smn_FI.dat
new file mode 100644
index 0000000..b10ea1d
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/smn_FI.dat differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/sn.dat b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/sn.dat
new file mode 100644
index 0000000..0d80e5b
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/sn.dat differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/sn_ZW.dat b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/sn_ZW.dat
new file mode 100644
index 0000000..301251e
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/sn_ZW.dat differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/so.dat b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/so.dat
new file mode 100644
index 0000000..bf35d5b
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/so.dat differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/so_DJ.dat b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/so_DJ.dat
new file mode 100644
index 0000000..798ada4
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/so_DJ.dat differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/so_ET.dat b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/so_ET.dat
new file mode 100644
index 0000000..4fab7bc
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/so_ET.dat differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/so_KE.dat b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/so_KE.dat
new file mode 100644
index 0000000..949848b
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/so_KE.dat differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/so_SO.dat b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/so_SO.dat
new file mode 100644
index 0000000..ecf6549
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/so_SO.dat differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/sq.dat b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/sq.dat
new file mode 100644
index 0000000..423d448
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/sq.dat differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/sq_AL.dat b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/sq_AL.dat
new file mode 100644
index 0000000..113f82e
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/sq_AL.dat differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/sq_MK.dat b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/sq_MK.dat
new file mode 100644
index 0000000..af125c4
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/sq_MK.dat differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/sq_XK.dat b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/sq_XK.dat
new file mode 100644
index 0000000..0a01d65
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/sq_XK.dat differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/sr.dat b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/sr.dat
new file mode 100644
index 0000000..eefba8c
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/sr.dat differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/sr_Cyrl.dat b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/sr_Cyrl.dat
new file mode 100644
index 0000000..6ebcd9c
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/sr_Cyrl.dat differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/sr_Cyrl_BA.dat b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/sr_Cyrl_BA.dat
new file mode 100644
index 0000000..9ea5857
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/sr_Cyrl_BA.dat differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/sr_Cyrl_ME.dat b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/sr_Cyrl_ME.dat
new file mode 100644
index 0000000..113f82e
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/sr_Cyrl_ME.dat differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/sr_Cyrl_RS.dat b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/sr_Cyrl_RS.dat
new file mode 100644
index 0000000..113f82e
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/sr_Cyrl_RS.dat differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/sr_Cyrl_XK.dat b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/sr_Cyrl_XK.dat
new file mode 100644
index 0000000..113f82e
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/sr_Cyrl_XK.dat differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/sr_Latn.dat b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/sr_Latn.dat
new file mode 100644
index 0000000..c5be381
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/sr_Latn.dat differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/sr_Latn_BA.dat b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/sr_Latn_BA.dat
new file mode 100644
index 0000000..9ea5857
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/sr_Latn_BA.dat differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/sr_Latn_ME.dat b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/sr_Latn_ME.dat
new file mode 100644
index 0000000..113f82e
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/sr_Latn_ME.dat differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/sr_Latn_RS.dat b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/sr_Latn_RS.dat
new file mode 100644
index 0000000..113f82e
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/sr_Latn_RS.dat differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/sr_Latn_XK.dat b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/sr_Latn_XK.dat
new file mode 100644
index 0000000..113f82e
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/sr_Latn_XK.dat differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/sv.dat b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/sv.dat
new file mode 100644
index 0000000..ef292b7
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/sv.dat differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/sv_AX.dat b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/sv_AX.dat
new file mode 100644
index 0000000..b10ea1d
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/sv_AX.dat differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/sv_FI.dat b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/sv_FI.dat
new file mode 100644
index 0000000..dfc52f2
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/sv_FI.dat differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/sv_SE.dat b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/sv_SE.dat
new file mode 100644
index 0000000..b10ea1d
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/sv_SE.dat differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/sw.dat b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/sw.dat
new file mode 100644
index 0000000..0cb4274
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/sw.dat differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/sw_CD.dat b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/sw_CD.dat
new file mode 100644
index 0000000..b545b9e
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/sw_CD.dat differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/sw_KE.dat b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/sw_KE.dat
new file mode 100644
index 0000000..301251e
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/sw_KE.dat differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/sw_TZ.dat b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/sw_TZ.dat
new file mode 100644
index 0000000..ecf6549
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/sw_TZ.dat differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/sw_UG.dat b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/sw_UG.dat
new file mode 100644
index 0000000..c4d6a08
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/sw_UG.dat differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/ta.dat b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/ta.dat
new file mode 100644
index 0000000..ae0cae7
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/ta.dat differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/ta_IN.dat b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/ta_IN.dat
new file mode 100644
index 0000000..2e3173b
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/ta_IN.dat differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/ta_LK.dat b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/ta_LK.dat
new file mode 100644
index 0000000..3622e74
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/ta_LK.dat differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/ta_MY.dat b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/ta_MY.dat
new file mode 100644
index 0000000..462dcdc
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/ta_MY.dat differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/ta_SG.dat b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/ta_SG.dat
new file mode 100644
index 0000000..b182725
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/ta_SG.dat differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/te.dat b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/te.dat
new file mode 100644
index 0000000..1b74046
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/te.dat differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/te_IN.dat b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/te_IN.dat
new file mode 100644
index 0000000..2e3173b
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/te_IN.dat differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/teo.dat b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/teo.dat
new file mode 100644
index 0000000..28b296a
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/teo.dat differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/teo_KE.dat b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/teo_KE.dat
new file mode 100644
index 0000000..1fa88a5
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/teo_KE.dat differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/teo_UG.dat b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/teo_UG.dat
new file mode 100644
index 0000000..ecf6549
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/teo_UG.dat differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/th.dat b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/th.dat
new file mode 100644
index 0000000..58be6f3
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/th.dat differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/th_TH.dat b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/th_TH.dat
new file mode 100644
index 0000000..301251e
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/th_TH.dat differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/ti.dat b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/ti.dat
new file mode 100644
index 0000000..03ecdb0
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/ti.dat differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/ti_ER.dat b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/ti_ER.dat
new file mode 100644
index 0000000..f86b8f7
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/ti_ER.dat differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/ti_ET.dat b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/ti_ET.dat
new file mode 100644
index 0000000..301251e
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/ti_ET.dat differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/tk.dat b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/tk.dat
new file mode 100644
index 0000000..f431ccb
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/tk.dat differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/tk_TM.dat b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/tk_TM.dat
new file mode 100644
index 0000000..113f82e
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/tk_TM.dat differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/to.dat b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/to.dat
new file mode 100644
index 0000000..0ae7e46
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/to.dat differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/to_TO.dat b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/to_TO.dat
new file mode 100644
index 0000000..ecf6549
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/to_TO.dat differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/tr.dat b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/tr.dat
new file mode 100644
index 0000000..9f9c068
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/tr.dat differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/tr_CY.dat b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/tr_CY.dat
new file mode 100644
index 0000000..d12c58c
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/tr_CY.dat differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/tr_TR.dat b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/tr_TR.dat
new file mode 100644
index 0000000..113f82e
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/tr_TR.dat differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/twq.dat b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/twq.dat
new file mode 100644
index 0000000..ba28516
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/twq.dat differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/twq_NE.dat b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/twq_NE.dat
new file mode 100644
index 0000000..ecf6549
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/twq_NE.dat differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/tzm.dat b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/tzm.dat
new file mode 100644
index 0000000..870c666
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/tzm.dat differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/tzm_MA.dat b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/tzm_MA.dat
new file mode 100644
index 0000000..6ef5435
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/tzm_MA.dat differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/ug.dat b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/ug.dat
new file mode 100644
index 0000000..d229987
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/ug.dat differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/ug_CN.dat b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/ug_CN.dat
new file mode 100644
index 0000000..301251e
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/ug_CN.dat differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/uk.dat b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/uk.dat
new file mode 100644
index 0000000..7743a37
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/uk.dat differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/uk_UA.dat b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/uk_UA.dat
new file mode 100644
index 0000000..113f82e
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/uk_UA.dat differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/ur.dat b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/ur.dat
new file mode 100644
index 0000000..186132d
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/ur.dat differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/ur_IN.dat b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/ur_IN.dat
new file mode 100644
index 0000000..e68113f
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/ur_IN.dat differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/ur_PK.dat b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/ur_PK.dat
new file mode 100644
index 0000000..301251e
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/ur_PK.dat differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/uz.dat b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/uz.dat
new file mode 100644
index 0000000..f87e34f
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/uz.dat differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/uz_Arab.dat b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/uz_Arab.dat
new file mode 100644
index 0000000..c67463b
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/uz_Arab.dat differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/uz_Arab_AF.dat b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/uz_Arab_AF.dat
new file mode 100644
index 0000000..d05ad17
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/uz_Arab_AF.dat differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/uz_Cyrl.dat b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/uz_Cyrl.dat
new file mode 100644
index 0000000..64d671b
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/uz_Cyrl.dat differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/uz_Cyrl_UZ.dat b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/uz_Cyrl_UZ.dat
new file mode 100644
index 0000000..113f82e
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/uz_Cyrl_UZ.dat differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/uz_Latn.dat b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/uz_Latn.dat
new file mode 100644
index 0000000..aeeaf50
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/uz_Latn.dat differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/uz_Latn_UZ.dat b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/uz_Latn_UZ.dat
new file mode 100644
index 0000000..113f82e
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/uz_Latn_UZ.dat differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/vai.dat b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/vai.dat
new file mode 100644
index 0000000..bf4d421
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/vai.dat differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/vai_Latn.dat b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/vai_Latn.dat
new file mode 100644
index 0000000..67d1817
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/vai_Latn.dat differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/vai_Latn_LR.dat b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/vai_Latn_LR.dat
new file mode 100644
index 0000000..ecf6549
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/vai_Latn_LR.dat differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/vai_Vaii.dat b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/vai_Vaii.dat
new file mode 100644
index 0000000..f91feb1
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/vai_Vaii.dat differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/vai_Vaii_LR.dat b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/vai_Vaii_LR.dat
new file mode 100644
index 0000000..ecf6549
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/vai_Vaii_LR.dat differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/vi.dat b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/vi.dat
new file mode 100644
index 0000000..7b768d6
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/vi.dat differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/vi_VN.dat b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/vi_VN.dat
new file mode 100644
index 0000000..113f82e
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/vi_VN.dat differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/vo.dat b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/vo.dat
new file mode 100644
index 0000000..47c0353
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/vo.dat differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/vo_001.dat b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/vo_001.dat
new file mode 100644
index 0000000..373facb
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/vo_001.dat differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/vun.dat b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/vun.dat
new file mode 100644
index 0000000..8f4dd89
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/vun.dat differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/vun_TZ.dat b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/vun_TZ.dat
new file mode 100644
index 0000000..ecf6549
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/vun_TZ.dat differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/wae.dat b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/wae.dat
new file mode 100644
index 0000000..4a50ec9
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/wae.dat differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/wae_CH.dat b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/wae_CH.dat
new file mode 100644
index 0000000..b10ea1d
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/wae_CH.dat differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/xog.dat b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/xog.dat
new file mode 100644
index 0000000..8787b85
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/xog.dat differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/xog_UG.dat b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/xog_UG.dat
new file mode 100644
index 0000000..ecf6549
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/xog_UG.dat differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/yav.dat b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/yav.dat
new file mode 100644
index 0000000..77c29ac
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/yav.dat differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/yav_CM.dat b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/yav_CM.dat
new file mode 100644
index 0000000..113f82e
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/yav_CM.dat differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/yi.dat b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/yi.dat
new file mode 100644
index 0000000..ee830c9
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/yi.dat differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/yi_001.dat b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/yi_001.dat
new file mode 100644
index 0000000..e2ab8c1
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/yi_001.dat differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/yo.dat b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/yo.dat
new file mode 100644
index 0000000..71e61e8
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/yo.dat differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/yo_BJ.dat b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/yo_BJ.dat
new file mode 100644
index 0000000..7622964
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/yo_BJ.dat differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/yo_NG.dat b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/yo_NG.dat
new file mode 100644
index 0000000..ecf6549
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/yo_NG.dat differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/zgh.dat b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/zgh.dat
new file mode 100644
index 0000000..9be348e
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/zgh.dat differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/zgh_MA.dat b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/zgh_MA.dat
new file mode 100644
index 0000000..6ef5435
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/zgh_MA.dat differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/zh.dat b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/zh.dat
new file mode 100644
index 0000000..961a72f
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/zh.dat differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/zh_Hans.dat b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/zh_Hans.dat
new file mode 100644
index 0000000..6558aa2
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/zh_Hans.dat differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/zh_Hans_CN.dat b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/zh_Hans_CN.dat
new file mode 100644
index 0000000..301251e
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/zh_Hans_CN.dat differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/zh_Hans_HK.dat b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/zh_Hans_HK.dat
new file mode 100644
index 0000000..b7a9b85
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/zh_Hans_HK.dat differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/zh_Hans_MO.dat b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/zh_Hans_MO.dat
new file mode 100644
index 0000000..7196ee4
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/zh_Hans_MO.dat differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/zh_Hans_SG.dat b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/zh_Hans_SG.dat
new file mode 100644
index 0000000..d089661
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/zh_Hans_SG.dat differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/zh_Hant.dat b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/zh_Hant.dat
new file mode 100644
index 0000000..e2f1111
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/zh_Hant.dat differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/zh_Hant_HK.dat b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/zh_Hant_HK.dat
new file mode 100644
index 0000000..2074a36
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/zh_Hant_HK.dat differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/zh_Hant_MO.dat b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/zh_Hant_MO.dat
new file mode 100644
index 0000000..ed6b903
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/zh_Hant_MO.dat differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/zh_Hant_TW.dat b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/zh_Hant_TW.dat
new file mode 100644
index 0000000..301251e
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/zh_Hant_TW.dat differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/zu.dat b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/zu.dat
new file mode 100644
index 0000000..71a0b4f
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/zu.dat differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/zu_ZA.dat b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/zu_ZA.dat
new file mode 100644
index 0000000..301251e
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/locale-data/zu_ZA.dat differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/localedata.py b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/localedata.py
new file mode 100644
index 0000000..9c6f9f2
--- /dev/null
+++ b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/localedata.py
@@ -0,0 +1,227 @@
+# -*- coding: utf-8 -*-
+"""
+ babel.localedata
+ ~~~~~~~~~~~~~~~~
+
+ Low-level locale data access.
+
+ :note: The `Locale` class, which uses this module under the hood, provides a
+ more convenient interface for accessing the locale data.
+
+ :copyright: (c) 2013 by the Babel Team.
+ :license: BSD, see LICENSE for more details.
+"""
+
+import os
+import threading
+from collections import MutableMapping
+from itertools import chain
+
+from babel._compat import pickle
+
+
+_cache = {}
+_cache_lock = threading.RLock()
+_dirname = os.path.join(os.path.dirname(__file__), 'locale-data')
+
+
+def normalize_locale(name):
+ """Normalize a locale ID by stripping spaces and apply proper casing.
+
+ Returns the normalized locale ID string or `None` if the ID is not
+ recognized.
+ """
+ name = name.strip().lower()
+ for locale_id in chain.from_iterable([_cache, locale_identifiers()]):
+ if name == locale_id.lower():
+ return locale_id
+
+
+def exists(name):
+ """Check whether locale data is available for the given locale.
+
+ Returns `True` if it exists, `False` otherwise.
+
+ :param name: the locale identifier string
+ """
+ if name in _cache:
+ return True
+ file_found = os.path.exists(os.path.join(_dirname, '%s.dat' % name))
+ return True if file_found else bool(normalize_locale(name))
+
+
+def locale_identifiers():
+ """Return a list of all locale identifiers for which locale data is
+ available.
+
+ .. versionadded:: 0.8.1
+
+ :return: a list of locale identifiers (strings)
+ """
+ return [stem for stem, extension in [
+ os.path.splitext(filename) for filename in os.listdir(_dirname)
+ ] if extension == '.dat' and stem != 'root']
+
+
+def load(name, merge_inherited=True):
+ """Load the locale data for the given locale.
+
+ The locale data is a dictionary that contains much of the data defined by
+ the Common Locale Data Repository (CLDR). This data is stored as a
+ collection of pickle files inside the ``babel`` package.
+
+ >>> d = load('en_US')
+ >>> d['languages']['sv']
+ u'Swedish'
+
+ Note that the results are cached, and subsequent requests for the same
+ locale return the same dictionary:
+
+ >>> d1 = load('en_US')
+ >>> d2 = load('en_US')
+ >>> d1 is d2
+ True
+
+ :param name: the locale identifier string (or "root")
+ :param merge_inherited: whether the inherited data should be merged into
+ the data of the requested locale
+ :raise `IOError`: if no locale data file is found for the given locale
+ identifer, or one of the locales it inherits from
+ """
+ _cache_lock.acquire()
+ try:
+ data = _cache.get(name)
+ if not data:
+ # Load inherited data
+ if name == 'root' or not merge_inherited:
+ data = {}
+ else:
+ from babel.core import get_global
+ parent = get_global('parent_exceptions').get(name)
+ if not parent:
+ parts = name.split('_')
+ if len(parts) == 1:
+ parent = 'root'
+ else:
+ parent = '_'.join(parts[:-1])
+ data = load(parent).copy()
+ filename = os.path.join(_dirname, '%s.dat' % name)
+ fileobj = open(filename, 'rb')
+ try:
+ if name != 'root' and merge_inherited:
+ merge(data, pickle.load(fileobj))
+ else:
+ data = pickle.load(fileobj)
+ _cache[name] = data
+ finally:
+ fileobj.close()
+ return data
+ finally:
+ _cache_lock.release()
+
+
+def merge(dict1, dict2):
+ """Merge the data from `dict2` into the `dict1` dictionary, making copies
+ of nested dictionaries.
+
+ >>> d = {1: 'foo', 3: 'baz'}
+ >>> merge(d, {1: 'Foo', 2: 'Bar'})
+ >>> sorted(d.items())
+ [(1, 'Foo'), (2, 'Bar'), (3, 'baz')]
+
+ :param dict1: the dictionary to merge into
+ :param dict2: the dictionary containing the data that should be merged
+ """
+ for key, val2 in dict2.items():
+ if val2 is not None:
+ val1 = dict1.get(key)
+ if isinstance(val2, dict):
+ if val1 is None:
+ val1 = {}
+ if isinstance(val1, Alias):
+ val1 = (val1, val2)
+ elif isinstance(val1, tuple):
+ alias, others = val1
+ others = others.copy()
+ merge(others, val2)
+ val1 = (alias, others)
+ else:
+ val1 = val1.copy()
+ merge(val1, val2)
+ else:
+ val1 = val2
+ dict1[key] = val1
+
+
+class Alias(object):
+ """Representation of an alias in the locale data.
+
+ An alias is a value that refers to some other part of the locale data,
+ as specified by the `keys`.
+ """
+
+ def __init__(self, keys):
+ self.keys = tuple(keys)
+
+ def __repr__(self):
+ return '<%s %r>' % (type(self).__name__, self.keys)
+
+ def resolve(self, data):
+ """Resolve the alias based on the given data.
+
+ This is done recursively, so if one alias resolves to a second alias,
+ that second alias will also be resolved.
+
+ :param data: the locale data
+ :type data: `dict`
+ """
+ base = data
+ for key in self.keys:
+ data = data[key]
+ if isinstance(data, Alias):
+ data = data.resolve(base)
+ elif isinstance(data, tuple):
+ alias, others = data
+ data = alias.resolve(base)
+ return data
+
+
+class LocaleDataDict(MutableMapping):
+ """Dictionary wrapper that automatically resolves aliases to the actual
+ values.
+ """
+
+ def __init__(self, data, base=None):
+ self._data = data
+ if base is None:
+ base = data
+ self.base = base
+
+ def __len__(self):
+ return len(self._data)
+
+ def __iter__(self):
+ return iter(self._data)
+
+ def __getitem__(self, key):
+ orig = val = self._data[key]
+ if isinstance(val, Alias): # resolve an alias
+ val = val.resolve(self.base)
+ if isinstance(val, tuple): # Merge a partial dict with an alias
+ alias, others = val
+ val = alias.resolve(self.base).copy()
+ merge(val, others)
+ if type(val) is dict: # Return a nested alias-resolving dict
+ val = LocaleDataDict(val, base=self.base)
+ if val is not orig:
+ self._data[key] = val
+ return val
+
+ def __setitem__(self, key, value):
+ self._data[key] = value
+
+ def __delitem__(self, key):
+ del self._data[key]
+
+ def copy(self):
+ return LocaleDataDict(self._data.copy(), base=self.base)
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/localedata.pyc b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/localedata.pyc
new file mode 100644
index 0000000..db7fd66
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/localedata.pyc differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/localtime/__init__.py b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/localtime/__init__.py
new file mode 100644
index 0000000..883ff16
--- /dev/null
+++ b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/localtime/__init__.py
@@ -0,0 +1,76 @@
+# -*- coding: utf-8 -*-
+"""
+ babel.localtime
+ ~~~~~~~~~~~~~~~
+
+ Babel specific fork of tzlocal to determine the local timezone
+ of the system.
+
+ :copyright: (c) 2013 by the Babel Team.
+ :license: BSD, see LICENSE for more details.
+"""
+
+import sys
+import pytz
+import time
+from datetime import timedelta
+from datetime import tzinfo
+from threading import RLock
+
+if sys.platform == 'win32':
+ from babel.localtime._win32 import _get_localzone
+else:
+ from babel.localtime._unix import _get_localzone
+
+
+_cached_tz = None
+_cache_lock = RLock()
+
+STDOFFSET = timedelta(seconds=-time.timezone)
+if time.daylight:
+ DSTOFFSET = timedelta(seconds=-time.altzone)
+else:
+ DSTOFFSET = STDOFFSET
+
+DSTDIFF = DSTOFFSET - STDOFFSET
+ZERO = timedelta(0)
+
+
+class _FallbackLocalTimezone(tzinfo):
+
+ def utcoffset(self, dt):
+ if self._isdst(dt):
+ return DSTOFFSET
+ else:
+ return STDOFFSET
+
+ def dst(self, dt):
+ if self._isdst(dt):
+ return DSTDIFF
+ else:
+ return ZERO
+
+ def tzname(self, dt):
+ return time.tzname[self._isdst(dt)]
+
+ def _isdst(self, dt):
+ tt = (dt.year, dt.month, dt.day,
+ dt.hour, dt.minute, dt.second,
+ dt.weekday(), 0, -1)
+ stamp = time.mktime(tt)
+ tt = time.localtime(stamp)
+ return tt.tm_isdst > 0
+
+
+def get_localzone():
+ """Returns the current underlying local timezone object.
+ Generally this function does not need to be used, it's a
+ better idea to use the :data:`LOCALTZ` singleton instead.
+ """
+ return _get_localzone()
+
+
+try:
+ LOCALTZ = get_localzone()
+except pytz.UnknownTimeZoneError:
+ LOCALTZ = _FallbackLocalTimezone()
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/localtime/__init__.pyc b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/localtime/__init__.pyc
new file mode 100644
index 0000000..c1ae707
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/localtime/__init__.pyc differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/localtime/_unix.py b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/localtime/_unix.py
new file mode 100644
index 0000000..378a90b
--- /dev/null
+++ b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/localtime/_unix.py
@@ -0,0 +1,138 @@
+from __future__ import with_statement
+import os
+import re
+import sys
+import pytz
+import subprocess
+
+_systemconfig_tz = re.compile(r'^Time Zone: (.*)$(?m)')
+
+
+def _tz_from_env(tzenv):
+ if tzenv[0] == ':':
+ tzenv = tzenv[1:]
+
+ # TZ specifies a file
+ if os.path.exists(tzenv):
+ with open(tzenv, 'rb') as tzfile:
+ return pytz.tzfile.build_tzinfo('local', tzfile)
+
+ # TZ specifies a zoneinfo zone.
+ try:
+ tz = pytz.timezone(tzenv)
+ # That worked, so we return this:
+ return tz
+ except pytz.UnknownTimeZoneError:
+ raise pytz.UnknownTimeZoneError(
+ "tzlocal() does not support non-zoneinfo timezones like %s. \n"
+ "Please use a timezone in the form of Continent/City")
+
+
+def _get_localzone(_root='/'):
+ """Tries to find the local timezone configuration.
+ This method prefers finding the timezone name and passing that to pytz,
+ over passing in the localtime file, as in the later case the zoneinfo
+ name is unknown.
+ The parameter _root makes the function look for files like /etc/localtime
+ beneath the _root directory. This is primarily used by the tests.
+ In normal usage you call the function without parameters.
+ """
+
+ tzenv = os.environ.get('TZ')
+ if tzenv:
+ return _tz_from_env(tzenv)
+
+ # This is actually a pretty reliable way to test for the local time
+ # zone on operating systems like OS X. On OS X especially this is the
+ # only one that actually works.
+ try:
+ link_dst = os.readlink('/etc/localtime')
+ except OSError:
+ pass
+ else:
+ pos = link_dst.find('/zoneinfo/')
+ if pos >= 0:
+ zone_name = link_dst[pos + 10:]
+ try:
+ return pytz.timezone(zone_name)
+ except pytz.UnknownTimeZoneError:
+ pass
+
+ # If we are on OS X now we are pretty sure that the rest of the
+ # code will fail and just fall through until it hits the reading
+ # of /etc/localtime and using it without name. At this point we
+ # can invoke systemconfig which internally invokes ICU. ICU itself
+ # does the same thing we do (readlink + compare file contents) but
+ # since it knows where the zone files are that should be a bit
+ # better than reimplementing the logic here.
+ if sys.platform == 'darwin':
+ c = subprocess.Popen(['systemsetup', '-gettimezone'],
+ stdout=subprocess.PIPE)
+ sys_result = c.communicate()[0]
+ c.wait()
+ tz_match = _systemconfig_tz.search(sys_result)
+ if tz_match is not None:
+ zone_name = tz_match.group(1)
+ try:
+ return pytz.timezone(zone_name)
+ except pytz.UnknownTimeZoneError:
+ pass
+
+ # Now look for distribution specific configuration files
+ # that contain the timezone name.
+ tzpath = os.path.join(_root, 'etc/timezone')
+ if os.path.exists(tzpath):
+ with open(tzpath, 'rb') as tzfile:
+ data = tzfile.read()
+
+ # Issue #3 in tzlocal was that /etc/timezone was a zoneinfo file.
+ # That's a misconfiguration, but we need to handle it gracefully:
+ if data[:5] != 'TZif2':
+ etctz = data.strip().decode()
+ # Get rid of host definitions and comments:
+ if ' ' in etctz:
+ etctz, dummy = etctz.split(' ', 1)
+ if '#' in etctz:
+ etctz, dummy = etctz.split('#', 1)
+ return pytz.timezone(etctz.replace(' ', '_'))
+
+ # CentOS has a ZONE setting in /etc/sysconfig/clock,
+ # OpenSUSE has a TIMEZONE setting in /etc/sysconfig/clock and
+ # Gentoo has a TIMEZONE setting in /etc/conf.d/clock
+ # We look through these files for a timezone:
+ zone_re = re.compile('\s*ZONE\s*=\s*\"')
+ timezone_re = re.compile('\s*TIMEZONE\s*=\s*\"')
+ end_re = re.compile('\"')
+
+ for filename in ('etc/sysconfig/clock', 'etc/conf.d/clock'):
+ tzpath = os.path.join(_root, filename)
+ if not os.path.exists(tzpath):
+ continue
+ with open(tzpath, 'rt') as tzfile:
+ data = tzfile.readlines()
+
+ for line in data:
+ # Look for the ZONE= setting.
+ match = zone_re.match(line)
+ if match is None:
+ # No ZONE= setting. Look for the TIMEZONE= setting.
+ match = timezone_re.match(line)
+ if match is not None:
+ # Some setting existed
+ line = line[match.end():]
+ etctz = line[:end_re.search(line).start()]
+
+ # We found a timezone
+ return pytz.timezone(etctz.replace(' ', '_'))
+
+ # No explicit setting existed. Use localtime
+ for filename in ('etc/localtime', 'usr/local/etc/localtime'):
+ tzpath = os.path.join(_root, filename)
+
+ if not os.path.exists(tzpath):
+ continue
+
+ with open(tzpath, 'rb') as tzfile:
+ return pytz.tzfile.build_tzinfo('local', tzfile)
+
+ raise pytz.UnknownTimeZoneError('Can not find any timezone configuration')
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/localtime/_unix.pyc b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/localtime/_unix.pyc
new file mode 100644
index 0000000..ad585ff
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/localtime/_unix.pyc differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/localtime/_win32.py b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/localtime/_win32.py
new file mode 100644
index 0000000..3752dff
--- /dev/null
+++ b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/localtime/_win32.py
@@ -0,0 +1,96 @@
+try:
+ import _winreg as winreg
+except ImportError:
+ try:
+ import winreg
+ except ImportError:
+ winreg = None
+
+from babel.core import get_global
+import pytz
+
+
+# When building the cldr data on windows this module gets imported.
+# Because at that point there is no global.dat yet this call will
+# fail. We want to catch it down in that case then and just assume
+# the mapping was empty.
+try:
+ tz_names = get_global('windows_zone_mapping')
+except RuntimeError:
+ tz_names = {}
+
+
+def valuestodict(key):
+ """Convert a registry key's values to a dictionary."""
+ dict = {}
+ size = winreg.QueryInfoKey(key)[1]
+ for i in range(size):
+ data = winreg.EnumValue(key, i)
+ dict[data[0]] = data[1]
+ return dict
+
+
+def get_localzone_name():
+ # Windows is special. It has unique time zone names (in several
+ # meanings of the word) available, but unfortunately, they can be
+ # translated to the language of the operating system, so we need to
+ # do a backwards lookup, by going through all time zones and see which
+ # one matches.
+ handle = winreg.ConnectRegistry(None, winreg.HKEY_LOCAL_MACHINE)
+
+ TZLOCALKEYNAME = r'SYSTEM\CurrentControlSet\Control\TimeZoneInformation'
+ localtz = winreg.OpenKey(handle, TZLOCALKEYNAME)
+ keyvalues = valuestodict(localtz)
+ localtz.Close()
+ if 'TimeZoneKeyName' in keyvalues:
+ # Windows 7 (and Vista?)
+
+ # For some reason this returns a string with loads of NUL bytes at
+ # least on some systems. I don't know if this is a bug somewhere, I
+ # just work around it.
+ tzkeyname = keyvalues['TimeZoneKeyName'].split('\x00', 1)[0]
+ else:
+ # Windows 2000 or XP
+
+ # This is the localized name:
+ tzwin = keyvalues['StandardName']
+
+ # Open the list of timezones to look up the real name:
+ TZKEYNAME = r'SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones'
+ tzkey = winreg.OpenKey(handle, TZKEYNAME)
+
+ # Now, match this value to Time Zone information
+ tzkeyname = None
+ for i in range(winreg.QueryInfoKey(tzkey)[0]):
+ subkey = winreg.EnumKey(tzkey, i)
+ sub = winreg.OpenKey(tzkey, subkey)
+ data = valuestodict(sub)
+ sub.Close()
+ if data['Std'] == tzwin:
+ tzkeyname = subkey
+ break
+
+ tzkey.Close()
+ handle.Close()
+
+ if tzkeyname is None:
+ raise LookupError('Can not find Windows timezone configuration')
+
+ timezone = tz_names.get(tzkeyname)
+ if timezone is None:
+ # Nope, that didn't work. Try adding 'Standard Time',
+ # it seems to work a lot of times:
+ timezone = tz_names.get(tzkeyname + ' Standard Time')
+
+ # Return what we have.
+ if timezone is None:
+ raise pytz.UnknownTimeZoneError('Can not find timezone ' + tzkeyname)
+
+ return timezone
+
+
+def _get_localzone():
+ if winreg is None:
+ raise pytz.UnknownTimeZoneError(
+ 'Runtime support not available')
+ return pytz.timezone(get_localzone_name())
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/localtime/_win32.pyc b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/localtime/_win32.pyc
new file mode 100644
index 0000000..388ea8a
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/localtime/_win32.pyc differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/messages/__init__.py b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/messages/__init__.py
new file mode 100644
index 0000000..1b63bae
--- /dev/null
+++ b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/messages/__init__.py
@@ -0,0 +1,12 @@
+# -*- coding: utf-8 -*-
+"""
+ babel.messages
+ ~~~~~~~~~~~~~~
+
+ Support for ``gettext`` message catalogs.
+
+ :copyright: (c) 2013 by the Babel Team.
+ :license: BSD, see LICENSE for more details.
+"""
+
+from babel.messages.catalog import *
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/messages/__init__.pyc b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/messages/__init__.pyc
new file mode 100644
index 0000000..1ddf037
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/messages/__init__.pyc differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/messages/catalog.py b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/messages/catalog.py
new file mode 100644
index 0000000..8c807f8
--- /dev/null
+++ b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/messages/catalog.py
@@ -0,0 +1,820 @@
+# -*- coding: utf-8 -*-
+"""
+ babel.messages.catalog
+ ~~~~~~~~~~~~~~~~~~~~~~
+
+ Data structures for message catalogs.
+
+ :copyright: (c) 2013 by the Babel Team.
+ :license: BSD, see LICENSE for more details.
+"""
+
+import re
+import time
+
+from cgi import parse_header
+from datetime import datetime, time as time_
+from difflib import get_close_matches
+from email import message_from_string
+from copy import copy
+
+from babel import __version__ as VERSION
+from babel.core import Locale
+from babel.dates import format_datetime
+from babel.messages.plurals import get_plural
+from babel.util import odict, distinct, LOCALTZ, FixedOffsetTimezone
+from babel._compat import string_types, number_types, PY2, cmp
+
+__all__ = ['Message', 'Catalog', 'TranslationError']
+
+
+PYTHON_FORMAT = re.compile(r'''(?x)
+ \%
+ (?:\(([\w]*)\))?
+ (
+ [-#0\ +]?(?:\*|[\d]+)?
+ (?:\.(?:\*|[\d]+))?
+ [hlL]?
+ )
+ ([diouxXeEfFgGcrs%])
+''')
+
+
+def _parse_datetime_header(value):
+ match = re.match(r'^(?P.*?)(?P[+-]\d{4})?$', value)
+
+ tt = time.strptime(match.group('datetime'), '%Y-%m-%d %H:%M')
+ ts = time.mktime(tt)
+ dt = datetime.fromtimestamp(ts)
+
+ # Separate the offset into a sign component, hours, and # minutes
+ tzoffset = match.group('tzoffset')
+ if tzoffset is not None:
+ plus_minus_s, rest = tzoffset[0], tzoffset[1:]
+ hours_offset_s, mins_offset_s = rest[:2], rest[2:]
+
+ # Make them all integers
+ plus_minus = int(plus_minus_s + '1')
+ hours_offset = int(hours_offset_s)
+ mins_offset = int(mins_offset_s)
+
+ # Calculate net offset
+ net_mins_offset = hours_offset * 60
+ net_mins_offset += mins_offset
+ net_mins_offset *= plus_minus
+
+ # Create an offset object
+ tzoffset = FixedOffsetTimezone(net_mins_offset)
+
+ # Store the offset in a datetime object
+ dt = dt.replace(tzinfo=tzoffset)
+
+ return dt
+
+
+class Message(object):
+ """Representation of a single message in a catalog."""
+
+ def __init__(self, id, string=u'', locations=(), flags=(), auto_comments=(),
+ user_comments=(), previous_id=(), lineno=None, context=None):
+ """Create the message object.
+
+ :param id: the message ID, or a ``(singular, plural)`` tuple for
+ pluralizable messages
+ :param string: the translated message string, or a
+ ``(singular, plural)`` tuple for pluralizable messages
+ :param locations: a sequence of ``(filenname, lineno)`` tuples
+ :param flags: a set or sequence of flags
+ :param auto_comments: a sequence of automatic comments for the message
+ :param user_comments: a sequence of user comments for the message
+ :param previous_id: the previous message ID, or a ``(singular, plural)``
+ tuple for pluralizable messages
+ :param lineno: the line number on which the msgid line was found in the
+ PO file, if any
+ :param context: the message context
+ """
+ self.id = id
+ if not string and self.pluralizable:
+ string = (u'', u'')
+ self.string = string
+ self.locations = list(distinct(locations))
+ self.flags = set(flags)
+ if id and self.python_format:
+ self.flags.add('python-format')
+ else:
+ self.flags.discard('python-format')
+ self.auto_comments = list(distinct(auto_comments))
+ self.user_comments = list(distinct(user_comments))
+ if isinstance(previous_id, string_types):
+ self.previous_id = [previous_id]
+ else:
+ self.previous_id = list(previous_id)
+ self.lineno = lineno
+ self.context = context
+
+ def __repr__(self):
+ return '<%s %r (flags: %r)>' % (type(self).__name__, self.id,
+ list(self.flags))
+
+ def __cmp__(self, obj):
+ """Compare Messages, taking into account plural ids"""
+ def values_to_compare():
+ if isinstance(obj, Message):
+ plural = self.pluralizable
+ obj_plural = obj.pluralizable
+ if plural and obj_plural:
+ return self.id[0], obj.id[0]
+ elif plural:
+ return self.id[0], obj.id
+ elif obj_plural:
+ return self.id, obj.id[0]
+ return self.id, obj.id
+ this, other = values_to_compare()
+ return cmp(this, other)
+
+ def __gt__(self, other):
+ return self.__cmp__(other) > 0
+
+ def __lt__(self, other):
+ return self.__cmp__(other) < 0
+
+ def __ge__(self, other):
+ return self.__cmp__(other) >= 0
+
+ def __le__(self, other):
+ return self.__cmp__(other) <= 0
+
+ def __eq__(self, other):
+ return self.__cmp__(other) == 0
+
+ def __ne__(self, other):
+ return self.__cmp__(other) != 0
+
+ def clone(self):
+ return Message(*map(copy, (self.id, self.string, self.locations,
+ self.flags, self.auto_comments,
+ self.user_comments, self.previous_id,
+ self.lineno, self.context)))
+
+ def check(self, catalog=None):
+ """Run various validation checks on the message. Some validations
+ are only performed if the catalog is provided. This method returns
+ a sequence of `TranslationError` objects.
+
+ :rtype: ``iterator``
+ :param catalog: A catalog instance that is passed to the checkers
+ :see: `Catalog.check` for a way to perform checks for all messages
+ in a catalog.
+ """
+ from babel.messages.checkers import checkers
+ errors = []
+ for checker in checkers:
+ try:
+ checker(catalog, self)
+ except TranslationError as e:
+ errors.append(e)
+ return errors
+
+ @property
+ def fuzzy(self):
+ """Whether the translation is fuzzy.
+
+ >>> Message('foo').fuzzy
+ False
+ >>> msg = Message('foo', 'foo', flags=['fuzzy'])
+ >>> msg.fuzzy
+ True
+ >>> msg
+
+
+ :type: `bool`"""
+ return 'fuzzy' in self.flags
+
+ @property
+ def pluralizable(self):
+ """Whether the message is plurizable.
+
+ >>> Message('foo').pluralizable
+ False
+ >>> Message(('foo', 'bar')).pluralizable
+ True
+
+ :type: `bool`"""
+ return isinstance(self.id, (list, tuple))
+
+ @property
+ def python_format(self):
+ """Whether the message contains Python-style parameters.
+
+ >>> Message('foo %(name)s bar').python_format
+ True
+ >>> Message(('foo %(name)s', 'foo %(name)s')).python_format
+ True
+
+ :type: `bool`"""
+ ids = self.id
+ if not isinstance(ids, (list, tuple)):
+ ids = [ids]
+ return any(PYTHON_FORMAT.search(id) for id in ids)
+
+
+class TranslationError(Exception):
+ """Exception thrown by translation checkers when invalid message
+ translations are encountered."""
+
+
+DEFAULT_HEADER = u"""\
+# Translations template for PROJECT.
+# Copyright (C) YEAR ORGANIZATION
+# This file is distributed under the same license as the PROJECT project.
+# FIRST AUTHOR , YEAR.
+#"""
+
+
+if PY2:
+ def _parse_header(header_string):
+ # message_from_string only works for str, not for unicode
+ headers = message_from_string(header_string.encode('utf8'))
+ decoded_headers = {}
+ for name, value in headers.items():
+ name = name.decode('utf8')
+ value = value.decode('utf8')
+ decoded_headers[name] = value
+ return decoded_headers
+
+else:
+ _parse_header = message_from_string
+
+
+class Catalog(object):
+ """Representation of a message catalog."""
+
+ def __init__(self, locale=None, domain=None, header_comment=DEFAULT_HEADER,
+ project=None, version=None, copyright_holder=None,
+ msgid_bugs_address=None, creation_date=None,
+ revision_date=None, last_translator=None, language_team=None,
+ charset=None, fuzzy=True):
+ """Initialize the catalog object.
+
+ :param locale: the locale identifier or `Locale` object, or `None`
+ if the catalog is not bound to a locale (which basically
+ means it's a template)
+ :param domain: the message domain
+ :param header_comment: the header comment as string, or `None` for the
+ default header
+ :param project: the project's name
+ :param version: the project's version
+ :param copyright_holder: the copyright holder of the catalog
+ :param msgid_bugs_address: the email address or URL to submit bug
+ reports to
+ :param creation_date: the date the catalog was created
+ :param revision_date: the date the catalog was revised
+ :param last_translator: the name and email of the last translator
+ :param language_team: the name and email of the language team
+ :param charset: the encoding to use in the output (defaults to utf-8)
+ :param fuzzy: the fuzzy bit on the catalog header
+ """
+ self.domain = domain
+ if locale:
+ locale = Locale.parse(locale)
+ self.locale = locale
+ self._header_comment = header_comment
+ self._messages = odict()
+
+ self.project = project or 'PROJECT'
+ self.version = version or 'VERSION'
+ self.copyright_holder = copyright_holder or 'ORGANIZATION'
+ self.msgid_bugs_address = msgid_bugs_address or 'EMAIL@ADDRESS'
+
+ self.last_translator = last_translator or 'FULL NAME '
+ """Name and email address of the last translator."""
+ self.language_team = language_team or 'LANGUAGE '
+ """Name and email address of the language team."""
+
+ self.charset = charset or 'utf-8'
+
+ if creation_date is None:
+ creation_date = datetime.now(LOCALTZ)
+ elif isinstance(creation_date, datetime) and not creation_date.tzinfo:
+ creation_date = creation_date.replace(tzinfo=LOCALTZ)
+ self.creation_date = creation_date
+ if revision_date is None:
+ revision_date = 'YEAR-MO-DA HO:MI+ZONE'
+ elif isinstance(revision_date, datetime) and not revision_date.tzinfo:
+ revision_date = revision_date.replace(tzinfo=LOCALTZ)
+ self.revision_date = revision_date
+ self.fuzzy = fuzzy
+
+ self.obsolete = odict() # Dictionary of obsolete messages
+ self._num_plurals = None
+ self._plural_expr = None
+
+ def _get_header_comment(self):
+ comment = self._header_comment
+ year = datetime.now(LOCALTZ).strftime('%Y')
+ if hasattr(self.revision_date, 'strftime'):
+ year = self.revision_date.strftime('%Y')
+ comment = comment.replace('PROJECT', self.project) \
+ .replace('VERSION', self.version) \
+ .replace('YEAR', year) \
+ .replace('ORGANIZATION', self.copyright_holder)
+ if self.locale:
+ comment = comment.replace('Translations template', '%s translations'
+ % self.locale.english_name)
+ return comment
+
+ def _set_header_comment(self, string):
+ self._header_comment = string
+
+ header_comment = property(_get_header_comment, _set_header_comment, doc="""\
+ The header comment for the catalog.
+
+ >>> catalog = Catalog(project='Foobar', version='1.0',
+ ... copyright_holder='Foo Company')
+ >>> print(catalog.header_comment) #doctest: +ELLIPSIS
+ # Translations template for Foobar.
+ # Copyright (C) ... Foo Company
+ # This file is distributed under the same license as the Foobar project.
+ # FIRST AUTHOR , ....
+ #
+
+ The header can also be set from a string. Any known upper-case variables
+ will be replaced when the header is retrieved again:
+
+ >>> catalog = Catalog(project='Foobar', version='1.0',
+ ... copyright_holder='Foo Company')
+ >>> catalog.header_comment = '''\\
+ ... # The POT for my really cool PROJECT project.
+ ... # Copyright (C) 1990-2003 ORGANIZATION
+ ... # This file is distributed under the same license as the PROJECT
+ ... # project.
+ ... #'''
+ >>> print(catalog.header_comment)
+ # The POT for my really cool Foobar project.
+ # Copyright (C) 1990-2003 Foo Company
+ # This file is distributed under the same license as the Foobar
+ # project.
+ #
+
+ :type: `unicode`
+ """)
+
+ def _get_mime_headers(self):
+ headers = []
+ headers.append(('Project-Id-Version',
+ '%s %s' % (self.project, self.version)))
+ headers.append(('Report-Msgid-Bugs-To', self.msgid_bugs_address))
+ headers.append(('POT-Creation-Date',
+ format_datetime(self.creation_date, 'yyyy-MM-dd HH:mmZ',
+ locale='en')))
+ if isinstance(self.revision_date, (datetime, time_) + number_types):
+ headers.append(('PO-Revision-Date',
+ format_datetime(self.revision_date,
+ 'yyyy-MM-dd HH:mmZ', locale='en')))
+ else:
+ headers.append(('PO-Revision-Date', self.revision_date))
+ headers.append(('Last-Translator', self.last_translator))
+ if self.locale is not None:
+ headers.append(('Language', str(self.locale)))
+ if (self.locale is not None) and ('LANGUAGE' in self.language_team):
+ headers.append(('Language-Team',
+ self.language_team.replace('LANGUAGE',
+ str(self.locale))))
+ else:
+ headers.append(('Language-Team', self.language_team))
+ if self.locale is not None:
+ headers.append(('Plural-Forms', self.plural_forms))
+ headers.append(('MIME-Version', '1.0'))
+ headers.append(('Content-Type',
+ 'text/plain; charset=%s' % self.charset))
+ headers.append(('Content-Transfer-Encoding', '8bit'))
+ headers.append(('Generated-By', 'Babel %s\n' % VERSION))
+ return headers
+
+ def _set_mime_headers(self, headers):
+ for name, value in headers:
+ name = name.lower()
+ if name == 'project-id-version':
+ parts = value.split(' ')
+ self.project = u' '.join(parts[:-1])
+ self.version = parts[-1]
+ elif name == 'report-msgid-bugs-to':
+ self.msgid_bugs_address = value
+ elif name == 'last-translator':
+ self.last_translator = value
+ elif name == 'language-team':
+ self.language_team = value
+ elif name == 'content-type':
+ mimetype, params = parse_header(value)
+ if 'charset' in params:
+ self.charset = params['charset'].lower()
+ elif name == 'plural-forms':
+ _, params = parse_header(' ;' + value)
+ self._num_plurals = int(params.get('nplurals', 2))
+ self._plural_expr = params.get('plural', '(n != 1)')
+ elif name == 'pot-creation-date':
+ self.creation_date = _parse_datetime_header(value)
+ elif name == 'po-revision-date':
+ # Keep the value if it's not the default one
+ if 'YEAR' not in value:
+ self.revision_date = _parse_datetime_header(value)
+
+ mime_headers = property(_get_mime_headers, _set_mime_headers, doc="""\
+ The MIME headers of the catalog, used for the special ``msgid ""`` entry.
+
+ The behavior of this property changes slightly depending on whether a locale
+ is set or not, the latter indicating that the catalog is actually a template
+ for actual translations.
+
+ Here's an example of the output for such a catalog template:
+
+ >>> from babel.dates import UTC
+ >>> created = datetime(1990, 4, 1, 15, 30, tzinfo=UTC)
+ >>> catalog = Catalog(project='Foobar', version='1.0',
+ ... creation_date=created)
+ >>> for name, value in catalog.mime_headers:
+ ... print('%s: %s' % (name, value))
+ Project-Id-Version: Foobar 1.0
+ Report-Msgid-Bugs-To: EMAIL@ADDRESS
+ POT-Creation-Date: 1990-04-01 15:30+0000
+ PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE
+ Last-Translator: FULL NAME
+ Language-Team: LANGUAGE
+ MIME-Version: 1.0
+ Content-Type: text/plain; charset=utf-8
+ Content-Transfer-Encoding: 8bit
+ Generated-By: Babel ...
+
+ And here's an example of the output when the locale is set:
+
+ >>> revised = datetime(1990, 8, 3, 12, 0, tzinfo=UTC)
+ >>> catalog = Catalog(locale='de_DE', project='Foobar', version='1.0',
+ ... creation_date=created, revision_date=revised,
+ ... last_translator='John Doe ',
+ ... language_team='de_DE ')
+ >>> for name, value in catalog.mime_headers:
+ ... print('%s: %s' % (name, value))
+ Project-Id-Version: Foobar 1.0
+ Report-Msgid-Bugs-To: EMAIL@ADDRESS
+ POT-Creation-Date: 1990-04-01 15:30+0000
+ PO-Revision-Date: 1990-08-03 12:00+0000
+ Last-Translator: John Doe
+ Language: de_DE
+ Language-Team: de_DE
+ Plural-Forms: nplurals=2; plural=(n != 1)
+ MIME-Version: 1.0
+ Content-Type: text/plain; charset=utf-8
+ Content-Transfer-Encoding: 8bit
+ Generated-By: Babel ...
+
+ :type: `list`
+ """)
+
+ @property
+ def num_plurals(self):
+ """The number of plurals used by the catalog or locale.
+
+ >>> Catalog(locale='en').num_plurals
+ 2
+ >>> Catalog(locale='ga').num_plurals
+ 3
+
+ :type: `int`"""
+ if self._num_plurals is None:
+ num = 2
+ if self.locale:
+ num = get_plural(self.locale)[0]
+ self._num_plurals = num
+ return self._num_plurals
+
+ @property
+ def plural_expr(self):
+ """The plural expression used by the catalog or locale.
+
+ >>> Catalog(locale='en').plural_expr
+ '(n != 1)'
+ >>> Catalog(locale='ga').plural_expr
+ '(n==1 ? 0 : n==2 ? 1 : 2)'
+
+ :type: `string_types`"""
+ if self._plural_expr is None:
+ expr = '(n != 1)'
+ if self.locale:
+ expr = get_plural(self.locale)[1]
+ self._plural_expr = expr
+ return self._plural_expr
+
+ @property
+ def plural_forms(self):
+ """Return the plural forms declaration for the locale.
+
+ >>> Catalog(locale='en').plural_forms
+ 'nplurals=2; plural=(n != 1)'
+ >>> Catalog(locale='pt_BR').plural_forms
+ 'nplurals=2; plural=(n > 1)'
+
+ :type: `str`"""
+ return 'nplurals=%s; plural=%s' % (self.num_plurals, self.plural_expr)
+
+ def __contains__(self, id):
+ """Return whether the catalog has a message with the specified ID."""
+ return self._key_for(id) in self._messages
+
+ def __len__(self):
+ """The number of messages in the catalog.
+
+ This does not include the special ``msgid ""`` entry."""
+ return len(self._messages)
+
+ def __iter__(self):
+ """Iterates through all the entries in the catalog, in the order they
+ were added, yielding a `Message` object for every entry.
+
+ :rtype: ``iterator``"""
+ buf = []
+ for name, value in self.mime_headers:
+ buf.append('%s: %s' % (name, value))
+ flags = set()
+ if self.fuzzy:
+ flags |= set(['fuzzy'])
+ yield Message(u'', '\n'.join(buf), flags=flags)
+ for key in self._messages:
+ yield self._messages[key]
+
+ def __repr__(self):
+ locale = ''
+ if self.locale:
+ locale = ' %s' % self.locale
+ return '<%s %r%s>' % (type(self).__name__, self.domain, locale)
+
+ def __delitem__(self, id):
+ """Delete the message with the specified ID."""
+ self.delete(id)
+
+ def __getitem__(self, id):
+ """Return the message with the specified ID.
+
+ :param id: the message ID
+ """
+ return self.get(id)
+
+ def __setitem__(self, id, message):
+ """Add or update the message with the specified ID.
+
+ >>> catalog = Catalog()
+ >>> catalog[u'foo'] = Message(u'foo')
+ >>> catalog[u'foo']
+
+
+ If a message with that ID is already in the catalog, it is updated
+ to include the locations and flags of the new message.
+
+ >>> catalog = Catalog()
+ >>> catalog[u'foo'] = Message(u'foo', locations=[('main.py', 1)])
+ >>> catalog[u'foo'].locations
+ [('main.py', 1)]
+ >>> catalog[u'foo'] = Message(u'foo', locations=[('utils.py', 5)])
+ >>> catalog[u'foo'].locations
+ [('main.py', 1), ('utils.py', 5)]
+
+ :param id: the message ID
+ :param message: the `Message` object
+ """
+ assert isinstance(message, Message), 'expected a Message object'
+ key = self._key_for(id, message.context)
+ current = self._messages.get(key)
+ if current:
+ if message.pluralizable and not current.pluralizable:
+ # The new message adds pluralization
+ current.id = message.id
+ current.string = message.string
+ current.locations = list(distinct(current.locations +
+ message.locations))
+ current.auto_comments = list(distinct(current.auto_comments +
+ message.auto_comments))
+ current.user_comments = list(distinct(current.user_comments +
+ message.user_comments))
+ current.flags |= message.flags
+ message = current
+ elif id == '':
+ # special treatment for the header message
+ self.mime_headers = _parse_header(message.string).items()
+ self.header_comment = '\n'.join([('# %s' % c).rstrip() for c
+ in message.user_comments])
+ self.fuzzy = message.fuzzy
+ else:
+ if isinstance(id, (list, tuple)):
+ assert isinstance(message.string, (list, tuple)), \
+ 'Expected sequence but got %s' % type(message.string)
+ self._messages[key] = message
+
+ def add(self, id, string=None, locations=(), flags=(), auto_comments=(),
+ user_comments=(), previous_id=(), lineno=None, context=None):
+ """Add or update the message with the specified ID.
+
+ >>> catalog = Catalog()
+ >>> catalog.add(u'foo')
+
+ >>> catalog[u'foo']
+
+
+ This method simply constructs a `Message` object with the given
+ arguments and invokes `__setitem__` with that object.
+
+ :param id: the message ID, or a ``(singular, plural)`` tuple for
+ pluralizable messages
+ :param string: the translated message string, or a
+ ``(singular, plural)`` tuple for pluralizable messages
+ :param locations: a sequence of ``(filenname, lineno)`` tuples
+ :param flags: a set or sequence of flags
+ :param auto_comments: a sequence of automatic comments
+ :param user_comments: a sequence of user comments
+ :param previous_id: the previous message ID, or a ``(singular, plural)``
+ tuple for pluralizable messages
+ :param lineno: the line number on which the msgid line was found in the
+ PO file, if any
+ :param context: the message context
+ """
+ message = Message(id, string, list(locations), flags, auto_comments,
+ user_comments, previous_id, lineno=lineno,
+ context=context)
+ self[id] = message
+ return message
+
+ def check(self):
+ """Run various validation checks on the translations in the catalog.
+
+ For every message which fails validation, this method yield a
+ ``(message, errors)`` tuple, where ``message`` is the `Message` object
+ and ``errors`` is a sequence of `TranslationError` objects.
+
+ :rtype: ``iterator``
+ """
+ for message in self._messages.values():
+ errors = message.check(catalog=self)
+ if errors:
+ yield message, errors
+
+ def get(self, id, context=None):
+ """Return the message with the specified ID and context.
+
+ :param id: the message ID
+ :param context: the message context, or ``None`` for no context
+ """
+ return self._messages.get(self._key_for(id, context))
+
+ def delete(self, id, context=None):
+ """Delete the message with the specified ID and context.
+
+ :param id: the message ID
+ :param context: the message context, or ``None`` for no context
+ """
+ key = self._key_for(id, context)
+ if key in self._messages:
+ del self._messages[key]
+
+ def update(self, template, no_fuzzy_matching=False, update_header_comment=False):
+ """Update the catalog based on the given template catalog.
+
+ >>> from babel.messages import Catalog
+ >>> template = Catalog()
+ >>> template.add('green', locations=[('main.py', 99)])
+
+ >>> template.add('blue', locations=[('main.py', 100)])
+
+ >>> template.add(('salad', 'salads'), locations=[('util.py', 42)])
+
+ >>> catalog = Catalog(locale='de_DE')
+ >>> catalog.add('blue', u'blau', locations=[('main.py', 98)])
+
+ >>> catalog.add('head', u'Kopf', locations=[('util.py', 33)])
+
+ >>> catalog.add(('salad', 'salads'), (u'Salat', u'Salate'),
+ ... locations=[('util.py', 38)])
+
+
+ >>> catalog.update(template)
+ >>> len(catalog)
+ 3
+
+ >>> msg1 = catalog['green']
+ >>> msg1.string
+ >>> msg1.locations
+ [('main.py', 99)]
+
+ >>> msg2 = catalog['blue']
+ >>> msg2.string
+ u'blau'
+ >>> msg2.locations
+ [('main.py', 100)]
+
+ >>> msg3 = catalog['salad']
+ >>> msg3.string
+ (u'Salat', u'Salate')
+ >>> msg3.locations
+ [('util.py', 42)]
+
+ Messages that are in the catalog but not in the template are removed
+ from the main collection, but can still be accessed via the `obsolete`
+ member:
+
+ >>> 'head' in catalog
+ False
+ >>> list(catalog.obsolete.values())
+ []
+
+ :param template: the reference catalog, usually read from a POT file
+ :param no_fuzzy_matching: whether to use fuzzy matching of message IDs
+ """
+ messages = self._messages
+ remaining = messages.copy()
+ self._messages = odict()
+
+ # Prepare for fuzzy matching
+ fuzzy_candidates = []
+ if not no_fuzzy_matching:
+ fuzzy_candidates = dict([
+ (self._key_for(msgid), messages[msgid].context)
+ for msgid in messages if msgid and messages[msgid].string
+ ])
+ fuzzy_matches = set()
+
+ def _merge(message, oldkey, newkey):
+ message = message.clone()
+ fuzzy = False
+ if oldkey != newkey:
+ fuzzy = True
+ fuzzy_matches.add(oldkey)
+ oldmsg = messages.get(oldkey)
+ if isinstance(oldmsg.id, string_types):
+ message.previous_id = [oldmsg.id]
+ else:
+ message.previous_id = list(oldmsg.id)
+ else:
+ oldmsg = remaining.pop(oldkey, None)
+ message.string = oldmsg.string
+ if isinstance(message.id, (list, tuple)):
+ if not isinstance(message.string, (list, tuple)):
+ fuzzy = True
+ message.string = tuple(
+ [message.string] + ([u''] * (len(message.id) - 1))
+ )
+ elif len(message.string) != self.num_plurals:
+ fuzzy = True
+ message.string = tuple(message.string[:len(oldmsg.string)])
+ elif isinstance(message.string, (list, tuple)):
+ fuzzy = True
+ message.string = message.string[0]
+ message.flags |= oldmsg.flags
+ if fuzzy:
+ message.flags |= set([u'fuzzy'])
+ self[message.id] = message
+
+ for message in template:
+ if message.id:
+ key = self._key_for(message.id, message.context)
+ if key in messages:
+ _merge(message, key, key)
+ else:
+ if no_fuzzy_matching is False:
+ # do some fuzzy matching with difflib
+ if isinstance(key, tuple):
+ matchkey = key[0] # just the msgid, no context
+ else:
+ matchkey = key
+ matches = get_close_matches(matchkey.lower().strip(),
+ fuzzy_candidates.keys(), 1)
+ if matches:
+ newkey = matches[0]
+ newctxt = fuzzy_candidates[newkey]
+ if newctxt is not None:
+ newkey = newkey, newctxt
+ _merge(message, newkey, key)
+ continue
+
+ self[message.id] = message
+
+ for msgid in remaining:
+ if no_fuzzy_matching or msgid not in fuzzy_matches:
+ self.obsolete[msgid] = remaining[msgid]
+
+ if update_header_comment:
+ # Allow the updated catalog's header to be rewritten based on the
+ # template's header
+ self.header_comment = template.header_comment
+
+ # Make updated catalog's POT-Creation-Date equal to the template
+ # used to update the catalog
+ self.creation_date = template.creation_date
+
+ def _key_for(self, id, context=None):
+ """The key for a message is just the singular ID even for pluralizable
+ messages, but is a ``(msgid, msgctxt)`` tuple for context-specific
+ messages.
+ """
+ key = id
+ if isinstance(key, (list, tuple)):
+ key = id[0]
+ if context is not None:
+ key = (key, context)
+ return key
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/messages/catalog.pyc b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/messages/catalog.pyc
new file mode 100644
index 0000000..71d853a
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/messages/catalog.pyc differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/messages/checkers.py b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/messages/checkers.py
new file mode 100644
index 0000000..24ecdcf
--- /dev/null
+++ b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/messages/checkers.py
@@ -0,0 +1,173 @@
+# -*- coding: utf-8 -*-
+"""
+ babel.messages.checkers
+ ~~~~~~~~~~~~~~~~~~~~~~~
+
+ Various routines that help with validation of translations.
+
+ :since: version 0.9
+
+ :copyright: (c) 2013 by the Babel Team.
+ :license: BSD, see LICENSE for more details.
+"""
+
+from babel.messages.catalog import TranslationError, PYTHON_FORMAT
+from babel._compat import string_types, izip
+
+
+#: list of format chars that are compatible to each other
+_string_format_compatibilities = [
+ set(['i', 'd', 'u']),
+ set(['x', 'X']),
+ set(['f', 'F', 'g', 'G'])
+]
+
+
+def num_plurals(catalog, message):
+ """Verify the number of plurals in the translation."""
+ if not message.pluralizable:
+ if not isinstance(message.string, string_types):
+ raise TranslationError("Found plural forms for non-pluralizable "
+ "message")
+ return
+
+ # skip further tests if no catalog is provided.
+ elif catalog is None:
+ return
+
+ msgstrs = message.string
+ if not isinstance(msgstrs, (list, tuple)):
+ msgstrs = (msgstrs,)
+ if len(msgstrs) != catalog.num_plurals:
+ raise TranslationError("Wrong number of plural forms (expected %d)" %
+ catalog.num_plurals)
+
+
+def python_format(catalog, message):
+ """Verify the format string placeholders in the translation."""
+ if 'python-format' not in message.flags:
+ return
+ msgids = message.id
+ if not isinstance(msgids, (list, tuple)):
+ msgids = (msgids,)
+ msgstrs = message.string
+ if not isinstance(msgstrs, (list, tuple)):
+ msgstrs = (msgstrs,)
+
+ for msgid, msgstr in izip(msgids, msgstrs):
+ if msgstr:
+ _validate_format(msgid, msgstr)
+
+
+def _validate_format(format, alternative):
+ """Test format string `alternative` against `format`. `format` can be the
+ msgid of a message and `alternative` one of the `msgstr`\s. The two
+ arguments are not interchangeable as `alternative` may contain less
+ placeholders if `format` uses named placeholders.
+
+ The behavior of this function is undefined if the string does not use
+ string formattings.
+
+ If the string formatting of `alternative` is compatible to `format` the
+ function returns `None`, otherwise a `TranslationError` is raised.
+
+ Examples for compatible format strings:
+
+ >>> _validate_format('Hello %s!', 'Hallo %s!')
+ >>> _validate_format('Hello %i!', 'Hallo %d!')
+
+ Example for an incompatible format strings:
+
+ >>> _validate_format('Hello %(name)s!', 'Hallo %s!')
+ Traceback (most recent call last):
+ ...
+ TranslationError: the format strings are of different kinds
+
+ This function is used by the `python_format` checker.
+
+ :param format: The original format string
+ :param alternative: The alternative format string that should be checked
+ against format
+ :raises TranslationError: on formatting errors
+ """
+
+ def _parse(string):
+ result = []
+ for match in PYTHON_FORMAT.finditer(string):
+ name, format, typechar = match.groups()
+ if typechar == '%' and name is None:
+ continue
+ result.append((name, str(typechar)))
+ return result
+
+ def _compatible(a, b):
+ if a == b:
+ return True
+ for set in _string_format_compatibilities:
+ if a in set and b in set:
+ return True
+ return False
+
+ def _check_positional(results):
+ positional = None
+ for name, char in results:
+ if positional is None:
+ positional = name is None
+ else:
+ if (name is None) != positional:
+ raise TranslationError('format string mixes positional '
+ 'and named placeholders')
+ return bool(positional)
+
+ a, b = map(_parse, (format, alternative))
+
+ # now check if both strings are positional or named
+ a_positional, b_positional = map(_check_positional, (a, b))
+ if a_positional and not b_positional and not b:
+ raise TranslationError('placeholders are incompatible')
+ elif a_positional != b_positional:
+ raise TranslationError('the format strings are of different kinds')
+
+ # if we are operating on positional strings both must have the
+ # same number of format chars and those must be compatible
+ if a_positional:
+ if len(a) != len(b):
+ raise TranslationError('positional format placeholders are '
+ 'unbalanced')
+ for idx, ((_, first), (_, second)) in enumerate(izip(a, b)):
+ if not _compatible(first, second):
+ raise TranslationError('incompatible format for placeholder '
+ '%d: %r and %r are not compatible' %
+ (idx + 1, first, second))
+
+ # otherwise the second string must not have names the first one
+ # doesn't have and the types of those included must be compatible
+ else:
+ type_map = dict(a)
+ for name, typechar in b:
+ if name not in type_map:
+ raise TranslationError('unknown named placeholder %r' % name)
+ elif not _compatible(typechar, type_map[name]):
+ raise TranslationError('incompatible format for '
+ 'placeholder %r: '
+ '%r and %r are not compatible' %
+ (name, typechar, type_map[name]))
+
+
+def _find_checkers():
+ checkers = []
+ try:
+ from pkg_resources import working_set
+ except ImportError:
+ pass
+ else:
+ for entry_point in working_set.iter_entry_points('babel.checkers'):
+ checkers.append(entry_point.load())
+ if len(checkers) == 0:
+ # if pkg_resources is not available or no usable egg-info was found
+ # (see #230), just resort to hard-coded checkers
+ return [num_plurals, python_format]
+ return checkers
+
+
+checkers = _find_checkers()
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/messages/checkers.pyc b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/messages/checkers.pyc
new file mode 100644
index 0000000..40fd937
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/messages/checkers.pyc differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/messages/extract.py b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/messages/extract.py
new file mode 100644
index 0000000..7162627
--- /dev/null
+++ b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/messages/extract.py
@@ -0,0 +1,632 @@
+# -*- coding: utf-8 -*-
+"""
+ babel.messages.extract
+ ~~~~~~~~~~~~~~~~~~~~~~
+
+ Basic infrastructure for extracting localizable messages from source files.
+
+ This module defines an extensible system for collecting localizable message
+ strings from a variety of sources. A native extractor for Python source
+ files is builtin, extractors for other sources can be added using very
+ simple plugins.
+
+ The main entry points into the extraction functionality are the functions
+ `extract_from_dir` and `extract_from_file`.
+
+ :copyright: (c) 2013 by the Babel Team.
+ :license: BSD, see LICENSE for more details.
+"""
+
+import os
+from os.path import relpath
+import sys
+from tokenize import generate_tokens, COMMENT, NAME, OP, STRING
+
+from babel.util import parse_encoding, pathmatch
+from babel._compat import PY2, text_type
+from textwrap import dedent
+
+
+GROUP_NAME = 'babel.extractors'
+
+DEFAULT_KEYWORDS = {
+ '_': None,
+ 'gettext': None,
+ 'ngettext': (1, 2),
+ 'ugettext': None,
+ 'ungettext': (1, 2),
+ 'dgettext': (2,),
+ 'dngettext': (2, 3),
+ 'N_': None,
+ 'pgettext': ((1, 'c'), 2),
+ 'npgettext': ((1, 'c'), 2, 3)
+}
+
+DEFAULT_MAPPING = [('**.py', 'python')]
+
+empty_msgid_warning = (
+ '%s: warning: Empty msgid. It is reserved by GNU gettext: gettext("") '
+ 'returns the header entry with meta information, not the empty string.')
+
+
+def _strip_comment_tags(comments, tags):
+ """Helper function for `extract` that strips comment tags from strings
+ in a list of comment lines. This functions operates in-place.
+ """
+ def _strip(line):
+ for tag in tags:
+ if line.startswith(tag):
+ return line[len(tag):].strip()
+ return line
+ comments[:] = map(_strip, comments)
+
+
+def extract_from_dir(dirname=None, method_map=DEFAULT_MAPPING,
+ options_map=None, keywords=DEFAULT_KEYWORDS,
+ comment_tags=(), callback=None, strip_comment_tags=False):
+ """Extract messages from any source files found in the given directory.
+
+ This function generates tuples of the form ``(filename, lineno, message,
+ comments, context)``.
+
+ Which extraction method is used per file is determined by the `method_map`
+ parameter, which maps extended glob patterns to extraction method names.
+ For example, the following is the default mapping:
+
+ >>> method_map = [
+ ... ('**.py', 'python')
+ ... ]
+
+ This basically says that files with the filename extension ".py" at any
+ level inside the directory should be processed by the "python" extraction
+ method. Files that don't match any of the mapping patterns are ignored. See
+ the documentation of the `pathmatch` function for details on the pattern
+ syntax.
+
+ The following extended mapping would also use the "genshi" extraction
+ method on any file in "templates" subdirectory:
+
+ >>> method_map = [
+ ... ('**/templates/**.*', 'genshi'),
+ ... ('**.py', 'python')
+ ... ]
+
+ The dictionary provided by the optional `options_map` parameter augments
+ these mappings. It uses extended glob patterns as keys, and the values are
+ dictionaries mapping options names to option values (both strings).
+
+ The glob patterns of the `options_map` do not necessarily need to be the
+ same as those used in the method mapping. For example, while all files in
+ the ``templates`` folders in an application may be Genshi applications, the
+ options for those files may differ based on extension:
+
+ >>> options_map = {
+ ... '**/templates/**.txt': {
+ ... 'template_class': 'genshi.template:TextTemplate',
+ ... 'encoding': 'latin-1'
+ ... },
+ ... '**/templates/**.html': {
+ ... 'include_attrs': ''
+ ... }
+ ... }
+
+ :param dirname: the path to the directory to extract messages from. If
+ not given the current working directory is used.
+ :param method_map: a list of ``(pattern, method)`` tuples that maps of
+ extraction method names to extended glob patterns
+ :param options_map: a dictionary of additional options (optional)
+ :param keywords: a dictionary mapping keywords (i.e. names of functions
+ that should be recognized as translation functions) to
+ tuples that specify which of their arguments contain
+ localizable strings
+ :param comment_tags: a list of tags of translator comments to search for
+ and include in the results
+ :param callback: a function that is called for every file that message are
+ extracted from, just before the extraction itself is
+ performed; the function is passed the filename, the name
+ of the extraction method and and the options dictionary as
+ positional arguments, in that order
+ :param strip_comment_tags: a flag that if set to `True` causes all comment
+ tags to be removed from the collected comments.
+ :see: `pathmatch`
+ """
+ if dirname is None:
+ dirname = os.getcwd()
+ if options_map is None:
+ options_map = {}
+
+ absname = os.path.abspath(dirname)
+ for root, dirnames, filenames in os.walk(absname):
+ for subdir in dirnames:
+ if subdir.startswith('.') or subdir.startswith('_'):
+ dirnames.remove(subdir)
+ dirnames.sort()
+ filenames.sort()
+ for filename in filenames:
+ filepath = os.path.join(root, filename).replace(os.sep, '/')
+
+ for message_tuple in check_and_call_extract_file(
+ filepath,
+ method_map,
+ options_map,
+ callback,
+ keywords,
+ comment_tags,
+ strip_comment_tags,
+ dirpath=absname,
+ ):
+ yield message_tuple
+
+
+def check_and_call_extract_file(filepath, method_map, options_map,
+ callback, keywords, comment_tags,
+ strip_comment_tags, dirpath=None):
+ """Checks if the given file matches an extraction method mapping, and if so, calls extract_from_file.
+
+ Note that the extraction method mappings are based relative to dirpath.
+ So, given an absolute path to a file `filepath`, we want to check using
+ just the relative path from `dirpath` to `filepath`.
+
+ :param filepath: An absolute path to a file that exists.
+ :param method_map: a list of ``(pattern, method)`` tuples that maps of
+ extraction method names to extended glob patterns
+ :param options_map: a dictionary of additional options (optional)
+ :param callback: a function that is called for every file that message are
+ extracted from, just before the extraction itself is
+ performed; the function is passed the filename, the name
+ of the extraction method and and the options dictionary as
+ positional arguments, in that order
+ :param keywords: a dictionary mapping keywords (i.e. names of functions
+ that should be recognized as translation functions) to
+ tuples that specify which of their arguments contain
+ localizable strings
+ :param comment_tags: a list of tags of translator comments to search for
+ and include in the results
+ :param strip_comment_tags: a flag that if set to `True` causes all comment
+ tags to be removed from the collected comments.
+ :param dirpath: the path to the directory to extract messages from.
+ """
+ # filename is the relative path from dirpath to the actual file
+ filename = relpath(filepath, dirpath)
+
+ for pattern, method in method_map:
+ if not pathmatch(pattern, filename):
+ continue
+
+ options = {}
+ for opattern, odict in options_map.items():
+ if pathmatch(opattern, filename):
+ options = odict
+ if callback:
+ callback(filename, method, options)
+ for message_tuple in extract_from_file(
+ method, filepath,
+ keywords=keywords,
+ comment_tags=comment_tags,
+ options=options,
+ strip_comment_tags=strip_comment_tags
+ ):
+ yield (filename, ) + message_tuple
+
+ break
+
+
+def extract_from_file(method, filename, keywords=DEFAULT_KEYWORDS,
+ comment_tags=(), options=None, strip_comment_tags=False):
+ """Extract messages from a specific file.
+
+ This function returns a list of tuples of the form ``(lineno, funcname,
+ message)``.
+
+ :param filename: the path to the file to extract messages from
+ :param method: a string specifying the extraction method (.e.g. "python")
+ :param keywords: a dictionary mapping keywords (i.e. names of functions
+ that should be recognized as translation functions) to
+ tuples that specify which of their arguments contain
+ localizable strings
+ :param comment_tags: a list of translator tags to search for and include
+ in the results
+ :param strip_comment_tags: a flag that if set to `True` causes all comment
+ tags to be removed from the collected comments.
+ :param options: a dictionary of additional options (optional)
+ """
+ fileobj = open(filename, 'rb')
+ try:
+ return list(extract(method, fileobj, keywords, comment_tags, options,
+ strip_comment_tags))
+ finally:
+ fileobj.close()
+
+
+def extract(method, fileobj, keywords=DEFAULT_KEYWORDS, comment_tags=(),
+ options=None, strip_comment_tags=False):
+ """Extract messages from the given file-like object using the specified
+ extraction method.
+
+ This function returns tuples of the form ``(lineno, message, comments)``.
+
+ The implementation dispatches the actual extraction to plugins, based on the
+ value of the ``method`` parameter.
+
+ >>> source = b'''# foo module
+ ... def run(argv):
+ ... print(_('Hello, world!'))
+ ... '''
+
+ >>> from babel._compat import BytesIO
+ >>> for message in extract('python', BytesIO(source)):
+ ... print(message)
+ (3, u'Hello, world!', [], None)
+
+ :param method: an extraction method (a callable), or
+ a string specifying the extraction method (.e.g. "python");
+ if this is a simple name, the extraction function will be
+ looked up by entry point; if it is an explicit reference
+ to a function (of the form ``package.module:funcname`` or
+ ``package.module.funcname``), the corresponding function
+ will be imported and used
+ :param fileobj: the file-like object the messages should be extracted from
+ :param keywords: a dictionary mapping keywords (i.e. names of functions
+ that should be recognized as translation functions) to
+ tuples that specify which of their arguments contain
+ localizable strings
+ :param comment_tags: a list of translator tags to search for and include
+ in the results
+ :param options: a dictionary of additional options (optional)
+ :param strip_comment_tags: a flag that if set to `True` causes all comment
+ tags to be removed from the collected comments.
+ :raise ValueError: if the extraction method is not registered
+ """
+ func = None
+ if callable(method):
+ func = method
+ elif ':' in method or '.' in method:
+ if ':' not in method:
+ lastdot = method.rfind('.')
+ module, attrname = method[:lastdot], method[lastdot + 1:]
+ else:
+ module, attrname = method.split(':', 1)
+ func = getattr(__import__(module, {}, {}, [attrname]), attrname)
+ else:
+ try:
+ from pkg_resources import working_set
+ except ImportError:
+ pass
+ else:
+ for entry_point in working_set.iter_entry_points(GROUP_NAME,
+ method):
+ func = entry_point.load(require=True)
+ break
+ if func is None:
+ # if pkg_resources is not available or no usable egg-info was found
+ # (see #230), we resort to looking up the builtin extractors
+ # directly
+ builtin = {
+ 'ignore': extract_nothing,
+ 'python': extract_python,
+ 'javascript': extract_javascript
+ }
+ func = builtin.get(method)
+
+ if func is None:
+ raise ValueError('Unknown extraction method %r' % method)
+
+ results = func(fileobj, keywords.keys(), comment_tags,
+ options=options or {})
+
+ for lineno, funcname, messages, comments in results:
+ if funcname:
+ spec = keywords[funcname] or (1,)
+ else:
+ spec = (1,)
+ if not isinstance(messages, (list, tuple)):
+ messages = [messages]
+ if not messages:
+ continue
+
+ # Validate the messages against the keyword's specification
+ context = None
+ msgs = []
+ invalid = False
+ # last_index is 1 based like the keyword spec
+ last_index = len(messages)
+ for index in spec:
+ if isinstance(index, tuple):
+ context = messages[index[0] - 1]
+ continue
+ if last_index < index:
+ # Not enough arguments
+ invalid = True
+ break
+ message = messages[index - 1]
+ if message is None:
+ invalid = True
+ break
+ msgs.append(message)
+ if invalid:
+ continue
+
+ # keyword spec indexes are 1 based, therefore '-1'
+ if isinstance(spec[0], tuple):
+ # context-aware *gettext method
+ first_msg_index = spec[1] - 1
+ else:
+ first_msg_index = spec[0] - 1
+ if not messages[first_msg_index]:
+ # An empty string msgid isn't valid, emit a warning
+ where = '%s:%i' % (hasattr(fileobj, 'name') and
+ fileobj.name or '(unknown)', lineno)
+ sys.stderr.write((empty_msgid_warning % where) + '\n')
+ continue
+
+ messages = tuple(msgs)
+ if len(messages) == 1:
+ messages = messages[0]
+
+ if strip_comment_tags:
+ _strip_comment_tags(comments, comment_tags)
+ yield lineno, messages, comments, context
+
+
+def extract_nothing(fileobj, keywords, comment_tags, options):
+ """Pseudo extractor that does not actually extract anything, but simply
+ returns an empty list.
+ """
+ return []
+
+
+def extract_python(fileobj, keywords, comment_tags, options):
+ """Extract messages from Python source code.
+
+ It returns an iterator yielding tuples in the following form ``(lineno,
+ funcname, message, comments)``.
+
+ :param fileobj: the seekable, file-like object the messages should be
+ extracted from
+ :param keywords: a list of keywords (i.e. function names) that should be
+ recognized as translation functions
+ :param comment_tags: a list of translator tags to search for and include
+ in the results
+ :param options: a dictionary of additional options (optional)
+ :rtype: ``iterator``
+ """
+ funcname = lineno = message_lineno = None
+ call_stack = -1
+ buf = []
+ messages = []
+ translator_comments = []
+ in_def = in_translator_comments = False
+ comment_tag = None
+
+ encoding = parse_encoding(fileobj) or options.get('encoding', 'iso-8859-1')
+
+ if PY2:
+ next_line = fileobj.readline
+ else:
+ next_line = lambda: fileobj.readline().decode(encoding)
+
+ tokens = generate_tokens(next_line)
+ for tok, value, (lineno, _), _, _ in tokens:
+ if call_stack == -1 and tok == NAME and value in ('def', 'class'):
+ in_def = True
+ elif tok == OP and value == '(':
+ if in_def:
+ # Avoid false positives for declarations such as:
+ # def gettext(arg='message'):
+ in_def = False
+ continue
+ if funcname:
+ message_lineno = lineno
+ call_stack += 1
+ elif in_def and tok == OP and value == ':':
+ # End of a class definition without parens
+ in_def = False
+ continue
+ elif call_stack == -1 and tok == COMMENT:
+ # Strip the comment token from the line
+ if PY2:
+ value = value.decode(encoding)
+ value = value[1:].strip()
+ if in_translator_comments and \
+ translator_comments[-1][0] == lineno - 1:
+ # We're already inside a translator comment, continue appending
+ translator_comments.append((lineno, value))
+ continue
+ # If execution reaches this point, let's see if comment line
+ # starts with one of the comment tags
+ for comment_tag in comment_tags:
+ if value.startswith(comment_tag):
+ in_translator_comments = True
+ translator_comments.append((lineno, value))
+ break
+ elif funcname and call_stack == 0:
+ if tok == OP and value == ')':
+ if buf:
+ messages.append(''.join(buf))
+ del buf[:]
+ else:
+ messages.append(None)
+
+ if len(messages) > 1:
+ messages = tuple(messages)
+ else:
+ messages = messages[0]
+ # Comments don't apply unless they immediately preceed the
+ # message
+ if translator_comments and \
+ translator_comments[-1][0] < message_lineno - 1:
+ translator_comments = []
+
+ yield (message_lineno, funcname, messages,
+ [comment[1] for comment in translator_comments])
+
+ funcname = lineno = message_lineno = None
+ call_stack = -1
+ messages = []
+ translator_comments = []
+ in_translator_comments = False
+ elif tok == STRING:
+ # Unwrap quotes in a safe manner, maintaining the string's
+ # encoding
+ # https://sourceforge.net/tracker/?func=detail&atid=355470&
+ # aid=617979&group_id=5470
+ value = eval('# coding=%s\n%s' % (str(encoding), value),
+ {'__builtins__': {}}, {})
+ if PY2 and not isinstance(value, text_type):
+ value = value.decode(encoding)
+ buf.append(value)
+ elif tok == OP and value == ',':
+ if buf:
+ messages.append(''.join(buf))
+ del buf[:]
+ else:
+ messages.append(None)
+ if translator_comments:
+ # We have translator comments, and since we're on a
+ # comma(,) user is allowed to break into a new line
+ # Let's increase the last comment's lineno in order
+ # for the comment to still be a valid one
+ old_lineno, old_comment = translator_comments.pop()
+ translator_comments.append((old_lineno + 1, old_comment))
+ elif call_stack > 0 and tok == OP and value == ')':
+ call_stack -= 1
+ elif funcname and call_stack == -1:
+ funcname = None
+ elif tok == NAME and value in keywords:
+ funcname = value
+
+
+def extract_javascript(fileobj, keywords, comment_tags, options):
+ """Extract messages from JavaScript source code.
+
+ :param fileobj: the seekable, file-like object the messages should be
+ extracted from
+ :param keywords: a list of keywords (i.e. function names) that should be
+ recognized as translation functions
+ :param comment_tags: a list of translator tags to search for and include
+ in the results
+ :param options: a dictionary of additional options (optional)
+ Supported options are:
+ * `jsx` -- set to false to disable JSX/E4X support.
+ * `template_string` -- set to false to disable ES6
+ template string support.
+ """
+ from babel.messages.jslexer import Token, tokenize, unquote_string
+ funcname = message_lineno = None
+ messages = []
+ last_argument = None
+ translator_comments = []
+ concatenate_next = False
+ encoding = options.get('encoding', 'utf-8')
+ last_token = None
+ call_stack = -1
+ dotted = any('.' in kw for kw in keywords)
+
+ for token in tokenize(
+ fileobj.read().decode(encoding),
+ jsx=options.get("jsx", True),
+ template_string=options.get("template_string", True),
+ dotted=dotted
+ ):
+ if ( # Turn keyword`foo` expressions into keyword("foo") calls:
+ funcname and # have a keyword...
+ (last_token and last_token.type == 'name') and # we've seen nothing after the keyword...
+ token.type == 'template_string' # this is a template string
+ ):
+ message_lineno = token.lineno
+ messages = [unquote_string(token.value)]
+ call_stack = 0
+ token = Token('operator', ')', token.lineno)
+
+ if token.type == 'operator' and token.value == '(':
+ if funcname:
+ message_lineno = token.lineno
+ call_stack += 1
+
+ elif call_stack == -1 and token.type == 'linecomment':
+ value = token.value[2:].strip()
+ if translator_comments and \
+ translator_comments[-1][0] == token.lineno - 1:
+ translator_comments.append((token.lineno, value))
+ continue
+
+ for comment_tag in comment_tags:
+ if value.startswith(comment_tag):
+ translator_comments.append((token.lineno, value.strip()))
+ break
+
+ elif token.type == 'multilinecomment':
+ # only one multi-line comment may preceed a translation
+ translator_comments = []
+ value = token.value[2:-2].strip()
+ for comment_tag in comment_tags:
+ if value.startswith(comment_tag):
+ lines = value.splitlines()
+ if lines:
+ lines[0] = lines[0].strip()
+ lines[1:] = dedent('\n'.join(lines[1:])).splitlines()
+ for offset, line in enumerate(lines):
+ translator_comments.append((token.lineno + offset,
+ line))
+ break
+
+ elif funcname and call_stack == 0:
+ if token.type == 'operator' and token.value == ')':
+ if last_argument is not None:
+ messages.append(last_argument)
+ if len(messages) > 1:
+ messages = tuple(messages)
+ elif messages:
+ messages = messages[0]
+ else:
+ messages = None
+
+ # Comments don't apply unless they immediately precede the
+ # message
+ if translator_comments and \
+ translator_comments[-1][0] < message_lineno - 1:
+ translator_comments = []
+
+ if messages is not None:
+ yield (message_lineno, funcname, messages,
+ [comment[1] for comment in translator_comments])
+
+ funcname = message_lineno = last_argument = None
+ concatenate_next = False
+ translator_comments = []
+ messages = []
+ call_stack = -1
+
+ elif token.type in ('string', 'template_string'):
+ new_value = unquote_string(token.value)
+ if concatenate_next:
+ last_argument = (last_argument or '') + new_value
+ concatenate_next = False
+ else:
+ last_argument = new_value
+
+ elif token.type == 'operator':
+ if token.value == ',':
+ if last_argument is not None:
+ messages.append(last_argument)
+ last_argument = None
+ else:
+ messages.append(None)
+ concatenate_next = False
+ elif token.value == '+':
+ concatenate_next = True
+
+ elif call_stack > 0 and token.type == 'operator' \
+ and token.value == ')':
+ call_stack -= 1
+
+ elif funcname and call_stack == -1:
+ funcname = None
+
+ elif call_stack == -1 and token.type == 'name' and \
+ token.value in keywords and \
+ (last_token is None or last_token.type != 'name' or
+ last_token.value != 'function'):
+ funcname = token.value
+
+ last_token = token
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/messages/extract.pyc b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/messages/extract.pyc
new file mode 100644
index 0000000..9307720
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/messages/extract.pyc differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/messages/frontend.py b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/messages/frontend.py
new file mode 100644
index 0000000..d190a2c
--- /dev/null
+++ b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/messages/frontend.py
@@ -0,0 +1,1018 @@
+# -*- coding: utf-8 -*-
+"""
+ babel.messages.frontend
+ ~~~~~~~~~~~~~~~~~~~~~~~
+
+ Frontends for the message extraction functionality.
+
+ :copyright: (c) 2013 by the Babel Team.
+ :license: BSD, see LICENSE for more details.
+"""
+from __future__ import print_function
+
+import logging
+import optparse
+import os
+import re
+import shutil
+import sys
+import tempfile
+from datetime import datetime
+from locale import getpreferredencoding
+
+from babel import __version__ as VERSION
+from babel import Locale, localedata
+from babel._compat import StringIO, string_types, text_type
+from babel.core import UnknownLocaleError
+from babel.messages.catalog import Catalog
+from babel.messages.extract import DEFAULT_KEYWORDS, DEFAULT_MAPPING, check_and_call_extract_file, extract_from_dir
+from babel.messages.mofile import write_mo
+from babel.messages.pofile import read_po, write_po
+from babel.util import LOCALTZ, odict
+from distutils import log as distutils_log
+from distutils.cmd import Command as _Command
+from distutils.errors import DistutilsOptionError, DistutilsSetupError
+
+try:
+ from ConfigParser import RawConfigParser
+except ImportError:
+ from configparser import RawConfigParser
+
+
+def listify_value(arg, split=None):
+ """
+ Make a list out of an argument.
+
+ Values from `distutils` argument parsing are always single strings;
+ values from `optparse` parsing may be lists of strings that may need
+ to be further split.
+
+ No matter the input, this function returns a flat list of whitespace-trimmed
+ strings, with `None` values filtered out.
+
+ >>> listify_value("foo bar")
+ ['foo', 'bar']
+ >>> listify_value(["foo bar"])
+ ['foo', 'bar']
+ >>> listify_value([["foo"], "bar"])
+ ['foo', 'bar']
+ >>> listify_value([["foo"], ["bar", None, "foo"]])
+ ['foo', 'bar', 'foo']
+ >>> listify_value("foo, bar, quux", ",")
+ ['foo', 'bar', 'quux']
+
+ :param arg: A string or a list of strings
+ :param split: The argument to pass to `str.split()`.
+ :return:
+ """
+ out = []
+
+ if not isinstance(arg, (list, tuple)):
+ arg = [arg]
+
+ for val in arg:
+ if val is None:
+ continue
+ if isinstance(val, (list, tuple)):
+ out.extend(listify_value(val, split=split))
+ continue
+ out.extend(s.strip() for s in text_type(val).split(split))
+ assert all(isinstance(val, string_types) for val in out)
+ return out
+
+
+class Command(_Command):
+ # This class is a small shim between Distutils commands and
+ # optparse option parsing in the frontend command line.
+
+ #: Option name to be input as `args` on the script command line.
+ as_args = None
+
+ #: Options which allow multiple values.
+ #: This is used by the `optparse` transmogrification code.
+ multiple_value_options = ()
+
+ #: Options which are booleans.
+ #: This is used by the `optparse` transmogrification code.
+ # (This is actually used by distutils code too, but is never
+ # declared in the base class.)
+ boolean_options = ()
+
+ #: Option aliases, to retain standalone command compatibility.
+ #: Distutils does not support option aliases, but optparse does.
+ #: This maps the distutils argument name to an iterable of aliases
+ #: that are usable with optparse.
+ option_aliases = {}
+
+ #: Log object. To allow replacement in the script command line runner.
+ log = distutils_log
+
+ def __init__(self, dist=None):
+ # A less strict version of distutils' `__init__`.
+ self.distribution = dist
+ self.initialize_options()
+ self._dry_run = None
+ self.verbose = False
+ self.force = None
+ self.help = 0
+ self.finalized = 0
+
+
+class compile_catalog(Command):
+ """Catalog compilation command for use in ``setup.py`` scripts.
+
+ If correctly installed, this command is available to Setuptools-using
+ setup scripts automatically. For projects using plain old ``distutils``,
+ the command needs to be registered explicitly in ``setup.py``::
+
+ from babel.messages.frontend import compile_catalog
+
+ setup(
+ ...
+ cmdclass = {'compile_catalog': compile_catalog}
+ )
+
+ .. versionadded:: 0.9
+ """
+
+ description = 'compile message catalogs to binary MO files'
+ user_options = [
+ ('domain=', 'D',
+ "domains of PO files (space separated list, default 'messages')"),
+ ('directory=', 'd',
+ 'path to base directory containing the catalogs'),
+ ('input-file=', 'i',
+ 'name of the input file'),
+ ('output-file=', 'o',
+ "name of the output file (default "
+ "'//LC_MESSAGES/.mo')"),
+ ('locale=', 'l',
+ 'locale of the catalog to compile'),
+ ('use-fuzzy', 'f',
+ 'also include fuzzy translations'),
+ ('statistics', None,
+ 'print statistics about translations')
+ ]
+ boolean_options = ['use-fuzzy', 'statistics']
+
+ def initialize_options(self):
+ self.domain = 'messages'
+ self.directory = None
+ self.input_file = None
+ self.output_file = None
+ self.locale = None
+ self.use_fuzzy = False
+ self.statistics = False
+
+ def finalize_options(self):
+ self.domain = listify_value(self.domain)
+ if not self.input_file and not self.directory:
+ raise DistutilsOptionError('you must specify either the input file '
+ 'or the base directory')
+ if not self.output_file and not self.directory:
+ raise DistutilsOptionError('you must specify either the output file '
+ 'or the base directory')
+
+ def run(self):
+ for domain in self.domain:
+ self._run_domain(domain)
+
+ def _run_domain(self, domain):
+ po_files = []
+ mo_files = []
+
+ if not self.input_file:
+ if self.locale:
+ po_files.append((self.locale,
+ os.path.join(self.directory, self.locale,
+ 'LC_MESSAGES',
+ domain + '.po')))
+ mo_files.append(os.path.join(self.directory, self.locale,
+ 'LC_MESSAGES',
+ domain + '.mo'))
+ else:
+ for locale in os.listdir(self.directory):
+ po_file = os.path.join(self.directory, locale,
+ 'LC_MESSAGES', domain + '.po')
+ if os.path.exists(po_file):
+ po_files.append((locale, po_file))
+ mo_files.append(os.path.join(self.directory, locale,
+ 'LC_MESSAGES',
+ domain + '.mo'))
+ else:
+ po_files.append((self.locale, self.input_file))
+ if self.output_file:
+ mo_files.append(self.output_file)
+ else:
+ mo_files.append(os.path.join(self.directory, self.locale,
+ 'LC_MESSAGES',
+ domain + '.mo'))
+
+ if not po_files:
+ raise DistutilsOptionError('no message catalogs found')
+
+ for idx, (locale, po_file) in enumerate(po_files):
+ mo_file = mo_files[idx]
+ infile = open(po_file, 'rb')
+ try:
+ catalog = read_po(infile, locale)
+ finally:
+ infile.close()
+
+ if self.statistics:
+ translated = 0
+ for message in list(catalog)[1:]:
+ if message.string:
+ translated += 1
+ percentage = 0
+ if len(catalog):
+ percentage = translated * 100 // len(catalog)
+ self.log.info(
+ '%d of %d messages (%d%%) translated in %s',
+ translated, len(catalog), percentage, po_file
+ )
+
+ if catalog.fuzzy and not self.use_fuzzy:
+ self.log.info('catalog %s is marked as fuzzy, skipping', po_file)
+ continue
+
+ for message, errors in catalog.check():
+ for error in errors:
+ self.log.error(
+ 'error: %s:%d: %s', po_file, message.lineno, error
+ )
+
+ self.log.info('compiling catalog %s to %s', po_file, mo_file)
+
+ outfile = open(mo_file, 'wb')
+ try:
+ write_mo(outfile, catalog, use_fuzzy=self.use_fuzzy)
+ finally:
+ outfile.close()
+
+
+class extract_messages(Command):
+ """Message extraction command for use in ``setup.py`` scripts.
+
+ If correctly installed, this command is available to Setuptools-using
+ setup scripts automatically. For projects using plain old ``distutils``,
+ the command needs to be registered explicitly in ``setup.py``::
+
+ from babel.messages.frontend import extract_messages
+
+ setup(
+ ...
+ cmdclass = {'extract_messages': extract_messages}
+ )
+ """
+
+ description = 'extract localizable strings from the project code'
+ user_options = [
+ ('charset=', None,
+ 'charset to use in the output file (default "utf-8")'),
+ ('keywords=', 'k',
+ 'space-separated list of keywords to look for in addition to the '
+ 'defaults (may be repeated multiple times)'),
+ ('no-default-keywords', None,
+ 'do not include the default keywords'),
+ ('mapping-file=', 'F',
+ 'path to the mapping configuration file'),
+ ('no-location', None,
+ 'do not include location comments with filename and line number'),
+ ('omit-header', None,
+ 'do not include msgid "" entry in header'),
+ ('output-file=', 'o',
+ 'name of the output file'),
+ ('width=', 'w',
+ 'set output line width (default 76)'),
+ ('no-wrap', None,
+ 'do not break long message lines, longer than the output line width, '
+ 'into several lines'),
+ ('sort-output', None,
+ 'generate sorted output (default False)'),
+ ('sort-by-file', None,
+ 'sort output by file location (default False)'),
+ ('msgid-bugs-address=', None,
+ 'set report address for msgid'),
+ ('copyright-holder=', None,
+ 'set copyright holder in output'),
+ ('project=', None,
+ 'set project name in output'),
+ ('version=', None,
+ 'set project version in output'),
+ ('add-comments=', 'c',
+ 'place comment block with TAG (or those preceding keyword lines) in '
+ 'output file. Separate multiple TAGs with commas(,)'), # TODO: Support repetition of this argument
+ ('strip-comments', 's',
+ 'strip the comment TAGs from the comments.'),
+ ('input-paths=', None,
+ 'files or directories that should be scanned for messages. Separate multiple '
+ 'files or directories with commas(,)'), # TODO: Support repetition of this argument
+ ('input-dirs=', None, # TODO (3.x): Remove me.
+ 'alias for input-paths (does allow files as well as directories).'),
+ ]
+ boolean_options = [
+ 'no-default-keywords', 'no-location', 'omit-header', 'no-wrap',
+ 'sort-output', 'sort-by-file', 'strip-comments'
+ ]
+ as_args = 'input-paths'
+ multiple_value_options = ('add-comments', 'keywords')
+ option_aliases = {
+ 'keywords': ('--keyword',),
+ 'mapping-file': ('--mapping',),
+ 'output-file': ('--output',),
+ 'strip-comments': ('--strip-comment-tags',),
+ }
+
+ def initialize_options(self):
+ self.charset = 'utf-8'
+ self.keywords = None
+ self.no_default_keywords = False
+ self.mapping_file = None
+ self.no_location = False
+ self.omit_header = False
+ self.output_file = None
+ self.input_dirs = None
+ self.input_paths = None
+ self.width = None
+ self.no_wrap = False
+ self.sort_output = False
+ self.sort_by_file = False
+ self.msgid_bugs_address = None
+ self.copyright_holder = None
+ self.project = None
+ self.version = None
+ self.add_comments = None
+ self.strip_comments = False
+
+ def finalize_options(self):
+ if self.input_dirs:
+ if not self.input_paths:
+ self.input_paths = self.input_dirs
+ else:
+ raise DistutilsOptionError(
+ 'input-dirs and input-paths are mutually exclusive'
+ )
+
+ if self.no_default_keywords:
+ keywords = {}
+ else:
+ keywords = DEFAULT_KEYWORDS.copy()
+
+ keywords.update(parse_keywords(listify_value(self.keywords)))
+
+ self.keywords = keywords
+
+ if not self.keywords:
+ raise DistutilsOptionError('you must specify new keywords if you '
+ 'disable the default ones')
+
+ if not self.output_file:
+ raise DistutilsOptionError('no output file specified')
+ if self.no_wrap and self.width:
+ raise DistutilsOptionError("'--no-wrap' and '--width' are mutually "
+ "exclusive")
+ if not self.no_wrap and not self.width:
+ self.width = 76
+ elif self.width is not None:
+ self.width = int(self.width)
+
+ if self.sort_output and self.sort_by_file:
+ raise DistutilsOptionError("'--sort-output' and '--sort-by-file' "
+ "are mutually exclusive")
+
+ if self.input_paths:
+ if isinstance(self.input_paths, string_types):
+ self.input_paths = re.split(',\s*', self.input_paths)
+ elif self.distribution is not None:
+ self.input_paths = dict.fromkeys([
+ k.split('.', 1)[0]
+ for k in (self.distribution.packages or ())
+ ]).keys()
+ else:
+ self.input_paths = []
+
+ if not self.input_paths:
+ raise DistutilsOptionError("no input files or directories specified")
+
+ for path in self.input_paths:
+ if not os.path.exists(path):
+ raise DistutilsOptionError("Input path: %s does not exist" % path)
+
+ self.add_comments = listify_value(self.add_comments or (), ",")
+
+ if self.distribution:
+ if not self.project:
+ self.project = self.distribution.get_name()
+ if not self.version:
+ self.version = self.distribution.get_version()
+
+ def run(self):
+ mappings = self._get_mappings()
+ with open(self.output_file, 'wb') as outfile:
+ catalog = Catalog(project=self.project,
+ version=self.version,
+ msgid_bugs_address=self.msgid_bugs_address,
+ copyright_holder=self.copyright_holder,
+ charset=self.charset)
+
+ for path, (method_map, options_map) in mappings.items():
+ def callback(filename, method, options):
+ if method == 'ignore':
+ return
+
+ # If we explicitly provide a full filepath, just use that.
+ # Otherwise, path will be the directory path and filename
+ # is the relative path from that dir to the file.
+ # So we can join those to get the full filepath.
+ if os.path.isfile(path):
+ filepath = path
+ else:
+ filepath = os.path.normpath(os.path.join(path, filename))
+
+ optstr = ''
+ if options:
+ optstr = ' (%s)' % ', '.join(['%s="%s"' % (k, v) for
+ k, v in options.items()])
+ self.log.info('extracting messages from %s%s', filepath, optstr)
+
+ if os.path.isfile(path):
+ current_dir = os.getcwd()
+ extracted = check_and_call_extract_file(
+ path, method_map, options_map,
+ callback, self.keywords, self.add_comments,
+ self.strip_comments, current_dir
+ )
+ else:
+ extracted = extract_from_dir(
+ path, method_map, options_map,
+ keywords=self.keywords,
+ comment_tags=self.add_comments,
+ callback=callback,
+ strip_comment_tags=self.strip_comments
+ )
+ for filename, lineno, message, comments, context in extracted:
+ if os.path.isfile(path):
+ filepath = filename # already normalized
+ else:
+ filepath = os.path.normpath(os.path.join(path, filename))
+
+ catalog.add(message, None, [(filepath, lineno)],
+ auto_comments=comments, context=context)
+
+ self.log.info('writing PO template file to %s' % self.output_file)
+ write_po(outfile, catalog, width=self.width,
+ no_location=self.no_location,
+ omit_header=self.omit_header,
+ sort_output=self.sort_output,
+ sort_by_file=self.sort_by_file)
+
+ def _get_mappings(self):
+ mappings = {}
+
+ if self.mapping_file:
+ fileobj = open(self.mapping_file, 'U')
+ try:
+ method_map, options_map = parse_mapping(fileobj)
+ for path in self.input_paths:
+ mappings[path] = method_map, options_map
+ finally:
+ fileobj.close()
+
+ elif getattr(self.distribution, 'message_extractors', None):
+ message_extractors = self.distribution.message_extractors
+ for path, mapping in message_extractors.items():
+ if isinstance(mapping, string_types):
+ method_map, options_map = parse_mapping(StringIO(mapping))
+ else:
+ method_map, options_map = [], {}
+ for pattern, method, options in mapping:
+ method_map.append((pattern, method))
+ options_map[pattern] = options or {}
+ mappings[path] = method_map, options_map
+
+ else:
+ for path in self.input_paths:
+ mappings[path] = DEFAULT_MAPPING, {}
+
+ return mappings
+
+
+def check_message_extractors(dist, name, value):
+ """Validate the ``message_extractors`` keyword argument to ``setup()``.
+
+ :param dist: the distutils/setuptools ``Distribution`` object
+ :param name: the name of the keyword argument (should always be
+ "message_extractors")
+ :param value: the value of the keyword argument
+ :raise `DistutilsSetupError`: if the value is not valid
+ """
+ assert name == 'message_extractors'
+ if not isinstance(value, dict):
+ raise DistutilsSetupError('the value of the "message_extractors" '
+ 'parameter must be a dictionary')
+
+
+class init_catalog(Command):
+ """New catalog initialization command for use in ``setup.py`` scripts.
+
+ If correctly installed, this command is available to Setuptools-using
+ setup scripts automatically. For projects using plain old ``distutils``,
+ the command needs to be registered explicitly in ``setup.py``::
+
+ from babel.messages.frontend import init_catalog
+
+ setup(
+ ...
+ cmdclass = {'init_catalog': init_catalog}
+ )
+ """
+
+ description = 'create a new catalog based on a POT file'
+ user_options = [
+ ('domain=', 'D',
+ "domain of PO file (default 'messages')"),
+ ('input-file=', 'i',
+ 'name of the input file'),
+ ('output-dir=', 'd',
+ 'path to output directory'),
+ ('output-file=', 'o',
+ "name of the output file (default "
+ "'//LC_MESSAGES/.po')"),
+ ('locale=', 'l',
+ 'locale for the new localized catalog'),
+ ('width=', 'w',
+ 'set output line width (default 76)'),
+ ('no-wrap', None,
+ 'do not break long message lines, longer than the output line width, '
+ 'into several lines'),
+ ]
+ boolean_options = ['no-wrap']
+
+ def initialize_options(self):
+ self.output_dir = None
+ self.output_file = None
+ self.input_file = None
+ self.locale = None
+ self.domain = 'messages'
+ self.no_wrap = False
+ self.width = None
+
+ def finalize_options(self):
+ if not self.input_file:
+ raise DistutilsOptionError('you must specify the input file')
+
+ if not self.locale:
+ raise DistutilsOptionError('you must provide a locale for the '
+ 'new catalog')
+ try:
+ self._locale = Locale.parse(self.locale)
+ except UnknownLocaleError as e:
+ raise DistutilsOptionError(e)
+
+ if not self.output_file and not self.output_dir:
+ raise DistutilsOptionError('you must specify the output directory')
+ if not self.output_file:
+ self.output_file = os.path.join(self.output_dir, self.locale,
+ 'LC_MESSAGES', self.domain + '.po')
+
+ if not os.path.exists(os.path.dirname(self.output_file)):
+ os.makedirs(os.path.dirname(self.output_file))
+ if self.no_wrap and self.width:
+ raise DistutilsOptionError("'--no-wrap' and '--width' are mutually "
+ "exclusive")
+ if not self.no_wrap and not self.width:
+ self.width = 76
+ elif self.width is not None:
+ self.width = int(self.width)
+
+ def run(self):
+ self.log.info(
+ 'creating catalog %s based on %s', self.output_file, self.input_file
+ )
+
+ infile = open(self.input_file, 'rb')
+ try:
+ # Although reading from the catalog template, read_po must be fed
+ # the locale in order to correctly calculate plurals
+ catalog = read_po(infile, locale=self.locale)
+ finally:
+ infile.close()
+
+ catalog.locale = self._locale
+ catalog.revision_date = datetime.now(LOCALTZ)
+ catalog.fuzzy = False
+
+ outfile = open(self.output_file, 'wb')
+ try:
+ write_po(outfile, catalog, width=self.width)
+ finally:
+ outfile.close()
+
+
+class update_catalog(Command):
+ """Catalog merging command for use in ``setup.py`` scripts.
+
+ If correctly installed, this command is available to Setuptools-using
+ setup scripts automatically. For projects using plain old ``distutils``,
+ the command needs to be registered explicitly in ``setup.py``::
+
+ from babel.messages.frontend import update_catalog
+
+ setup(
+ ...
+ cmdclass = {'update_catalog': update_catalog}
+ )
+
+ .. versionadded:: 0.9
+ """
+
+ description = 'update message catalogs from a POT file'
+ user_options = [
+ ('domain=', 'D',
+ "domain of PO file (default 'messages')"),
+ ('input-file=', 'i',
+ 'name of the input file'),
+ ('output-dir=', 'd',
+ 'path to base directory containing the catalogs'),
+ ('output-file=', 'o',
+ "name of the output file (default "
+ "'//LC_MESSAGES/.po')"),
+ ('locale=', 'l',
+ 'locale of the catalog to compile'),
+ ('width=', 'w',
+ 'set output line width (default 76)'),
+ ('no-wrap', None,
+ 'do not break long message lines, longer than the output line width, '
+ 'into several lines'),
+ ('ignore-obsolete=', None,
+ 'whether to omit obsolete messages from the output'),
+ ('no-fuzzy-matching', 'N',
+ 'do not use fuzzy matching'),
+ ('update-header-comment', None,
+ 'update target header comment'),
+ ('previous', None,
+ 'keep previous msgids of translated messages')
+ ]
+ boolean_options = ['no-wrap', 'ignore-obsolete', 'no-fuzzy-matching', 'previous', 'update-header-comment']
+
+ def initialize_options(self):
+ self.domain = 'messages'
+ self.input_file = None
+ self.output_dir = None
+ self.output_file = None
+ self.locale = None
+ self.width = None
+ self.no_wrap = False
+ self.ignore_obsolete = False
+ self.no_fuzzy_matching = False
+ self.update_header_comment = False
+ self.previous = False
+
+ def finalize_options(self):
+ if not self.input_file:
+ raise DistutilsOptionError('you must specify the input file')
+ if not self.output_file and not self.output_dir:
+ raise DistutilsOptionError('you must specify the output file or '
+ 'directory')
+ if self.output_file and not self.locale:
+ raise DistutilsOptionError('you must specify the locale')
+ if self.no_wrap and self.width:
+ raise DistutilsOptionError("'--no-wrap' and '--width' are mutually "
+ "exclusive")
+ if not self.no_wrap and not self.width:
+ self.width = 76
+ elif self.width is not None:
+ self.width = int(self.width)
+ if self.no_fuzzy_matching and self.previous:
+ self.previous = False
+
+ def run(self):
+ po_files = []
+ if not self.output_file:
+ if self.locale:
+ po_files.append((self.locale,
+ os.path.join(self.output_dir, self.locale,
+ 'LC_MESSAGES',
+ self.domain + '.po')))
+ else:
+ for locale in os.listdir(self.output_dir):
+ po_file = os.path.join(self.output_dir, locale,
+ 'LC_MESSAGES',
+ self.domain + '.po')
+ if os.path.exists(po_file):
+ po_files.append((locale, po_file))
+ else:
+ po_files.append((self.locale, self.output_file))
+
+ domain = self.domain
+ if not domain:
+ domain = os.path.splitext(os.path.basename(self.input_file))[0]
+
+ infile = open(self.input_file, 'rb')
+ try:
+ template = read_po(infile)
+ finally:
+ infile.close()
+
+ if not po_files:
+ raise DistutilsOptionError('no message catalogs found')
+
+ for locale, filename in po_files:
+ self.log.info('updating catalog %s based on %s', filename, self.input_file)
+ infile = open(filename, 'rb')
+ try:
+ catalog = read_po(infile, locale=locale, domain=domain)
+ finally:
+ infile.close()
+
+ catalog.update(
+ template, self.no_fuzzy_matching,
+ update_header_comment=self.update_header_comment
+ )
+
+ tmpname = os.path.join(os.path.dirname(filename),
+ tempfile.gettempprefix() +
+ os.path.basename(filename))
+ tmpfile = open(tmpname, 'wb')
+ try:
+ try:
+ write_po(tmpfile, catalog,
+ ignore_obsolete=self.ignore_obsolete,
+ include_previous=self.previous, width=self.width)
+ finally:
+ tmpfile.close()
+ except:
+ os.remove(tmpname)
+ raise
+
+ try:
+ os.rename(tmpname, filename)
+ except OSError:
+ # We're probably on Windows, which doesn't support atomic
+ # renames, at least not through Python
+ # If the error is in fact due to a permissions problem, that
+ # same error is going to be raised from one of the following
+ # operations
+ os.remove(filename)
+ shutil.copy(tmpname, filename)
+ os.remove(tmpname)
+
+
+class CommandLineInterface(object):
+ """Command-line interface.
+
+ This class provides a simple command-line interface to the message
+ extraction and PO file generation functionality.
+ """
+
+ usage = '%%prog %s [options] %s'
+ version = '%%prog %s' % VERSION
+ commands = {
+ 'compile': 'compile message catalogs to MO files',
+ 'extract': 'extract messages from source files and generate a POT file',
+ 'init': 'create new message catalogs from a POT file',
+ 'update': 'update existing message catalogs from a POT file'
+ }
+
+ command_classes = {
+ 'compile': compile_catalog,
+ 'extract': extract_messages,
+ 'init': init_catalog,
+ 'update': update_catalog,
+ }
+
+ log = None # Replaced on instance level
+
+ def run(self, argv=None):
+ """Main entry point of the command-line interface.
+
+ :param argv: list of arguments passed on the command-line
+ """
+
+ if argv is None:
+ argv = sys.argv
+
+ self.parser = optparse.OptionParser(usage=self.usage % ('command', '[args]'),
+ version=self.version)
+ self.parser.disable_interspersed_args()
+ self.parser.print_help = self._help
+ self.parser.add_option('--list-locales', dest='list_locales',
+ action='store_true',
+ help="print all known locales and exit")
+ self.parser.add_option('-v', '--verbose', action='store_const',
+ dest='loglevel', const=logging.DEBUG,
+ help='print as much as possible')
+ self.parser.add_option('-q', '--quiet', action='store_const',
+ dest='loglevel', const=logging.ERROR,
+ help='print as little as possible')
+ self.parser.set_defaults(list_locales=False, loglevel=logging.INFO)
+
+ options, args = self.parser.parse_args(argv[1:])
+
+ self._configure_logging(options.loglevel)
+ if options.list_locales:
+ identifiers = localedata.locale_identifiers()
+ longest = max([len(identifier) for identifier in identifiers])
+ identifiers.sort()
+ format = u'%%-%ds %%s' % (longest + 1)
+ for identifier in identifiers:
+ locale = Locale.parse(identifier)
+ output = format % (identifier, locale.english_name)
+ print(output.encode(sys.stdout.encoding or
+ getpreferredencoding() or
+ 'ascii', 'replace'))
+ return 0
+
+ if not args:
+ self.parser.error('no valid command or option passed. '
+ 'Try the -h/--help option for more information.')
+
+ cmdname = args[0]
+ if cmdname not in self.commands:
+ self.parser.error('unknown command "%s"' % cmdname)
+
+ cmdinst = self._configure_command(cmdname, args[1:])
+ return cmdinst.run()
+
+ def _configure_logging(self, loglevel):
+ self.log = logging.getLogger('babel')
+ self.log.setLevel(loglevel)
+ # Don't add a new handler for every instance initialization (#227), this
+ # would cause duplicated output when the CommandLineInterface as an
+ # normal Python class.
+ if self.log.handlers:
+ handler = self.log.handlers[0]
+ else:
+ handler = logging.StreamHandler()
+ self.log.addHandler(handler)
+ handler.setLevel(loglevel)
+ formatter = logging.Formatter('%(message)s')
+ handler.setFormatter(formatter)
+
+ def _help(self):
+ print(self.parser.format_help())
+ print("commands:")
+ longest = max([len(command) for command in self.commands])
+ format = " %%-%ds %%s" % max(8, longest + 1)
+ commands = sorted(self.commands.items())
+ for name, description in commands:
+ print(format % (name, description))
+
+ def _configure_command(self, cmdname, argv):
+ """
+ :type cmdname: str
+ :type argv: list[str]
+ """
+ cmdclass = self.command_classes[cmdname]
+ cmdinst = cmdclass()
+ if self.log:
+ cmdinst.log = self.log # Use our logger, not distutils'.
+ assert isinstance(cmdinst, Command)
+ cmdinst.initialize_options()
+
+ parser = optparse.OptionParser(
+ usage=self.usage % (cmdname, ''),
+ description=self.commands[cmdname]
+ )
+ as_args = getattr(cmdclass, "as_args", ())
+ for long, short, help in cmdclass.user_options:
+ name = long.strip("=")
+ default = getattr(cmdinst, name.replace('-', '_'))
+ strs = ["--%s" % name]
+ if short:
+ strs.append("-%s" % short)
+ strs.extend(cmdclass.option_aliases.get(name, ()))
+ if name == as_args:
+ parser.usage += "<%s>" % name
+ elif name in cmdclass.boolean_options:
+ parser.add_option(*strs, action="store_true", help=help)
+ elif name in cmdclass.multiple_value_options:
+ parser.add_option(*strs, action="append", help=help)
+ else:
+ parser.add_option(*strs, help=help, default=default)
+ options, args = parser.parse_args(argv)
+
+ if as_args:
+ setattr(options, as_args.replace('-', '_'), args)
+
+ for key, value in vars(options).items():
+ setattr(cmdinst, key, value)
+
+ try:
+ cmdinst.ensure_finalized()
+ except DistutilsOptionError as err:
+ parser.error(str(err))
+
+ return cmdinst
+
+
+def main():
+ return CommandLineInterface().run(sys.argv)
+
+
+def parse_mapping(fileobj, filename=None):
+ """Parse an extraction method mapping from a file-like object.
+
+ >>> buf = StringIO('''
+ ... [extractors]
+ ... custom = mypackage.module:myfunc
+ ...
+ ... # Python source files
+ ... [python: **.py]
+ ...
+ ... # Genshi templates
+ ... [genshi: **/templates/**.html]
+ ... include_attrs =
+ ... [genshi: **/templates/**.txt]
+ ... template_class = genshi.template:TextTemplate
+ ... encoding = latin-1
+ ...
+ ... # Some custom extractor
+ ... [custom: **/custom/*.*]
+ ... ''')
+
+ >>> method_map, options_map = parse_mapping(buf)
+ >>> len(method_map)
+ 4
+
+ >>> method_map[0]
+ ('**.py', 'python')
+ >>> options_map['**.py']
+ {}
+ >>> method_map[1]
+ ('**/templates/**.html', 'genshi')
+ >>> options_map['**/templates/**.html']['include_attrs']
+ ''
+ >>> method_map[2]
+ ('**/templates/**.txt', 'genshi')
+ >>> options_map['**/templates/**.txt']['template_class']
+ 'genshi.template:TextTemplate'
+ >>> options_map['**/templates/**.txt']['encoding']
+ 'latin-1'
+
+ >>> method_map[3]
+ ('**/custom/*.*', 'mypackage.module:myfunc')
+ >>> options_map['**/custom/*.*']
+ {}
+
+ :param fileobj: a readable file-like object containing the configuration
+ text to parse
+ :see: `extract_from_directory`
+ """
+ extractors = {}
+ method_map = []
+ options_map = {}
+
+ parser = RawConfigParser()
+ parser._sections = odict(parser._sections) # We need ordered sections
+ parser.readfp(fileobj, filename)
+ for section in parser.sections():
+ if section == 'extractors':
+ extractors = dict(parser.items(section))
+ else:
+ method, pattern = [part.strip() for part in section.split(':', 1)]
+ method_map.append((pattern, method))
+ options_map[pattern] = dict(parser.items(section))
+
+ if extractors:
+ for idx, (pattern, method) in enumerate(method_map):
+ if method in extractors:
+ method = extractors[method]
+ method_map[idx] = (pattern, method)
+
+ return (method_map, options_map)
+
+
+def parse_keywords(strings=[]):
+ """Parse keywords specifications from the given list of strings.
+
+ >>> kw = sorted(parse_keywords(['_', 'dgettext:2', 'dngettext:2,3', 'pgettext:1c,2']).items())
+ >>> for keyword, indices in kw:
+ ... print((keyword, indices))
+ ('_', None)
+ ('dgettext', (2,))
+ ('dngettext', (2, 3))
+ ('pgettext', ((1, 'c'), 2))
+ """
+ keywords = {}
+ for string in strings:
+ if ':' in string:
+ funcname, indices = string.split(':')
+ else:
+ funcname, indices = string, None
+ if funcname not in keywords:
+ if indices:
+ inds = []
+ for x in indices.split(','):
+ if x[-1] == 'c':
+ inds.append((int(x[:-1]), 'c'))
+ else:
+ inds.append(int(x))
+ indices = tuple(inds)
+ keywords[funcname] = indices
+ return keywords
+
+
+if __name__ == '__main__':
+ main()
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/messages/frontend.pyc b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/messages/frontend.pyc
new file mode 100644
index 0000000..e201781
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/messages/frontend.pyc differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/babel/messages/jslexer.py b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/messages/jslexer.py
new file mode 100644
index 0000000..aed39f3
--- /dev/null
+++ b/Assignments/microblog/flask/lib/python2.7/site-packages/babel/messages/jslexer.py
@@ -0,0 +1,185 @@
+# -*- coding: utf-8 -*-
+"""
+ babel.messages.jslexer
+ ~~~~~~~~~~~~~~~~~~~~~~
+
+ A simple JavaScript 1.5 lexer which is used for the JavaScript
+ extractor.
+
+ :copyright: (c) 2013 by the Babel Team.
+ :license: BSD, see LICENSE for more details.
+"""
+from collections import namedtuple
+import re
+from babel._compat import unichr
+
+operators = sorted([
+ '+', '-', '*', '%', '!=', '==', '<', '>', '<=', '>=', '=',
+ '+=', '-=', '*=', '%=', '<<', '>>', '>>>', '<<=', '>>=',
+ '>>>=', '&', '&=', '|', '|=', '&&', '||', '^', '^=', '(', ')',
+ '[', ']', '{', '}', '!', '--', '++', '~', ',', ';', '.', ':'
+], key=len, reverse=True)
+
+escapes = {'b': '\b', 'f': '\f', 'n': '\n', 'r': '\r', 't': '\t'}
+
+name_re = re.compile(r'[\w$_][\w\d$_]*', re.UNICODE)
+dotted_name_re = re.compile(r'[\w$_][\w\d$_.]*[\w\d$_.]', re.UNICODE)
+division_re = re.compile(r'/=?')
+regex_re = re.compile(r'/(?:[^/\\]*(?:\\.[^/\\]*)*)/[a-zA-Z]*(?s)')
+line_re = re.compile(r'(\r\n|\n|\r)')
+line_join_re = re.compile(r'\\' + line_re.pattern)
+uni_escape_re = re.compile(r'[a-fA-F0-9]{1,4}')
+
+Token = namedtuple('Token', 'type value lineno')
+
+_rules = [
+ (None, re.compile(r'\s+(?u)')),
+ (None, re.compile(r' %r" % (filename, tracer))
+ if tracer:
+ debug = self.debug.add_label("file %r" % (filename,))
+ tracer = DebugFileTracerWrapper(tracer, debug)
+ return tracer
+
+ def file_reporter(self, filename):
+ reporter = self.plugin.file_reporter(filename)
+ self.debug.write("file_reporter(%r) --> %r" % (filename, reporter))
+ if reporter:
+ debug = self.debug.add_label("file %r" % (filename,))
+ reporter = DebugFileReporterWrapper(filename, reporter, debug)
+ return reporter
+
+ def sys_info(self):
+ return self.plugin.sys_info()
+
+
+class DebugFileTracerWrapper(FileTracer):
+ """A debugging `FileTracer`."""
+
+ def __init__(self, tracer, debug):
+ self.tracer = tracer
+ self.debug = debug
+
+ def _show_frame(self, frame):
+ """A short string identifying a frame, for debug messages."""
+ return "%s@%d" % (
+ os.path.basename(frame.f_code.co_filename),
+ frame.f_lineno,
+ )
+
+ def source_filename(self):
+ sfilename = self.tracer.source_filename()
+ self.debug.write("source_filename() --> %r" % (sfilename,))
+ return sfilename
+
+ def has_dynamic_source_filename(self):
+ has = self.tracer.has_dynamic_source_filename()
+ self.debug.write("has_dynamic_source_filename() --> %r" % (has,))
+ return has
+
+ def dynamic_source_filename(self, filename, frame):
+ dyn = self.tracer.dynamic_source_filename(filename, frame)
+ self.debug.write("dynamic_source_filename(%r, %s) --> %r" % (
+ filename, self._show_frame(frame), dyn,
+ ))
+ return dyn
+
+ def line_number_range(self, frame):
+ pair = self.tracer.line_number_range(frame)
+ self.debug.write("line_number_range(%s) --> %r" % (self._show_frame(frame), pair))
+ return pair
+
+
+class DebugFileReporterWrapper(FileReporter):
+ """A debugging `FileReporter`."""
+
+ def __init__(self, filename, reporter, debug):
+ super(DebugFileReporterWrapper, self).__init__(filename)
+ self.reporter = reporter
+ self.debug = debug
+
+ def relative_filename(self):
+ ret = self.reporter.relative_filename()
+ self.debug.write("relative_filename() --> %r" % (ret,))
+ return ret
+
+ def lines(self):
+ ret = self.reporter.lines()
+ self.debug.write("lines() --> %r" % (ret,))
+ return ret
+
+ def excluded_lines(self):
+ ret = self.reporter.excluded_lines()
+ self.debug.write("excluded_lines() --> %r" % (ret,))
+ return ret
+
+ def translate_lines(self, lines):
+ ret = self.reporter.translate_lines(lines)
+ self.debug.write("translate_lines(%r) --> %r" % (lines, ret))
+ return ret
+
+ def translate_arcs(self, arcs):
+ ret = self.reporter.translate_arcs(arcs)
+ self.debug.write("translate_arcs(%r) --> %r" % (arcs, ret))
+ return ret
+
+ def no_branch_lines(self):
+ ret = self.reporter.no_branch_lines()
+ self.debug.write("no_branch_lines() --> %r" % (ret,))
+ return ret
+
+ def exit_counts(self):
+ ret = self.reporter.exit_counts()
+ self.debug.write("exit_counts() --> %r" % (ret,))
+ return ret
+
+ def arcs(self):
+ ret = self.reporter.arcs()
+ self.debug.write("arcs() --> %r" % (ret,))
+ return ret
+
+ def source(self):
+ ret = self.reporter.source()
+ self.debug.write("source() --> %d chars" % (len(ret),))
+ return ret
+
+ def source_token_lines(self):
+ ret = list(self.reporter.source_token_lines())
+ self.debug.write("source_token_lines() --> %d tokens" % (len(ret),))
+ return ret
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/coverage/plugin_support.pyc b/Assignments/microblog/flask/lib/python2.7/site-packages/coverage/plugin_support.pyc
new file mode 100644
index 0000000..e0069a9
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/coverage/plugin_support.pyc differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/coverage/python.py b/Assignments/microblog/flask/lib/python2.7/site-packages/coverage/python.py
new file mode 100644
index 0000000..8e98bea
--- /dev/null
+++ b/Assignments/microblog/flask/lib/python2.7/site-packages/coverage/python.py
@@ -0,0 +1,205 @@
+# Licensed under the Apache License: http://www.apache.org/licenses/LICENSE-2.0
+# For details: https://bitbucket.org/ned/coveragepy/src/default/NOTICE.txt
+
+"""Python source expertise for coverage.py"""
+
+import os.path
+import types
+import zipimport
+
+from coverage import env, files
+from coverage.misc import (
+ contract, CoverageException, expensive, NoSource, join_regex, isolate_module,
+)
+from coverage.parser import PythonParser
+from coverage.phystokens import source_token_lines, source_encoding
+from coverage.plugin import FileReporter
+
+os = isolate_module(os)
+
+
+@contract(returns='bytes')
+def read_python_source(filename):
+ """Read the Python source text from `filename`.
+
+ Returns bytes.
+
+ """
+ with open(filename, "rb") as f:
+ return f.read().replace(b"\r\n", b"\n").replace(b"\r", b"\n")
+
+
+@contract(returns='unicode')
+def get_python_source(filename):
+ """Return the source code, as unicode."""
+ base, ext = os.path.splitext(filename)
+ if ext == ".py" and env.WINDOWS:
+ exts = [".py", ".pyw"]
+ else:
+ exts = [ext]
+
+ for ext in exts:
+ try_filename = base + ext
+ if os.path.exists(try_filename):
+ # A regular text file: open it.
+ source = read_python_source(try_filename)
+ break
+
+ # Maybe it's in a zip file?
+ source = get_zip_bytes(try_filename)
+ if source is not None:
+ break
+ else:
+ # Couldn't find source.
+ raise NoSource("No source for code: '%s'." % filename)
+
+ # Replace \f because of http://bugs.python.org/issue19035
+ source = source.replace(b'\f', b' ')
+ source = source.decode(source_encoding(source), "replace")
+
+ # Python code should always end with a line with a newline.
+ if source and source[-1] != '\n':
+ source += '\n'
+
+ return source
+
+
+@contract(returns='bytes|None')
+def get_zip_bytes(filename):
+ """Get data from `filename` if it is a zip file path.
+
+ Returns the bytestring data read from the zip file, or None if no zip file
+ could be found or `filename` isn't in it. The data returned will be
+ an empty string if the file is empty.
+
+ """
+ markers = ['.zip'+os.sep, '.egg'+os.sep]
+ for marker in markers:
+ if marker in filename:
+ parts = filename.split(marker)
+ try:
+ zi = zipimport.zipimporter(parts[0]+marker[:-1])
+ except zipimport.ZipImportError:
+ continue
+ try:
+ data = zi.get_data(parts[1])
+ except IOError:
+ continue
+ return data
+ return None
+
+
+class PythonFileReporter(FileReporter):
+ """Report support for a Python file."""
+
+ def __init__(self, morf, coverage=None):
+ self.coverage = coverage
+
+ if hasattr(morf, '__file__'):
+ filename = morf.__file__
+ elif isinstance(morf, types.ModuleType):
+ # A module should have had .__file__, otherwise we can't use it.
+ # This could be a PEP-420 namespace package.
+ raise CoverageException("Module {0} has no file".format(morf))
+ else:
+ filename = morf
+
+ filename = files.unicode_filename(filename)
+
+ # .pyc files should always refer to a .py instead.
+ if filename.endswith(('.pyc', '.pyo')):
+ filename = filename[:-1]
+ elif filename.endswith('$py.class'): # Jython
+ filename = filename[:-9] + ".py"
+
+ super(PythonFileReporter, self).__init__(files.canonical_filename(filename))
+
+ if hasattr(morf, '__name__'):
+ name = morf.__name__
+ name = name.replace(".", os.sep) + ".py"
+ name = files.unicode_filename(name)
+ else:
+ name = files.relative_filename(filename)
+ self.relname = name
+
+ self._source = None
+ self._parser = None
+ self._statements = None
+ self._excluded = None
+
+ @contract(returns='unicode')
+ def relative_filename(self):
+ return self.relname
+
+ @property
+ def parser(self):
+ """Lazily create a :class:`PythonParser`."""
+ if self._parser is None:
+ self._parser = PythonParser(
+ filename=self.filename,
+ exclude=self.coverage._exclude_regex('exclude'),
+ )
+ self._parser.parse_source()
+ return self._parser
+
+ def lines(self):
+ """Return the line numbers of statements in the file."""
+ return self.parser.statements
+
+ def excluded_lines(self):
+ """Return the line numbers of statements in the file."""
+ return self.parser.excluded
+
+ def translate_lines(self, lines):
+ return self.parser.translate_lines(lines)
+
+ def translate_arcs(self, arcs):
+ return self.parser.translate_arcs(arcs)
+
+ @expensive
+ def no_branch_lines(self):
+ no_branch = self.parser.lines_matching(
+ join_regex(self.coverage.config.partial_list),
+ join_regex(self.coverage.config.partial_always_list)
+ )
+ return no_branch
+
+ @expensive
+ def arcs(self):
+ return self.parser.arcs()
+
+ @expensive
+ def exit_counts(self):
+ return self.parser.exit_counts()
+
+ def missing_arc_description(self, start, end, executed_arcs=None):
+ return self.parser.missing_arc_description(start, end, executed_arcs)
+
+ @contract(returns='unicode')
+ def source(self):
+ if self._source is None:
+ self._source = get_python_source(self.filename)
+ return self._source
+
+ def should_be_python(self):
+ """Does it seem like this file should contain Python?
+
+ This is used to decide if a file reported as part of the execution of
+ a program was really likely to have contained Python in the first
+ place.
+
+ """
+ # Get the file extension.
+ _, ext = os.path.splitext(self.filename)
+
+ # Anything named *.py* should be Python.
+ if ext.startswith('.py'):
+ return True
+ # A file with no extension should be Python.
+ if not ext:
+ return True
+ # Everything else is probably not Python.
+ return False
+
+ def source_token_lines(self):
+ return source_token_lines(self.source())
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/coverage/python.pyc b/Assignments/microblog/flask/lib/python2.7/site-packages/coverage/python.pyc
new file mode 100644
index 0000000..a5d2112
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/coverage/python.pyc differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/coverage/pytracer.py b/Assignments/microblog/flask/lib/python2.7/site-packages/coverage/pytracer.py
new file mode 100644
index 0000000..23f4946
--- /dev/null
+++ b/Assignments/microblog/flask/lib/python2.7/site-packages/coverage/pytracer.py
@@ -0,0 +1,155 @@
+# Licensed under the Apache License: http://www.apache.org/licenses/LICENSE-2.0
+# For details: https://bitbucket.org/ned/coveragepy/src/default/NOTICE.txt
+
+"""Raw data collector for coverage.py."""
+
+import dis
+import sys
+
+from coverage import env
+
+# We need the YIELD_VALUE opcode below, in a comparison-friendly form.
+YIELD_VALUE = dis.opmap['YIELD_VALUE']
+if env.PY2:
+ YIELD_VALUE = chr(YIELD_VALUE)
+
+
+class PyTracer(object):
+ """Python implementation of the raw data tracer."""
+
+ # Because of poor implementations of trace-function-manipulating tools,
+ # the Python trace function must be kept very simple. In particular, there
+ # must be only one function ever set as the trace function, both through
+ # sys.settrace, and as the return value from the trace function. Put
+ # another way, the trace function must always return itself. It cannot
+ # swap in other functions, or return None to avoid tracing a particular
+ # frame.
+ #
+ # The trace manipulator that introduced this restriction is DecoratorTools,
+ # which sets a trace function, and then later restores the pre-existing one
+ # by calling sys.settrace with a function it found in the current frame.
+ #
+ # Systems that use DecoratorTools (or similar trace manipulations) must use
+ # PyTracer to get accurate results. The command-line --timid argument is
+ # used to force the use of this tracer.
+
+ def __init__(self):
+ # Attributes set from the collector:
+ self.data = None
+ self.trace_arcs = False
+ self.should_trace = None
+ self.should_trace_cache = None
+ self.warn = None
+ # The threading module to use, if any.
+ self.threading = None
+
+ self.cur_file_dict = []
+ self.last_line = [0]
+
+ self.data_stack = []
+ self.last_exc_back = None
+ self.last_exc_firstlineno = 0
+ self.thread = None
+ self.stopped = False
+
+ def __repr__(self):
+ return "".format(
+ id(self),
+ sum(len(v) for v in self.data.values()),
+ len(self.data),
+ )
+
+ def _trace(self, frame, event, arg_unused):
+ """The trace function passed to sys.settrace."""
+
+ if self.stopped:
+ return
+
+ if self.last_exc_back:
+ if frame == self.last_exc_back:
+ # Someone forgot a return event.
+ if self.trace_arcs and self.cur_file_dict:
+ pair = (self.last_line, -self.last_exc_firstlineno)
+ self.cur_file_dict[pair] = None
+ self.cur_file_dict, self.last_line = self.data_stack.pop()
+ self.last_exc_back = None
+
+ if event == 'call':
+ # Entering a new function context. Decide if we should trace
+ # in this file.
+ self.data_stack.append((self.cur_file_dict, self.last_line))
+ filename = frame.f_code.co_filename
+ disp = self.should_trace_cache.get(filename)
+ if disp is None:
+ disp = self.should_trace(filename, frame)
+ self.should_trace_cache[filename] = disp
+
+ self.cur_file_dict = None
+ if disp.trace:
+ tracename = disp.source_filename
+ if tracename not in self.data:
+ self.data[tracename] = {}
+ self.cur_file_dict = self.data[tracename]
+ # The call event is really a "start frame" event, and happens for
+ # function calls and re-entering generators. The f_lasti field is
+ # -1 for calls, and a real offset for generators. Use <0 as the
+ # line number for calls, and the real line number for generators.
+ if frame.f_lasti < 0:
+ self.last_line = -frame.f_code.co_firstlineno
+ else:
+ self.last_line = frame.f_lineno
+ elif event == 'line':
+ # Record an executed line.
+ if self.cur_file_dict is not None:
+ lineno = frame.f_lineno
+ if self.trace_arcs:
+ self.cur_file_dict[(self.last_line, lineno)] = None
+ else:
+ self.cur_file_dict[lineno] = None
+ self.last_line = lineno
+ elif event == 'return':
+ if self.trace_arcs and self.cur_file_dict:
+ # Record an arc leaving the function, but beware that a
+ # "return" event might just mean yielding from a generator.
+ bytecode = frame.f_code.co_code[frame.f_lasti]
+ if bytecode != YIELD_VALUE:
+ first = frame.f_code.co_firstlineno
+ self.cur_file_dict[(self.last_line, -first)] = None
+ # Leaving this function, pop the filename stack.
+ self.cur_file_dict, self.last_line = self.data_stack.pop()
+ elif event == 'exception':
+ self.last_exc_back = frame.f_back
+ self.last_exc_firstlineno = frame.f_code.co_firstlineno
+ return self._trace
+
+ def start(self):
+ """Start this Tracer.
+
+ Return a Python function suitable for use with sys.settrace().
+
+ """
+ if self.threading:
+ self.thread = self.threading.currentThread()
+ sys.settrace(self._trace)
+ self.stopped = False
+ return self._trace
+
+ def stop(self):
+ """Stop this Tracer."""
+ self.stopped = True
+ if self.threading and self.thread.ident != self.threading.currentThread().ident:
+ # Called on a different thread than started us: we can't unhook
+ # ourselves, but we've set the flag that we should stop, so we
+ # won't do any more tracing.
+ return
+
+ if self.warn:
+ if sys.gettrace() != self._trace:
+ msg = "Trace function changed, measurement is likely wrong: %r"
+ self.warn(msg % (sys.gettrace(),))
+
+ sys.settrace(None)
+
+ def get_stats(self):
+ """Return a dictionary of statistics, or None."""
+ return None
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/coverage/pytracer.pyc b/Assignments/microblog/flask/lib/python2.7/site-packages/coverage/pytracer.pyc
new file mode 100644
index 0000000..62fa7d9
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/coverage/pytracer.pyc differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/coverage/report.py b/Assignments/microblog/flask/lib/python2.7/site-packages/coverage/report.py
new file mode 100644
index 0000000..2ffbbaa
--- /dev/null
+++ b/Assignments/microblog/flask/lib/python2.7/site-packages/coverage/report.py
@@ -0,0 +1,101 @@
+# Licensed under the Apache License: http://www.apache.org/licenses/LICENSE-2.0
+# For details: https://bitbucket.org/ned/coveragepy/src/default/NOTICE.txt
+
+"""Reporter foundation for coverage.py."""
+
+import os
+import warnings
+
+from coverage.files import prep_patterns, FnmatchMatcher
+from coverage.misc import CoverageException, NoSource, NotPython, isolate_module
+
+os = isolate_module(os)
+
+
+class Reporter(object):
+ """A base class for all reporters."""
+
+ def __init__(self, coverage, config):
+ """Create a reporter.
+
+ `coverage` is the coverage instance. `config` is an instance of
+ CoverageConfig, for controlling all sorts of behavior.
+
+ """
+ self.coverage = coverage
+ self.config = config
+
+ # The directory into which to place the report, used by some derived
+ # classes.
+ self.directory = None
+
+ # Our method find_file_reporters used to set an attribute that other
+ # code could read. That's been refactored away, but some third parties
+ # were using that attribute. We'll continue to support it in a noisy
+ # way for now.
+ self._file_reporters = []
+
+ @property
+ def file_reporters(self):
+ """Keep .file_reporters working for private-grabbing tools."""
+ warnings.warn(
+ "Report.file_reporters will no longer be available in Coverage.py 4.2",
+ DeprecationWarning,
+ )
+ return self._file_reporters
+
+ def find_file_reporters(self, morfs):
+ """Find the FileReporters we'll report on.
+
+ `morfs` is a list of modules or file names.
+
+ Returns a list of FileReporters.
+
+ """
+ reporters = self.coverage._get_file_reporters(morfs)
+
+ if self.config.include:
+ matcher = FnmatchMatcher(prep_patterns(self.config.include))
+ reporters = [fr for fr in reporters if matcher.match(fr.filename)]
+
+ if self.config.omit:
+ matcher = FnmatchMatcher(prep_patterns(self.config.omit))
+ reporters = [fr for fr in reporters if not matcher.match(fr.filename)]
+
+ self._file_reporters = sorted(reporters)
+ return self._file_reporters
+
+ def report_files(self, report_fn, morfs, directory=None):
+ """Run a reporting function on a number of morfs.
+
+ `report_fn` is called for each relative morf in `morfs`. It is called
+ as::
+
+ report_fn(file_reporter, analysis)
+
+ where `file_reporter` is the `FileReporter` for the morf, and
+ `analysis` is the `Analysis` for the morf.
+
+ """
+ file_reporters = self.find_file_reporters(morfs)
+
+ if not file_reporters:
+ raise CoverageException("No data to report.")
+
+ self.directory = directory
+ if self.directory and not os.path.exists(self.directory):
+ os.makedirs(self.directory)
+
+ for fr in file_reporters:
+ try:
+ report_fn(fr, self.coverage._analyze(fr))
+ except NoSource:
+ if not self.config.ignore_errors:
+ raise
+ except NotPython:
+ # Only report errors for .py files, and only if we didn't
+ # explicitly suppress those errors.
+ # NotPython is only raised by PythonFileReporter, which has a
+ # should_be_python() method.
+ if fr.should_be_python() and not self.config.ignore_errors:
+ raise
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/coverage/report.pyc b/Assignments/microblog/flask/lib/python2.7/site-packages/coverage/report.pyc
new file mode 100644
index 0000000..e8c3250
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/coverage/report.pyc differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/coverage/results.py b/Assignments/microblog/flask/lib/python2.7/site-packages/coverage/results.py
new file mode 100644
index 0000000..7853848
--- /dev/null
+++ b/Assignments/microblog/flask/lib/python2.7/site-packages/coverage/results.py
@@ -0,0 +1,271 @@
+# Licensed under the Apache License: http://www.apache.org/licenses/LICENSE-2.0
+# For details: https://bitbucket.org/ned/coveragepy/src/default/NOTICE.txt
+
+"""Results of coverage measurement."""
+
+import collections
+
+from coverage.backward import iitems
+from coverage.misc import format_lines
+
+
+class Analysis(object):
+ """The results of analyzing a FileReporter."""
+
+ def __init__(self, data, file_reporter):
+ self.data = data
+ self.file_reporter = file_reporter
+ self.filename = self.file_reporter.filename
+ self.statements = self.file_reporter.lines()
+ self.excluded = self.file_reporter.excluded_lines()
+
+ # Identify missing statements.
+ executed = self.data.lines(self.filename) or []
+ executed = self.file_reporter.translate_lines(executed)
+ self.missing = self.statements - executed
+
+ if self.data.has_arcs():
+ self._arc_possibilities = sorted(self.file_reporter.arcs())
+ self.exit_counts = self.file_reporter.exit_counts()
+ self.no_branch = self.file_reporter.no_branch_lines()
+ n_branches = self.total_branches()
+ mba = self.missing_branch_arcs()
+ n_partial_branches = sum(len(v) for k,v in iitems(mba) if k not in self.missing)
+ n_missing_branches = sum(len(v) for k,v in iitems(mba))
+ else:
+ self._arc_possibilities = []
+ self.exit_counts = {}
+ self.no_branch = set()
+ n_branches = n_partial_branches = n_missing_branches = 0
+
+ self.numbers = Numbers(
+ n_files=1,
+ n_statements=len(self.statements),
+ n_excluded=len(self.excluded),
+ n_missing=len(self.missing),
+ n_branches=n_branches,
+ n_partial_branches=n_partial_branches,
+ n_missing_branches=n_missing_branches,
+ )
+
+ def missing_formatted(self):
+ """The missing line numbers, formatted nicely.
+
+ Returns a string like "1-2, 5-11, 13-14".
+
+ """
+ return format_lines(self.statements, self.missing)
+
+ def has_arcs(self):
+ """Were arcs measured in this result?"""
+ return self.data.has_arcs()
+
+ def arc_possibilities(self):
+ """Returns a sorted list of the arcs in the code."""
+ return self._arc_possibilities
+
+ def arcs_executed(self):
+ """Returns a sorted list of the arcs actually executed in the code."""
+ executed = self.data.arcs(self.filename) or []
+ executed = self.file_reporter.translate_arcs(executed)
+ return sorted(executed)
+
+ def arcs_missing(self):
+ """Returns a sorted list of the arcs in the code not executed."""
+ possible = self.arc_possibilities()
+ executed = self.arcs_executed()
+ missing = (
+ p for p in possible
+ if p not in executed
+ and p[0] not in self.no_branch
+ )
+ return sorted(missing)
+
+ def arcs_missing_formatted(self):
+ """The missing branch arcs, formatted nicely.
+
+ Returns a string like "1->2, 1->3, 16->20". Omits any mention of
+ branches from missing lines, so if line 17 is missing, then 17->18
+ won't be included.
+
+ """
+ arcs = self.missing_branch_arcs()
+ missing = self.missing
+ line_exits = sorted(iitems(arcs))
+ pairs = []
+ for line, exits in line_exits:
+ for ex in sorted(exits):
+ if line not in missing:
+ pairs.append("%d->%s" % (line, (ex if ex > 0 else "exit")))
+ return ', '.join(pairs)
+
+ def arcs_unpredicted(self):
+ """Returns a sorted list of the executed arcs missing from the code."""
+ possible = self.arc_possibilities()
+ executed = self.arcs_executed()
+ # Exclude arcs here which connect a line to itself. They can occur
+ # in executed data in some cases. This is where they can cause
+ # trouble, and here is where it's the least burden to remove them.
+ # Also, generators can somehow cause arcs from "enter" to "exit", so
+ # make sure we have at least one positive value.
+ unpredicted = (
+ e for e in executed
+ if e not in possible
+ and e[0] != e[1]
+ and (e[0] > 0 or e[1] > 0)
+ )
+ return sorted(unpredicted)
+
+ def branch_lines(self):
+ """Returns a list of line numbers that have more than one exit."""
+ return [l1 for l1,count in iitems(self.exit_counts) if count > 1]
+
+ def total_branches(self):
+ """How many total branches are there?"""
+ return sum(count for count in self.exit_counts.values() if count > 1)
+
+ def missing_branch_arcs(self):
+ """Return arcs that weren't executed from branch lines.
+
+ Returns {l1:[l2a,l2b,...], ...}
+
+ """
+ missing = self.arcs_missing()
+ branch_lines = set(self.branch_lines())
+ mba = collections.defaultdict(list)
+ for l1, l2 in missing:
+ if l1 in branch_lines:
+ mba[l1].append(l2)
+ return mba
+
+ def branch_stats(self):
+ """Get stats about branches.
+
+ Returns a dict mapping line numbers to a tuple:
+ (total_exits, taken_exits).
+ """
+
+ missing_arcs = self.missing_branch_arcs()
+ stats = {}
+ for lnum in self.branch_lines():
+ exits = self.exit_counts[lnum]
+ try:
+ missing = len(missing_arcs[lnum])
+ except KeyError:
+ missing = 0
+ stats[lnum] = (exits, exits - missing)
+ return stats
+
+
+class Numbers(object):
+ """The numerical results of measuring coverage.
+
+ This holds the basic statistics from `Analysis`, and is used to roll
+ up statistics across files.
+
+ """
+ # A global to determine the precision on coverage percentages, the number
+ # of decimal places.
+ _precision = 0
+ _near0 = 1.0 # These will change when _precision is changed.
+ _near100 = 99.0
+
+ def __init__(self, n_files=0, n_statements=0, n_excluded=0, n_missing=0,
+ n_branches=0, n_partial_branches=0, n_missing_branches=0
+ ):
+ self.n_files = n_files
+ self.n_statements = n_statements
+ self.n_excluded = n_excluded
+ self.n_missing = n_missing
+ self.n_branches = n_branches
+ self.n_partial_branches = n_partial_branches
+ self.n_missing_branches = n_missing_branches
+
+ def init_args(self):
+ """Return a list for __init__(*args) to recreate this object."""
+ return [
+ self.n_files, self.n_statements, self.n_excluded, self.n_missing,
+ self.n_branches, self.n_partial_branches, self.n_missing_branches,
+ ]
+
+ @classmethod
+ def set_precision(cls, precision):
+ """Set the number of decimal places used to report percentages."""
+ assert 0 <= precision < 10
+ cls._precision = precision
+ cls._near0 = 1.0 / 10**precision
+ cls._near100 = 100.0 - cls._near0
+
+ @property
+ def n_executed(self):
+ """Returns the number of executed statements."""
+ return self.n_statements - self.n_missing
+
+ @property
+ def n_executed_branches(self):
+ """Returns the number of executed branches."""
+ return self.n_branches - self.n_missing_branches
+
+ @property
+ def pc_covered(self):
+ """Returns a single percentage value for coverage."""
+ if self.n_statements > 0:
+ numerator, denominator = self.ratio_covered
+ pc_cov = (100.0 * numerator) / denominator
+ else:
+ pc_cov = 100.0
+ return pc_cov
+
+ @property
+ def pc_covered_str(self):
+ """Returns the percent covered, as a string, without a percent sign.
+
+ Note that "0" is only returned when the value is truly zero, and "100"
+ is only returned when the value is truly 100. Rounding can never
+ result in either "0" or "100".
+
+ """
+ pc = self.pc_covered
+ if 0 < pc < self._near0:
+ pc = self._near0
+ elif self._near100 < pc < 100:
+ pc = self._near100
+ else:
+ pc = round(pc, self._precision)
+ return "%.*f" % (self._precision, pc)
+
+ @classmethod
+ def pc_str_width(cls):
+ """How many characters wide can pc_covered_str be?"""
+ width = 3 # "100"
+ if cls._precision > 0:
+ width += 1 + cls._precision
+ return width
+
+ @property
+ def ratio_covered(self):
+ """Return a numerator and denominator for the coverage ratio."""
+ numerator = self.n_executed + self.n_executed_branches
+ denominator = self.n_statements + self.n_branches
+ return numerator, denominator
+
+ def __add__(self, other):
+ nums = Numbers()
+ nums.n_files = self.n_files + other.n_files
+ nums.n_statements = self.n_statements + other.n_statements
+ nums.n_excluded = self.n_excluded + other.n_excluded
+ nums.n_missing = self.n_missing + other.n_missing
+ nums.n_branches = self.n_branches + other.n_branches
+ nums.n_partial_branches = (
+ self.n_partial_branches + other.n_partial_branches
+ )
+ nums.n_missing_branches = (
+ self.n_missing_branches + other.n_missing_branches
+ )
+ return nums
+
+ def __radd__(self, other):
+ # Implementing 0+Numbers allows us to sum() a list of Numbers.
+ if other == 0:
+ return self
+ return NotImplemented
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/coverage/results.pyc b/Assignments/microblog/flask/lib/python2.7/site-packages/coverage/results.pyc
new file mode 100644
index 0000000..6220c1c
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/coverage/results.pyc differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/coverage/summary.py b/Assignments/microblog/flask/lib/python2.7/site-packages/coverage/summary.py
new file mode 100644
index 0000000..81844b5
--- /dev/null
+++ b/Assignments/microblog/flask/lib/python2.7/site-packages/coverage/summary.py
@@ -0,0 +1,121 @@
+# Licensed under the Apache License: http://www.apache.org/licenses/LICENSE-2.0
+# For details: https://bitbucket.org/ned/coveragepy/src/default/NOTICE.txt
+
+"""Summary reporting"""
+
+import sys
+
+from coverage import env
+from coverage.report import Reporter
+from coverage.results import Numbers
+from coverage.misc import NotPython, CoverageException, output_encoding
+
+
+class SummaryReporter(Reporter):
+ """A reporter for writing the summary report."""
+
+ def __init__(self, coverage, config):
+ super(SummaryReporter, self).__init__(coverage, config)
+ self.branches = coverage.data.has_arcs()
+
+ def report(self, morfs, outfile=None):
+ """Writes a report summarizing coverage statistics per module.
+
+ `outfile` is a file object to write the summary to. It must be opened
+ for native strings (bytes on Python 2, Unicode on Python 3).
+
+ """
+ file_reporters = self.find_file_reporters(morfs)
+
+ # Prepare the formatting strings
+ max_name = max([len(fr.relative_filename()) for fr in file_reporters] + [5])
+ fmt_name = u"%%- %ds " % max_name
+ fmt_err = u"%s %s: %s"
+ fmt_skip_covered = u"\n%s file%s skipped due to complete coverage."
+
+ header = (fmt_name % "Name") + u" Stmts Miss"
+ fmt_coverage = fmt_name + u"%6d %6d"
+ if self.branches:
+ header += u" Branch BrPart"
+ fmt_coverage += u" %6d %6d"
+ width100 = Numbers.pc_str_width()
+ header += u"%*s" % (width100+4, "Cover")
+ fmt_coverage += u"%%%ds%%%%" % (width100+3,)
+ if self.config.show_missing:
+ header += u" Missing"
+ fmt_coverage += u" %s"
+ rule = u"-" * len(header)
+
+ if outfile is None:
+ outfile = sys.stdout
+
+ def writeout(line):
+ """Write a line to the output, adding a newline."""
+ if env.PY2:
+ line = line.encode(output_encoding())
+ outfile.write(line.rstrip())
+ outfile.write("\n")
+
+ # Write the header
+ writeout(header)
+ writeout(rule)
+
+ total = Numbers()
+ skipped_count = 0
+
+ for fr in file_reporters:
+ try:
+ analysis = self.coverage._analyze(fr)
+ nums = analysis.numbers
+ total += nums
+
+ if self.config.skip_covered:
+ # Don't report on 100% files.
+ no_missing_lines = (nums.n_missing == 0)
+ no_missing_branches = (nums.n_partial_branches == 0)
+ if no_missing_lines and no_missing_branches:
+ skipped_count += 1
+ continue
+
+ args = (fr.relative_filename(), nums.n_statements, nums.n_missing)
+ if self.branches:
+ args += (nums.n_branches, nums.n_partial_branches)
+ args += (nums.pc_covered_str,)
+ if self.config.show_missing:
+ missing_fmtd = analysis.missing_formatted()
+ if self.branches:
+ branches_fmtd = analysis.arcs_missing_formatted()
+ if branches_fmtd:
+ if missing_fmtd:
+ missing_fmtd += ", "
+ missing_fmtd += branches_fmtd
+ args += (missing_fmtd,)
+ writeout(fmt_coverage % args)
+ except Exception:
+ report_it = not self.config.ignore_errors
+ if report_it:
+ typ, msg = sys.exc_info()[:2]
+ # NotPython is only raised by PythonFileReporter, which has a
+ # should_be_python() method.
+ if typ is NotPython and not fr.should_be_python():
+ report_it = False
+ if report_it:
+ writeout(fmt_err % (fr.relative_filename(), typ.__name__, msg))
+
+ if total.n_files > 1:
+ writeout(rule)
+ args = ("TOTAL", total.n_statements, total.n_missing)
+ if self.branches:
+ args += (total.n_branches, total.n_partial_branches)
+ args += (total.pc_covered_str,)
+ if self.config.show_missing:
+ args += ("",)
+ writeout(fmt_coverage % args)
+
+ if not total.n_files and not skipped_count:
+ raise CoverageException("No data to report.")
+
+ if self.config.skip_covered and skipped_count:
+ writeout(fmt_skip_covered % (skipped_count, 's' if skipped_count > 1 else ''))
+
+ return total.n_statements and total.pc_covered
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/coverage/summary.pyc b/Assignments/microblog/flask/lib/python2.7/site-packages/coverage/summary.pyc
new file mode 100644
index 0000000..5dd9669
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/coverage/summary.pyc differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/coverage/templite.py b/Assignments/microblog/flask/lib/python2.7/site-packages/coverage/templite.py
new file mode 100644
index 0000000..4c09c11
--- /dev/null
+++ b/Assignments/microblog/flask/lib/python2.7/site-packages/coverage/templite.py
@@ -0,0 +1,290 @@
+# Licensed under the Apache License: http://www.apache.org/licenses/LICENSE-2.0
+# For details: https://bitbucket.org/ned/coveragepy/src/default/NOTICE.txt
+
+"""A simple Python template renderer, for a nano-subset of Django syntax.
+
+For a detailed discussion of this code, see this chapter from 500 Lines:
+http://aosabook.org/en/500L/a-template-engine.html
+
+"""
+
+# Coincidentally named the same as http://code.activestate.com/recipes/496702/
+
+import re
+
+from coverage import env
+
+
+class TempliteSyntaxError(ValueError):
+ """Raised when a template has a syntax error."""
+ pass
+
+
+class TempliteValueError(ValueError):
+ """Raised when an expression won't evaluate in a template."""
+ pass
+
+
+class CodeBuilder(object):
+ """Build source code conveniently."""
+
+ def __init__(self, indent=0):
+ self.code = []
+ self.indent_level = indent
+
+ def __str__(self):
+ return "".join(str(c) for c in self.code)
+
+ def add_line(self, line):
+ """Add a line of source to the code.
+
+ Indentation and newline will be added for you, don't provide them.
+
+ """
+ self.code.extend([" " * self.indent_level, line, "\n"])
+
+ def add_section(self):
+ """Add a section, a sub-CodeBuilder."""
+ section = CodeBuilder(self.indent_level)
+ self.code.append(section)
+ return section
+
+ INDENT_STEP = 4 # PEP8 says so!
+
+ def indent(self):
+ """Increase the current indent for following lines."""
+ self.indent_level += self.INDENT_STEP
+
+ def dedent(self):
+ """Decrease the current indent for following lines."""
+ self.indent_level -= self.INDENT_STEP
+
+ def get_globals(self):
+ """Execute the code, and return a dict of globals it defines."""
+ # A check that the caller really finished all the blocks they started.
+ assert self.indent_level == 0
+ # Get the Python source as a single string.
+ python_source = str(self)
+ # Execute the source, defining globals, and return them.
+ global_namespace = {}
+ exec(python_source, global_namespace)
+ return global_namespace
+
+
+class Templite(object):
+ """A simple template renderer, for a nano-subset of Django syntax.
+
+ Supported constructs are extended variable access::
+
+ {{var.modifier.modifier|filter|filter}}
+
+ loops::
+
+ {% for var in list %}...{% endfor %}
+
+ and ifs::
+
+ {% if var %}...{% endif %}
+
+ Comments are within curly-hash markers::
+
+ {# This will be ignored #}
+
+ Any of these constructs can have a hypen at the end (`-}}`, `-%}`, `-#}`),
+ which will collapse the whitespace following the tag.
+
+ Construct a Templite with the template text, then use `render` against a
+ dictionary context to create a finished string::
+
+ templite = Templite('''
+ Hello {{name|upper}}!
+ {% for topic in topics %}
+ You are interested in {{topic}}.
+ {% endif %}
+ ''',
+ {'upper': str.upper},
+ )
+ text = templite.render({
+ 'name': "Ned",
+ 'topics': ['Python', 'Geometry', 'Juggling'],
+ })
+
+ """
+ def __init__(self, text, *contexts):
+ """Construct a Templite with the given `text`.
+
+ `contexts` are dictionaries of values to use for future renderings.
+ These are good for filters and global values.
+
+ """
+ self.context = {}
+ for context in contexts:
+ self.context.update(context)
+
+ self.all_vars = set()
+ self.loop_vars = set()
+
+ # We construct a function in source form, then compile it and hold onto
+ # it, and execute it to render the template.
+ code = CodeBuilder()
+
+ code.add_line("def render_function(context, do_dots):")
+ code.indent()
+ vars_code = code.add_section()
+ code.add_line("result = []")
+ code.add_line("append_result = result.append")
+ code.add_line("extend_result = result.extend")
+ if env.PY2:
+ code.add_line("to_str = unicode")
+ else:
+ code.add_line("to_str = str")
+
+ buffered = []
+
+ def flush_output():
+ """Force `buffered` to the code builder."""
+ if len(buffered) == 1:
+ code.add_line("append_result(%s)" % buffered[0])
+ elif len(buffered) > 1:
+ code.add_line("extend_result([%s])" % ", ".join(buffered))
+ del buffered[:]
+
+ ops_stack = []
+
+ # Split the text to form a list of tokens.
+ tokens = re.split(r"(?s)({{.*?}}|{%.*?%}|{#.*?#})", text)
+
+ squash = False
+
+ for token in tokens:
+ if token.startswith('{'):
+ start, end = 2, -2
+ squash = (token[-3] == '-')
+ if squash:
+ end = -3
+
+ if token.startswith('{#'):
+ # Comment: ignore it and move on.
+ continue
+ elif token.startswith('{{'):
+ # An expression to evaluate.
+ expr = self._expr_code(token[start:end].strip())
+ buffered.append("to_str(%s)" % expr)
+ elif token.startswith('{%'):
+ # Action tag: split into words and parse further.
+ flush_output()
+
+ words = token[start:end].strip().split()
+ if words[0] == 'if':
+ # An if statement: evaluate the expression to determine if.
+ if len(words) != 2:
+ self._syntax_error("Don't understand if", token)
+ ops_stack.append('if')
+ code.add_line("if %s:" % self._expr_code(words[1]))
+ code.indent()
+ elif words[0] == 'for':
+ # A loop: iterate over expression result.
+ if len(words) != 4 or words[2] != 'in':
+ self._syntax_error("Don't understand for", token)
+ ops_stack.append('for')
+ self._variable(words[1], self.loop_vars)
+ code.add_line(
+ "for c_%s in %s:" % (
+ words[1],
+ self._expr_code(words[3])
+ )
+ )
+ code.indent()
+ elif words[0].startswith('end'):
+ # Endsomething. Pop the ops stack.
+ if len(words) != 1:
+ self._syntax_error("Don't understand end", token)
+ end_what = words[0][3:]
+ if not ops_stack:
+ self._syntax_error("Too many ends", token)
+ start_what = ops_stack.pop()
+ if start_what != end_what:
+ self._syntax_error("Mismatched end tag", end_what)
+ code.dedent()
+ else:
+ self._syntax_error("Don't understand tag", words[0])
+ else:
+ # Literal content. If it isn't empty, output it.
+ if squash:
+ token = token.lstrip()
+ if token:
+ buffered.append(repr(token))
+
+ if ops_stack:
+ self._syntax_error("Unmatched action tag", ops_stack[-1])
+
+ flush_output()
+
+ for var_name in self.all_vars - self.loop_vars:
+ vars_code.add_line("c_%s = context[%r]" % (var_name, var_name))
+
+ code.add_line('return "".join(result)')
+ code.dedent()
+ self._render_function = code.get_globals()['render_function']
+
+ def _expr_code(self, expr):
+ """Generate a Python expression for `expr`."""
+ if "|" in expr:
+ pipes = expr.split("|")
+ code = self._expr_code(pipes[0])
+ for func in pipes[1:]:
+ self._variable(func, self.all_vars)
+ code = "c_%s(%s)" % (func, code)
+ elif "." in expr:
+ dots = expr.split(".")
+ code = self._expr_code(dots[0])
+ args = ", ".join(repr(d) for d in dots[1:])
+ code = "do_dots(%s, %s)" % (code, args)
+ else:
+ self._variable(expr, self.all_vars)
+ code = "c_%s" % expr
+ return code
+
+ def _syntax_error(self, msg, thing):
+ """Raise a syntax error using `msg`, and showing `thing`."""
+ raise TempliteSyntaxError("%s: %r" % (msg, thing))
+
+ def _variable(self, name, vars_set):
+ """Track that `name` is used as a variable.
+
+ Adds the name to `vars_set`, a set of variable names.
+
+ Raises an syntax error if `name` is not a valid name.
+
+ """
+ if not re.match(r"[_a-zA-Z][_a-zA-Z0-9]*$", name):
+ self._syntax_error("Not a valid name", name)
+ vars_set.add(name)
+
+ def render(self, context=None):
+ """Render this template by applying it to `context`.
+
+ `context` is a dictionary of values to use in this rendering.
+
+ """
+ # Make the complete context we'll use.
+ render_context = dict(self.context)
+ if context:
+ render_context.update(context)
+ return self._render_function(render_context, self._do_dots)
+
+ def _do_dots(self, value, *dots):
+ """Evaluate dotted expressions at run-time."""
+ for dot in dots:
+ try:
+ value = getattr(value, dot)
+ except AttributeError:
+ try:
+ value = value[dot]
+ except (TypeError, KeyError):
+ raise TempliteValueError(
+ "Couldn't evaluate %r.%s" % (value, dot)
+ )
+ if callable(value):
+ value = value()
+ return value
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/coverage/templite.pyc b/Assignments/microblog/flask/lib/python2.7/site-packages/coverage/templite.pyc
new file mode 100644
index 0000000..f36f28b
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/coverage/templite.pyc differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/coverage/test_helpers.py b/Assignments/microblog/flask/lib/python2.7/site-packages/coverage/test_helpers.py
new file mode 100644
index 0000000..a76bed3
--- /dev/null
+++ b/Assignments/microblog/flask/lib/python2.7/site-packages/coverage/test_helpers.py
@@ -0,0 +1,390 @@
+# Licensed under the Apache License: http://www.apache.org/licenses/LICENSE-2.0
+# For details: https://bitbucket.org/ned/coveragepy/src/default/NOTICE.txt
+
+"""Mixin classes to help make good tests."""
+
+import atexit
+import collections
+import contextlib
+import os
+import random
+import shutil
+import sys
+import tempfile
+import textwrap
+
+from coverage.backunittest import TestCase
+from coverage.backward import StringIO, to_bytes
+
+
+class Tee(object):
+ """A file-like that writes to all the file-likes it has."""
+
+ def __init__(self, *files):
+ """Make a Tee that writes to all the files in `files.`"""
+ self._files = files
+ if hasattr(files[0], "encoding"):
+ self.encoding = files[0].encoding
+
+ def write(self, data):
+ """Write `data` to all the files."""
+ for f in self._files:
+ f.write(data)
+
+ def flush(self):
+ """Flush the data on all the files."""
+ for f in self._files:
+ f.flush()
+
+ if 0:
+ # Use this if you need to use a debugger, though it makes some tests
+ # fail, I'm not sure why...
+ def __getattr__(self, name):
+ return getattr(self._files[0], name)
+
+
+@contextlib.contextmanager
+def change_dir(new_dir):
+ """Change directory, and then change back.
+
+ Use as a context manager, it will give you the new directory, and later
+ restore the old one.
+
+ """
+ old_dir = os.getcwd()
+ os.chdir(new_dir)
+ try:
+ yield os.getcwd()
+ finally:
+ os.chdir(old_dir)
+
+
+@contextlib.contextmanager
+def saved_sys_path():
+ """Save sys.path, and restore it later."""
+ old_syspath = sys.path[:]
+ try:
+ yield
+ finally:
+ sys.path = old_syspath
+
+
+def setup_with_context_manager(testcase, cm):
+ """Use a contextmanager to setUp a test case.
+
+ If you have a context manager you like::
+
+ with ctxmgr(a, b, c) as v:
+ # do something with v
+
+ and you want to have that effect for a test case, call this function from
+ your setUp, and it will start the context manager for your test, and end it
+ when the test is done::
+
+ def setUp(self):
+ self.v = setup_with_context_manager(self, ctxmgr(a, b, c))
+
+ def test_foo(self):
+ # do something with self.v
+
+ """
+ val = cm.__enter__()
+ testcase.addCleanup(cm.__exit__, None, None, None)
+ return val
+
+
+class ModuleAwareMixin(TestCase):
+ """A test case mixin that isolates changes to sys.modules."""
+
+ def setUp(self):
+ super(ModuleAwareMixin, self).setUp()
+
+ # Record sys.modules here so we can restore it in cleanup_modules.
+ self.old_modules = list(sys.modules)
+ self.addCleanup(self.cleanup_modules)
+
+ def cleanup_modules(self):
+ """Remove any new modules imported during the test run.
+
+ This lets us import the same source files for more than one test.
+
+ """
+ for m in [m for m in sys.modules if m not in self.old_modules]:
+ del sys.modules[m]
+
+
+class SysPathAwareMixin(TestCase):
+ """A test case mixin that isolates changes to sys.path."""
+
+ def setUp(self):
+ super(SysPathAwareMixin, self).setUp()
+ setup_with_context_manager(self, saved_sys_path())
+
+
+class EnvironmentAwareMixin(TestCase):
+ """A test case mixin that isolates changes to the environment."""
+
+ def setUp(self):
+ super(EnvironmentAwareMixin, self).setUp()
+
+ # Record environment variables that we changed with set_environ.
+ self.environ_undos = {}
+
+ self.addCleanup(self.cleanup_environ)
+
+ def set_environ(self, name, value):
+ """Set an environment variable `name` to be `value`.
+
+ The environment variable is set, and record is kept that it was set,
+ so that `cleanup_environ` can restore its original value.
+
+ """
+ if name not in self.environ_undos:
+ self.environ_undos[name] = os.environ.get(name)
+ os.environ[name] = value
+
+ def cleanup_environ(self):
+ """Undo all the changes made by `set_environ`."""
+ for name, value in self.environ_undos.items():
+ if value is None:
+ del os.environ[name]
+ else:
+ os.environ[name] = value
+
+
+class StdStreamCapturingMixin(TestCase):
+ """A test case mixin that captures stdout and stderr."""
+
+ def setUp(self):
+ super(StdStreamCapturingMixin, self).setUp()
+
+ # Capture stdout and stderr so we can examine them in tests.
+ # nose keeps stdout from littering the screen, so we can safely Tee it,
+ # but it doesn't capture stderr, so we don't want to Tee stderr to the
+ # real stderr, since it will interfere with our nice field of dots.
+ old_stdout = sys.stdout
+ self.captured_stdout = StringIO()
+ sys.stdout = Tee(sys.stdout, self.captured_stdout)
+
+ old_stderr = sys.stderr
+ self.captured_stderr = StringIO()
+ sys.stderr = self.captured_stderr
+
+ self.addCleanup(self.cleanup_std_streams, old_stdout, old_stderr)
+
+ def cleanup_std_streams(self, old_stdout, old_stderr):
+ """Restore stdout and stderr."""
+ sys.stdout = old_stdout
+ sys.stderr = old_stderr
+
+ def stdout(self):
+ """Return the data written to stdout during the test."""
+ return self.captured_stdout.getvalue()
+
+ def stderr(self):
+ """Return the data written to stderr during the test."""
+ return self.captured_stderr.getvalue()
+
+
+class DelayedAssertionMixin(TestCase):
+ """A test case mixin that provides a `delayed_assertions` context manager.
+
+ Use it like this::
+
+ with self.delayed_assertions():
+ self.assertEqual(x, y)
+ self.assertEqual(z, w)
+
+ All of the assertions will run. The failures will be displayed at the end
+ of the with-statement.
+
+ NOTE: this only works with some assertions. These are known to work:
+
+ - `assertEqual(str, str)`
+
+ - `assertMultilineEqual(str, str)`
+
+ """
+ def __init__(self, *args, **kwargs):
+ super(DelayedAssertionMixin, self).__init__(*args, **kwargs)
+ # This mixin only works with assert methods that call `self.fail`. In
+ # Python 2.7, `assertEqual` didn't, but we can do what Python 3 does,
+ # and use `assertMultiLineEqual` for comparing strings.
+ self.addTypeEqualityFunc(str, 'assertMultiLineEqual')
+ self._delayed_assertions = None
+
+ @contextlib.contextmanager
+ def delayed_assertions(self):
+ """The context manager: assert that we didn't collect any assertions."""
+ self._delayed_assertions = []
+ old_fail = self.fail
+ self.fail = self._delayed_fail
+ try:
+ yield
+ finally:
+ self.fail = old_fail
+ if self._delayed_assertions:
+ if len(self._delayed_assertions) == 1:
+ self.fail(self._delayed_assertions[0])
+ else:
+ self.fail(
+ "{0} failed assertions:\n{1}".format(
+ len(self._delayed_assertions),
+ "\n".join(self._delayed_assertions),
+ )
+ )
+
+ def _delayed_fail(self, msg=None):
+ """The stand-in for TestCase.fail during delayed_assertions."""
+ self._delayed_assertions.append(msg)
+
+
+class TempDirMixin(SysPathAwareMixin, ModuleAwareMixin, TestCase):
+ """A test case mixin that creates a temp directory and files in it.
+
+ Includes SysPathAwareMixin and ModuleAwareMixin, because making and using
+ temp directories like this will also need that kind of isolation.
+
+ """
+
+ # Our own setting: most of these tests run in their own temp directory.
+ # Set this to False in your subclass if you don't want a temp directory
+ # created.
+ run_in_temp_dir = True
+
+ # Set this if you aren't creating any files with make_file, but still want
+ # the temp directory. This will stop the test behavior checker from
+ # complaining.
+ no_files_in_temp_dir = False
+
+ def setUp(self):
+ super(TempDirMixin, self).setUp()
+
+ if self.run_in_temp_dir:
+ # Create a temporary directory.
+ self.temp_dir = self.make_temp_dir("test_cover")
+ self.chdir(self.temp_dir)
+
+ # Modules should be importable from this temp directory. We don't
+ # use '' because we make lots of different temp directories and
+ # nose's caching importer can get confused. The full path prevents
+ # problems.
+ sys.path.insert(0, os.getcwd())
+
+ class_behavior = self.class_behavior()
+ class_behavior.tests += 1
+ class_behavior.temp_dir = self.run_in_temp_dir
+ class_behavior.no_files_ok = self.no_files_in_temp_dir
+
+ self.addCleanup(self.check_behavior)
+
+ def make_temp_dir(self, slug="test_cover"):
+ """Make a temp directory that is cleaned up when the test is done."""
+ name = "%s_%08d" % (slug, random.randint(0, 99999999))
+ temp_dir = os.path.join(tempfile.gettempdir(), name)
+ os.makedirs(temp_dir)
+ self.addCleanup(shutil.rmtree, temp_dir)
+ return temp_dir
+
+ def chdir(self, new_dir):
+ """Change directory, and change back when the test is done."""
+ old_dir = os.getcwd()
+ os.chdir(new_dir)
+ self.addCleanup(os.chdir, old_dir)
+
+ def check_behavior(self):
+ """Check that we did the right things."""
+
+ class_behavior = self.class_behavior()
+ if class_behavior.test_method_made_any_files:
+ class_behavior.tests_making_files += 1
+
+ def make_file(self, filename, text="", newline=None):
+ """Create a file for testing.
+
+ `filename` is the relative path to the file, including directories if
+ desired, which will be created if need be.
+
+ `text` is the content to create in the file, a native string (bytes in
+ Python 2, unicode in Python 3).
+
+ If `newline` is provided, it is a string that will be used as the line
+ endings in the created file, otherwise the line endings are as provided
+ in `text`.
+
+ Returns `filename`.
+
+ """
+ # Tests that call `make_file` should be run in a temp environment.
+ assert self.run_in_temp_dir
+ self.class_behavior().test_method_made_any_files = True
+
+ text = textwrap.dedent(text)
+ if newline:
+ text = text.replace("\n", newline)
+
+ # Make sure the directories are available.
+ dirs, _ = os.path.split(filename)
+ if dirs and not os.path.exists(dirs):
+ os.makedirs(dirs)
+
+ # Create the file.
+ with open(filename, 'wb') as f:
+ f.write(to_bytes(text))
+
+ return filename
+
+ # We run some tests in temporary directories, because they may need to make
+ # files for the tests. But this is expensive, so we can change per-class
+ # whether a temp directory is used or not. It's easy to forget to set that
+ # option properly, so we track information about what the tests did, and
+ # then report at the end of the process on test classes that were set
+ # wrong.
+
+ class ClassBehavior(object):
+ """A value object to store per-class."""
+ def __init__(self):
+ self.tests = 0
+ self.skipped = 0
+ self.temp_dir = True
+ self.no_files_ok = False
+ self.tests_making_files = 0
+ self.test_method_made_any_files = False
+
+ # Map from class to info about how it ran.
+ class_behaviors = collections.defaultdict(ClassBehavior)
+
+ @classmethod
+ def report_on_class_behavior(cls):
+ """Called at process exit to report on class behavior."""
+ for test_class, behavior in cls.class_behaviors.items():
+ bad = ""
+ if behavior.tests <= behavior.skipped:
+ bad = ""
+ elif behavior.temp_dir and behavior.tests_making_files == 0:
+ if not behavior.no_files_ok:
+ bad = "Inefficient"
+ elif not behavior.temp_dir and behavior.tests_making_files > 0:
+ bad = "Unsafe"
+
+ if bad:
+ if behavior.temp_dir:
+ where = "in a temp directory"
+ else:
+ where = "without a temp directory"
+ print(
+ "%s: %s ran %d tests, %d made files %s" % (
+ bad,
+ test_class.__name__,
+ behavior.tests,
+ behavior.tests_making_files,
+ where,
+ )
+ )
+
+ def class_behavior(self):
+ """Get the ClassBehavior instance for this test."""
+ return self.class_behaviors[self.__class__]
+
+# When the process ends, find out about bad classes.
+atexit.register(TempDirMixin.report_on_class_behavior)
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/coverage/test_helpers.pyc b/Assignments/microblog/flask/lib/python2.7/site-packages/coverage/test_helpers.pyc
new file mode 100644
index 0000000..b099f41
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/coverage/test_helpers.pyc differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/coverage/version.py b/Assignments/microblog/flask/lib/python2.7/site-packages/coverage/version.py
new file mode 100644
index 0000000..23f6704
--- /dev/null
+++ b/Assignments/microblog/flask/lib/python2.7/site-packages/coverage/version.py
@@ -0,0 +1,33 @@
+# Licensed under the Apache License: http://www.apache.org/licenses/LICENSE-2.0
+# For details: https://bitbucket.org/ned/coveragepy/src/default/NOTICE.txt
+
+"""The version and URL for coverage.py"""
+# This file is exec'ed in setup.py, don't import anything!
+
+# Same semantics as sys.version_info.
+version_info = (4, 1, 0, 'final', 0)
+
+
+def _make_version(major, minor, micro, releaselevel, serial):
+ """Create a readable version string from version_info tuple components."""
+ assert releaselevel in ['alpha', 'beta', 'candidate', 'final']
+ version = "%d.%d" % (major, minor)
+ if micro:
+ version += ".%d" % (micro,)
+ if releaselevel != 'final':
+ short = {'alpha': 'a', 'beta': 'b', 'candidate': 'rc'}[releaselevel]
+ version += "%s%d" % (short, serial)
+ return version
+
+
+def _make_url(major, minor, micro, releaselevel, serial):
+ """Make the URL people should start at for this version of coverage.py."""
+ url = "https://coverage.readthedocs.io"
+ if releaselevel != 'final':
+ # For pre-releases, use a version-specific URL.
+ url += "/en/coverage-" + _make_version(major, minor, micro, releaselevel, serial)
+ return url
+
+
+__version__ = _make_version(*version_info)
+__url__ = _make_url(*version_info)
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/coverage/version.pyc b/Assignments/microblog/flask/lib/python2.7/site-packages/coverage/version.pyc
new file mode 100644
index 0000000..2790313
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/coverage/version.pyc differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/coverage/xmlreport.py b/Assignments/microblog/flask/lib/python2.7/site-packages/coverage/xmlreport.py
new file mode 100644
index 0000000..dbda5f2
--- /dev/null
+++ b/Assignments/microblog/flask/lib/python2.7/site-packages/coverage/xmlreport.py
@@ -0,0 +1,218 @@
+# Licensed under the Apache License: http://www.apache.org/licenses/LICENSE-2.0
+# For details: https://bitbucket.org/ned/coveragepy/src/default/NOTICE.txt
+
+"""XML reporting for coverage.py"""
+
+import os
+import os.path
+import sys
+import time
+import xml.dom.minidom
+
+from coverage import env
+from coverage import __url__, __version__, files
+from coverage.backward import iitems
+from coverage.misc import isolate_module
+from coverage.report import Reporter
+
+os = isolate_module(os)
+
+
+DTD_URL = (
+ 'https://raw.githubusercontent.com/cobertura/web/'
+ 'f0366e5e2cf18f111cbd61fc34ef720a6584ba02'
+ '/htdocs/xml/coverage-03.dtd'
+)
+
+
+def rate(hit, num):
+ """Return the fraction of `hit`/`num`, as a string."""
+ if num == 0:
+ return "1"
+ else:
+ return "%.4g" % (float(hit) / num)
+
+
+class XmlReporter(Reporter):
+ """A reporter for writing Cobertura-style XML coverage results."""
+
+ def __init__(self, coverage, config):
+ super(XmlReporter, self).__init__(coverage, config)
+
+ self.source_paths = set()
+ if config.source:
+ for src in config.source:
+ if os.path.exists(src):
+ self.source_paths.add(files.canonical_filename(src))
+ self.packages = {}
+ self.xml_out = None
+ self.has_arcs = coverage.data.has_arcs()
+
+ def report(self, morfs, outfile=None):
+ """Generate a Cobertura-compatible XML report for `morfs`.
+
+ `morfs` is a list of modules or file names.
+
+ `outfile` is a file object to write the XML to.
+
+ """
+ # Initial setup.
+ outfile = outfile or sys.stdout
+
+ # Create the DOM that will store the data.
+ impl = xml.dom.minidom.getDOMImplementation()
+ self.xml_out = impl.createDocument(None, "coverage", None)
+
+ # Write header stuff.
+ xcoverage = self.xml_out.documentElement
+ xcoverage.setAttribute("version", __version__)
+ xcoverage.setAttribute("timestamp", str(int(time.time()*1000)))
+ xcoverage.appendChild(self.xml_out.createComment(
+ " Generated by coverage.py: %s " % __url__
+ ))
+ xcoverage.appendChild(self.xml_out.createComment(" Based on %s " % DTD_URL))
+
+ # Call xml_file for each file in the data.
+ self.report_files(self.xml_file, morfs)
+
+ xsources = self.xml_out.createElement("sources")
+ xcoverage.appendChild(xsources)
+
+ # Populate the XML DOM with the source info.
+ for path in sorted(self.source_paths):
+ xsource = self.xml_out.createElement("source")
+ xsources.appendChild(xsource)
+ txt = self.xml_out.createTextNode(path)
+ xsource.appendChild(txt)
+
+ lnum_tot, lhits_tot = 0, 0
+ bnum_tot, bhits_tot = 0, 0
+
+ xpackages = self.xml_out.createElement("packages")
+ xcoverage.appendChild(xpackages)
+
+ # Populate the XML DOM with the package info.
+ for pkg_name, pkg_data in sorted(iitems(self.packages)):
+ class_elts, lhits, lnum, bhits, bnum = pkg_data
+ xpackage = self.xml_out.createElement("package")
+ xpackages.appendChild(xpackage)
+ xclasses = self.xml_out.createElement("classes")
+ xpackage.appendChild(xclasses)
+ for _, class_elt in sorted(iitems(class_elts)):
+ xclasses.appendChild(class_elt)
+ xpackage.setAttribute("name", pkg_name.replace(os.sep, '.'))
+ xpackage.setAttribute("line-rate", rate(lhits, lnum))
+ if self.has_arcs:
+ branch_rate = rate(bhits, bnum)
+ else:
+ branch_rate = "0"
+ xpackage.setAttribute("branch-rate", branch_rate)
+ xpackage.setAttribute("complexity", "0")
+
+ lnum_tot += lnum
+ lhits_tot += lhits
+ bnum_tot += bnum
+ bhits_tot += bhits
+
+ xcoverage.setAttribute("line-rate", rate(lhits_tot, lnum_tot))
+ if self.has_arcs:
+ branch_rate = rate(bhits_tot, bnum_tot)
+ else:
+ branch_rate = "0"
+ xcoverage.setAttribute("branch-rate", branch_rate)
+
+ # Use the DOM to write the output file.
+ out = self.xml_out.toprettyxml()
+ if env.PY2:
+ out = out.encode("utf8")
+ outfile.write(out)
+
+ # Return the total percentage.
+ denom = lnum_tot + bnum_tot
+ if denom == 0:
+ pct = 0.0
+ else:
+ pct = 100.0 * (lhits_tot + bhits_tot) / denom
+ return pct
+
+ def xml_file(self, fr, analysis):
+ """Add to the XML report for a single file."""
+
+ # Create the 'lines' and 'package' XML elements, which
+ # are populated later. Note that a package == a directory.
+ filename = fr.filename.replace("\\", "/")
+ for source_path in self.source_paths:
+ if filename.startswith(source_path.replace("\\", "/") + "/"):
+ rel_name = filename[len(source_path)+1:]
+ break
+ else:
+ rel_name = fr.relative_filename()
+
+ dirname = os.path.dirname(rel_name) or "."
+ dirname = "/".join(dirname.split("/")[:self.config.xml_package_depth])
+ package_name = dirname.replace("/", ".")
+
+ if rel_name != fr.filename:
+ self.source_paths.add(fr.filename[:-len(rel_name)].rstrip(r"\/"))
+ package = self.packages.setdefault(package_name, [{}, 0, 0, 0, 0])
+
+ xclass = self.xml_out.createElement("class")
+
+ xclass.appendChild(self.xml_out.createElement("methods"))
+
+ xlines = self.xml_out.createElement("lines")
+ xclass.appendChild(xlines)
+
+ xclass.setAttribute("name", os.path.relpath(rel_name, dirname))
+ xclass.setAttribute("filename", fr.relative_filename().replace("\\", "/"))
+ xclass.setAttribute("complexity", "0")
+
+ branch_stats = analysis.branch_stats()
+ missing_branch_arcs = analysis.missing_branch_arcs()
+
+ # For each statement, create an XML 'line' element.
+ for line in sorted(analysis.statements):
+ xline = self.xml_out.createElement("line")
+ xline.setAttribute("number", str(line))
+
+ # Q: can we get info about the number of times a statement is
+ # executed? If so, that should be recorded here.
+ xline.setAttribute("hits", str(int(line not in analysis.missing)))
+
+ if self.has_arcs:
+ if line in branch_stats:
+ total, taken = branch_stats[line]
+ xline.setAttribute("branch", "true")
+ xline.setAttribute(
+ "condition-coverage",
+ "%d%% (%d/%d)" % (100*taken/total, taken, total)
+ )
+ if line in missing_branch_arcs:
+ annlines = ["exit" if b < 0 else str(b) for b in missing_branch_arcs[line]]
+ xline.setAttribute("missing-branches", ",".join(annlines))
+ xlines.appendChild(xline)
+
+ class_lines = len(analysis.statements)
+ class_hits = class_lines - len(analysis.missing)
+
+ if self.has_arcs:
+ class_branches = sum(t for t, k in branch_stats.values())
+ missing_branches = sum(t - k for t, k in branch_stats.values())
+ class_br_hits = class_branches - missing_branches
+ else:
+ class_branches = 0.0
+ class_br_hits = 0.0
+
+ # Finalize the statistics that are collected in the XML DOM.
+ xclass.setAttribute("line-rate", rate(class_hits, class_lines))
+ if self.has_arcs:
+ branch_rate = rate(class_br_hits, class_branches)
+ else:
+ branch_rate = "0"
+ xclass.setAttribute("branch-rate", branch_rate)
+
+ package[0][rel_name] = xclass
+ package[1] += class_hits
+ package[2] += class_lines
+ package[3] += class_br_hits
+ package[4] += class_branches
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/coverage/xmlreport.pyc b/Assignments/microblog/flask/lib/python2.7/site-packages/coverage/xmlreport.pyc
new file mode 100644
index 0000000..9792982
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/coverage/xmlreport.pyc differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/decorator-4.0.9.dist-info/DESCRIPTION.rst b/Assignments/microblog/flask/lib/python2.7/site-packages/decorator-4.0.9.dist-info/DESCRIPTION.rst
new file mode 100644
index 0000000..65ca0db
--- /dev/null
+++ b/Assignments/microblog/flask/lib/python2.7/site-packages/decorator-4.0.9.dist-info/DESCRIPTION.rst
@@ -0,0 +1,64 @@
+Decorator module
+=================
+
+:Author: Michele Simionato
+:E-mail: michele.simionato@gmail.com
+:Requires: Python 2.6+
+:Download page: http://pypi.python.org/pypi/decorator
+:Installation: ``pip install decorator``
+:License: BSD license
+
+Installation
+-------------
+
+If you are lazy, just perform
+
+ `$ pip install decorator`
+
+which will install just the module on your system.
+
+If you prefer to install the full distribution from source, including
+the documentation, download the tarball_, unpack it and run
+
+ `$ python setup.py install`
+
+in the main directory, possibly as superuser.
+
+.. _tarball: http://pypi.python.org/pypi/decorator
+
+
+Testing
+--------
+
+Run
+
+ `$ python src/tests/test.py -v`
+
+or (if you have setuptools installed)
+
+ `$ python setup.py test`
+
+Notice that you may run into trouble if in your system there
+is an older version of the decorator module; in such a case remove the
+old version. It is safe even to copy the module `decorator.py` over
+an existing one, since version 4.0 is backward-compatible.
+
+Documentation
+--------------
+
+There are various versions of the documentation:
+
+- `HTML version`_
+- `PDF version`_
+
+.. _HTML version: http://pythonhosted.org/decorator/documentation.html
+.. _PDF version: https://github.com/micheles/decorator/blob/4.0.9/documentation.pdf
+
+Repository
+---------------
+
+The project is hosted on GitHub. You can look at the source here:
+
+ https://github.com/micheles/decorator
+
+
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/decorator-4.0.9.dist-info/INSTALLER b/Assignments/microblog/flask/lib/python2.7/site-packages/decorator-4.0.9.dist-info/INSTALLER
new file mode 100644
index 0000000..a1b589e
--- /dev/null
+++ b/Assignments/microblog/flask/lib/python2.7/site-packages/decorator-4.0.9.dist-info/INSTALLER
@@ -0,0 +1 @@
+pip
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/decorator-4.0.9.dist-info/METADATA b/Assignments/microblog/flask/lib/python2.7/site-packages/decorator-4.0.9.dist-info/METADATA
new file mode 100644
index 0000000..bacf9f7
--- /dev/null
+++ b/Assignments/microblog/flask/lib/python2.7/site-packages/decorator-4.0.9.dist-info/METADATA
@@ -0,0 +1,84 @@
+Metadata-Version: 2.0
+Name: decorator
+Version: 4.0.9
+Summary: Better living through Python with decorators
+Home-page: https://github.com/micheles/decorator
+Author: Michele Simionato
+Author-email: michele.simionato@gmail.com
+License: new BSD License
+Keywords: decorators generic utility
+Platform: All
+Classifier: Development Status :: 5 - Production/Stable
+Classifier: Intended Audience :: Developers
+Classifier: License :: OSI Approved :: BSD License
+Classifier: Natural Language :: English
+Classifier: Operating System :: OS Independent
+Classifier: Programming Language :: Python
+Classifier: Programming Language :: Python :: 3
+Classifier: Topic :: Software Development :: Libraries
+Classifier: Topic :: Utilities
+
+Decorator module
+=================
+
+:Author: Michele Simionato
+:E-mail: michele.simionato@gmail.com
+:Requires: Python 2.6+
+:Download page: http://pypi.python.org/pypi/decorator
+:Installation: ``pip install decorator``
+:License: BSD license
+
+Installation
+-------------
+
+If you are lazy, just perform
+
+ `$ pip install decorator`
+
+which will install just the module on your system.
+
+If you prefer to install the full distribution from source, including
+the documentation, download the tarball_, unpack it and run
+
+ `$ python setup.py install`
+
+in the main directory, possibly as superuser.
+
+.. _tarball: http://pypi.python.org/pypi/decorator
+
+
+Testing
+--------
+
+Run
+
+ `$ python src/tests/test.py -v`
+
+or (if you have setuptools installed)
+
+ `$ python setup.py test`
+
+Notice that you may run into trouble if in your system there
+is an older version of the decorator module; in such a case remove the
+old version. It is safe even to copy the module `decorator.py` over
+an existing one, since version 4.0 is backward-compatible.
+
+Documentation
+--------------
+
+There are various versions of the documentation:
+
+- `HTML version`_
+- `PDF version`_
+
+.. _HTML version: http://pythonhosted.org/decorator/documentation.html
+.. _PDF version: https://github.com/micheles/decorator/blob/4.0.9/documentation.pdf
+
+Repository
+---------------
+
+The project is hosted on GitHub. You can look at the source here:
+
+ https://github.com/micheles/decorator
+
+
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/decorator-4.0.9.dist-info/RECORD b/Assignments/microblog/flask/lib/python2.7/site-packages/decorator-4.0.9.dist-info/RECORD
new file mode 100644
index 0000000..8048838
--- /dev/null
+++ b/Assignments/microblog/flask/lib/python2.7/site-packages/decorator-4.0.9.dist-info/RECORD
@@ -0,0 +1,10 @@
+decorator.py,sha256=4gVB5S4zl_G36ed0gPccEnny_7qB0WOiL83LiMoXmx0,15775
+decorator-4.0.9.dist-info/DESCRIPTION.rst,sha256=IbQVtyN6VnoVQOMyJ0iySryVxBpoVuhvdz04U_GFNcs,1436
+decorator-4.0.9.dist-info/METADATA,sha256=7B-gAR0qMLXfZ34x9vDF24e_vFg2fy2-lp2suUf08VI,2152
+decorator-4.0.9.dist-info/RECORD,,
+decorator-4.0.9.dist-info/SOURCES.txt~,sha256=3FVHp69dNWvnHfk1eK8IQuZtDqxhmm3fVwxLsMU0U5Y,371
+decorator-4.0.9.dist-info/WHEEL,sha256=GrqQvamwgBV4nLoJe0vhYRSWzWsx7xjlt74FT0SWYfE,110
+decorator-4.0.9.dist-info/metadata.json,sha256=q4RCR9t6yPblcerb-EmpJwumvIWaO-9LJgNFc6JHlQE,874
+decorator-4.0.9.dist-info/top_level.txt,sha256=Kn6eQjo83ctWxXVyBMOYt0_YpjRjBznKYVuNyuC_DSI,10
+decorator-4.0.9.dist-info/INSTALLER,sha256=zuuue4knoyJ-UwPPXg8fezS7VCrXJQrAP7zeNuwvFQg,4
+decorator.pyc,,
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/decorator-4.0.9.dist-info/SOURCES.txt~ b/Assignments/microblog/flask/lib/python2.7/site-packages/decorator-4.0.9.dist-info/SOURCES.txt~
new file mode 100644
index 0000000..6b76f94
--- /dev/null
+++ b/Assignments/microblog/flask/lib/python2.7/site-packages/decorator-4.0.9.dist-info/SOURCES.txt~
@@ -0,0 +1,17 @@
+CHANGES.txt
+LICENSE.txt
+MANIFEST.in
+documentation.pdf
+performance.sh
+setup.cfg
+setup.py
+docs/README.rst
+src/decorator.py
+src/decorator.egg-info/PKG-INFO
+src/decorator.egg-info/SOURCES.txt
+src/decorator.egg-info/dependency_links.txt
+src/decorator.egg-info/not-zip-safe
+src/decorator.egg-info/top_level.txt
+src/tests/__init__.py
+src/tests/documentation.py
+src/tests/test.py
\ No newline at end of file
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/decorator-4.0.9.dist-info/WHEEL b/Assignments/microblog/flask/lib/python2.7/site-packages/decorator-4.0.9.dist-info/WHEEL
new file mode 100644
index 0000000..0de529b
--- /dev/null
+++ b/Assignments/microblog/flask/lib/python2.7/site-packages/decorator-4.0.9.dist-info/WHEEL
@@ -0,0 +1,6 @@
+Wheel-Version: 1.0
+Generator: bdist_wheel (0.26.0)
+Root-Is-Purelib: true
+Tag: py2-none-any
+Tag: py3-none-any
+
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/decorator-4.0.9.dist-info/metadata.json b/Assignments/microblog/flask/lib/python2.7/site-packages/decorator-4.0.9.dist-info/metadata.json
new file mode 100644
index 0000000..7f1a53e
--- /dev/null
+++ b/Assignments/microblog/flask/lib/python2.7/site-packages/decorator-4.0.9.dist-info/metadata.json
@@ -0,0 +1 @@
+{"classifiers": ["Development Status :: 5 - Production/Stable", "Intended Audience :: Developers", "License :: OSI Approved :: BSD License", "Natural Language :: English", "Operating System :: OS Independent", "Programming Language :: Python", "Programming Language :: Python :: 3", "Topic :: Software Development :: Libraries", "Topic :: Utilities"], "extensions": {"python.details": {"contacts": [{"email": "michele.simionato@gmail.com", "name": "Michele Simionato", "role": "author"}], "document_names": {"description": "DESCRIPTION.rst"}, "project_urls": {"Home": "https://github.com/micheles/decorator"}}}, "generator": "bdist_wheel (0.26.0)", "keywords": ["decorators", "generic", "utility"], "license": "new BSD License", "metadata_version": "2.0", "name": "decorator", "platform": "All", "summary": "Better living through Python with decorators", "version": "4.0.9"}
\ No newline at end of file
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/decorator-4.0.9.dist-info/top_level.txt b/Assignments/microblog/flask/lib/python2.7/site-packages/decorator-4.0.9.dist-info/top_level.txt
new file mode 100644
index 0000000..3fe18a4
--- /dev/null
+++ b/Assignments/microblog/flask/lib/python2.7/site-packages/decorator-4.0.9.dist-info/top_level.txt
@@ -0,0 +1 @@
+decorator
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/decorator.py b/Assignments/microblog/flask/lib/python2.7/site-packages/decorator.py
new file mode 100644
index 0000000..5a4cff4
--- /dev/null
+++ b/Assignments/microblog/flask/lib/python2.7/site-packages/decorator.py
@@ -0,0 +1,416 @@
+# ######################### LICENSE ############################ #
+
+# Copyright (c) 2005-2016, Michele Simionato
+# All rights reserved.
+
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions are
+# met:
+
+# Redistributions of source code must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+# Redistributions in bytecode form must reproduce the above copyright
+# notice, this list of conditions and the following disclaimer in
+# the documentation and/or other materials provided with the
+# distribution.
+
+# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+# HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
+# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+# BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
+# OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+# ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
+# TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
+# USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+# DAMAGE.
+
+"""
+Decorator module, see http://pypi.python.org/pypi/decorator
+for the documentation.
+"""
+from __future__ import print_function
+
+import re
+import sys
+import inspect
+import operator
+import itertools
+import collections
+
+__version__ = '4.0.9'
+
+if sys.version >= '3':
+ from inspect import getfullargspec
+
+ def get_init(cls):
+ return cls.__init__
+else:
+ class getfullargspec(object):
+ "A quick and dirty replacement for getfullargspec for Python 2.X"
+ def __init__(self, f):
+ self.args, self.varargs, self.varkw, self.defaults = \
+ inspect.getargspec(f)
+ self.kwonlyargs = []
+ self.kwonlydefaults = None
+
+ def __iter__(self):
+ yield self.args
+ yield self.varargs
+ yield self.varkw
+ yield self.defaults
+
+ getargspec = inspect.getargspec
+
+ def get_init(cls):
+ return cls.__init__.__func__
+
+# getargspec has been deprecated in Python 3.5
+ArgSpec = collections.namedtuple(
+ 'ArgSpec', 'args varargs varkw defaults')
+
+
+def getargspec(f):
+ """A replacement for inspect.getargspec"""
+ spec = getfullargspec(f)
+ return ArgSpec(spec.args, spec.varargs, spec.varkw, spec.defaults)
+
+DEF = re.compile('\s*def\s*([_\w][_\w\d]*)\s*\(')
+
+
+# basic functionality
+class FunctionMaker(object):
+ """
+ An object with the ability to create functions with a given signature.
+ It has attributes name, doc, module, signature, defaults, dict and
+ methods update and make.
+ """
+
+ # Atomic get-and-increment provided by the GIL
+ _compile_count = itertools.count()
+
+ def __init__(self, func=None, name=None, signature=None,
+ defaults=None, doc=None, module=None, funcdict=None):
+ self.shortsignature = signature
+ if func:
+ # func can be a class or a callable, but not an instance method
+ self.name = func.__name__
+ if self.name == '': # small hack for lambda functions
+ self.name = '_lambda_'
+ self.doc = func.__doc__
+ self.module = func.__module__
+ if inspect.isfunction(func):
+ argspec = getfullargspec(func)
+ self.annotations = getattr(func, '__annotations__', {})
+ for a in ('args', 'varargs', 'varkw', 'defaults', 'kwonlyargs',
+ 'kwonlydefaults'):
+ setattr(self, a, getattr(argspec, a))
+ for i, arg in enumerate(self.args):
+ setattr(self, 'arg%d' % i, arg)
+ if sys.version < '3': # easy way
+ self.shortsignature = self.signature = (
+ inspect.formatargspec(
+ formatvalue=lambda val: "", *argspec)[1:-1])
+ else: # Python 3 way
+ allargs = list(self.args)
+ allshortargs = list(self.args)
+ if self.varargs:
+ allargs.append('*' + self.varargs)
+ allshortargs.append('*' + self.varargs)
+ elif self.kwonlyargs:
+ allargs.append('*') # single star syntax
+ for a in self.kwonlyargs:
+ allargs.append('%s=None' % a)
+ allshortargs.append('%s=%s' % (a, a))
+ if self.varkw:
+ allargs.append('**' + self.varkw)
+ allshortargs.append('**' + self.varkw)
+ self.signature = ', '.join(allargs)
+ self.shortsignature = ', '.join(allshortargs)
+ self.dict = func.__dict__.copy()
+ # func=None happens when decorating a caller
+ if name:
+ self.name = name
+ if signature is not None:
+ self.signature = signature
+ if defaults:
+ self.defaults = defaults
+ if doc:
+ self.doc = doc
+ if module:
+ self.module = module
+ if funcdict:
+ self.dict = funcdict
+ # check existence required attributes
+ assert hasattr(self, 'name')
+ if not hasattr(self, 'signature'):
+ raise TypeError('You are decorating a non function: %s' % func)
+
+ def update(self, func, **kw):
+ "Update the signature of func with the data in self"
+ func.__name__ = self.name
+ func.__doc__ = getattr(self, 'doc', None)
+ func.__dict__ = getattr(self, 'dict', {})
+ func.__defaults__ = getattr(self, 'defaults', ())
+ func.__kwdefaults__ = getattr(self, 'kwonlydefaults', None)
+ func.__annotations__ = getattr(self, 'annotations', None)
+ try:
+ frame = sys._getframe(3)
+ except AttributeError: # for IronPython and similar implementations
+ callermodule = '?'
+ else:
+ callermodule = frame.f_globals.get('__name__', '?')
+ func.__module__ = getattr(self, 'module', callermodule)
+ func.__dict__.update(kw)
+
+ def make(self, src_templ, evaldict=None, addsource=False, **attrs):
+ "Make a new function from a given template and update the signature"
+ src = src_templ % vars(self) # expand name and signature
+ evaldict = evaldict or {}
+ mo = DEF.match(src)
+ if mo is None:
+ raise SyntaxError('not a valid function template\n%s' % src)
+ name = mo.group(1) # extract the function name
+ names = set([name] + [arg.strip(' *') for arg in
+ self.shortsignature.split(',')])
+ for n in names:
+ if n in ('_func_', '_call_'):
+ raise NameError('%s is overridden in\n%s' % (n, src))
+
+ if not src.endswith('\n'): # add a newline for old Pythons
+ src += '\n'
+
+ # Ensure each generated function has a unique filename for profilers
+ # (such as cProfile) that depend on the tuple of (,
+ # , ) being unique.
+ filename = '' % (next(self._compile_count),)
+ try:
+ code = compile(src, filename, 'single')
+ exec(code, evaldict)
+ except:
+ print('Error in generated code:', file=sys.stderr)
+ print(src, file=sys.stderr)
+ raise
+ func = evaldict[name]
+ if addsource:
+ attrs['__source__'] = src
+ self.update(func, **attrs)
+ return func
+
+ @classmethod
+ def create(cls, obj, body, evaldict, defaults=None,
+ doc=None, module=None, addsource=True, **attrs):
+ """
+ Create a function from the strings name, signature and body.
+ evaldict is the evaluation dictionary. If addsource is true an
+ attribute __source__ is added to the result. The attributes attrs
+ are added, if any.
+ """
+ if isinstance(obj, str): # "name(signature)"
+ name, rest = obj.strip().split('(', 1)
+ signature = rest[:-1] # strip a right parens
+ func = None
+ else: # a function
+ name = None
+ signature = None
+ func = obj
+ self = cls(func, name, signature, defaults, doc, module)
+ ibody = '\n'.join(' ' + line for line in body.splitlines())
+ return self.make('def %(name)s(%(signature)s):\n' + ibody,
+ evaldict, addsource, **attrs)
+
+
+def decorate(func, caller):
+ """
+ decorate(func, caller) decorates a function using a caller.
+ """
+ evaldict = dict(_call_=caller, _func_=func)
+ fun = FunctionMaker.create(
+ func, "return _call_(_func_, %(shortsignature)s)",
+ evaldict, __wrapped__=func)
+ if hasattr(func, '__qualname__'):
+ fun.__qualname__ = func.__qualname__
+ return fun
+
+
+def decorator(caller, _func=None):
+ """decorator(caller) converts a caller function into a decorator"""
+ if _func is not None: # return a decorated function
+ # this is obsolete behavior; you should use decorate instead
+ return decorate(_func, caller)
+ # else return a decorator function
+ if inspect.isclass(caller):
+ name = caller.__name__.lower()
+ doc = 'decorator(%s) converts functions/generators into ' \
+ 'factories of %s objects' % (caller.__name__, caller.__name__)
+ elif inspect.isfunction(caller):
+ if caller.__name__ == '':
+ name = '_lambda_'
+ else:
+ name = caller.__name__
+ doc = caller.__doc__
+ else: # assume caller is an object with a __call__ method
+ name = caller.__class__.__name__.lower()
+ doc = caller.__call__.__doc__
+ evaldict = dict(_call_=caller, _decorate_=decorate)
+ return FunctionMaker.create(
+ '%s(func)' % name, 'return _decorate_(func, _call_)',
+ evaldict, doc=doc, module=caller.__module__,
+ __wrapped__=caller)
+
+
+# ####################### contextmanager ####################### #
+
+try: # Python >= 3.2
+ from contextlib import _GeneratorContextManager
+except ImportError: # Python >= 2.5
+ from contextlib import GeneratorContextManager as _GeneratorContextManager
+
+
+class ContextManager(_GeneratorContextManager):
+ def __call__(self, func):
+ """Context manager decorator"""
+ return FunctionMaker.create(
+ func, "with _self_: return _func_(%(shortsignature)s)",
+ dict(_self_=self, _func_=func), __wrapped__=func)
+
+init = getfullargspec(_GeneratorContextManager.__init__)
+n_args = len(init.args)
+if n_args == 2 and not init.varargs: # (self, genobj) Python 2.7
+ def __init__(self, g, *a, **k):
+ return _GeneratorContextManager.__init__(self, g(*a, **k))
+ ContextManager.__init__ = __init__
+elif n_args == 2 and init.varargs: # (self, gen, *a, **k) Python 3.4
+ pass
+elif n_args == 4: # (self, gen, args, kwds) Python 3.5
+ def __init__(self, g, *a, **k):
+ return _GeneratorContextManager.__init__(self, g, a, k)
+ ContextManager.__init__ = __init__
+
+contextmanager = decorator(ContextManager)
+
+
+# ############################ dispatch_on ############################ #
+
+def append(a, vancestors):
+ """
+ Append ``a`` to the list of the virtual ancestors, unless it is already
+ included.
+ """
+ add = True
+ for j, va in enumerate(vancestors):
+ if issubclass(va, a):
+ add = False
+ break
+ if issubclass(a, va):
+ vancestors[j] = a
+ add = False
+ if add:
+ vancestors.append(a)
+
+
+# inspired from simplegeneric by P.J. Eby and functools.singledispatch
+def dispatch_on(*dispatch_args):
+ """
+ Factory of decorators turning a function into a generic function
+ dispatching on the given arguments.
+ """
+ assert dispatch_args, 'No dispatch args passed'
+ dispatch_str = '(%s,)' % ', '.join(dispatch_args)
+
+ def check(arguments, wrong=operator.ne, msg=''):
+ """Make sure one passes the expected number of arguments"""
+ if wrong(len(arguments), len(dispatch_args)):
+ raise TypeError('Expected %d arguments, got %d%s' %
+ (len(dispatch_args), len(arguments), msg))
+
+ def gen_func_dec(func):
+ """Decorator turning a function into a generic function"""
+
+ # first check the dispatch arguments
+ argset = set(getfullargspec(func).args)
+ if not set(dispatch_args) <= argset:
+ raise NameError('Unknown dispatch arguments %s' % dispatch_str)
+
+ typemap = {}
+
+ def vancestors(*types):
+ """
+ Get a list of sets of virtual ancestors for the given types
+ """
+ check(types)
+ ras = [[] for _ in range(len(dispatch_args))]
+ for types_ in typemap:
+ for t, type_, ra in zip(types, types_, ras):
+ if issubclass(t, type_) and type_ not in t.__mro__:
+ append(type_, ra)
+ return [set(ra) for ra in ras]
+
+ def ancestors(*types):
+ """
+ Get a list of virtual MROs, one for each type
+ """
+ check(types)
+ lists = []
+ for t, vas in zip(types, vancestors(*types)):
+ n_vas = len(vas)
+ if n_vas > 1:
+ raise RuntimeError(
+ 'Ambiguous dispatch for %s: %s' % (t, vas))
+ elif n_vas == 1:
+ va, = vas
+ mro = type('t', (t, va), {}).__mro__[1:]
+ else:
+ mro = t.__mro__
+ lists.append(mro[:-1]) # discard t and object
+ return lists
+
+ def register(*types):
+ """
+ Decorator to register an implementation for the given types
+ """
+ check(types)
+ def dec(f):
+ check(getfullargspec(f).args, operator.lt, ' in ' + f.__name__)
+ typemap[types] = f
+ return f
+ return dec
+
+ def dispatch_info(*types):
+ """
+ An utility to introspect the dispatch algorithm
+ """
+ check(types)
+ lst = []
+ for anc in itertools.product(*ancestors(*types)):
+ lst.append(tuple(a.__name__ for a in anc))
+ return lst
+
+ def _dispatch(dispatch_args, *args, **kw):
+ types = tuple(type(arg) for arg in dispatch_args)
+ try: # fast path
+ f = typemap[types]
+ except KeyError:
+ pass
+ else:
+ return f(*args, **kw)
+ combinations = itertools.product(*ancestors(*types))
+ next(combinations) # the first one has been already tried
+ for types_ in combinations:
+ f = typemap.get(types_)
+ if f is not None:
+ return f(*args, **kw)
+
+ # else call the default implementation
+ return func(*args, **kw)
+
+ return FunctionMaker.create(
+ func, 'return _f_(%s, %%(shortsignature)s)' % dispatch_str,
+ dict(_f_=_dispatch), register=register, default=func,
+ typemap=typemap, vancestors=vancestors, ancestors=ancestors,
+ dispatch_info=dispatch_info, __wrapped__=func)
+
+ gen_func_dec.__name__ = 'dispatch_on' + dispatch_str
+ return gen_func_dec
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/decorator.pyc b/Assignments/microblog/flask/lib/python2.7/site-packages/decorator.pyc
new file mode 100644
index 0000000..eccac4b
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/decorator.pyc differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/easy_install.py b/Assignments/microblog/flask/lib/python2.7/site-packages/easy_install.py
new file mode 100644
index 0000000..d87e984
--- /dev/null
+++ b/Assignments/microblog/flask/lib/python2.7/site-packages/easy_install.py
@@ -0,0 +1,5 @@
+"""Run the EasyInstall command"""
+
+if __name__ == '__main__':
+ from setuptools.command.easy_install import main
+ main()
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/easy_install.pyc b/Assignments/microblog/flask/lib/python2.7/site-packages/easy_install.pyc
new file mode 100644
index 0000000..a53b07e
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/easy_install.pyc differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/flask/__init__.py b/Assignments/microblog/flask/lib/python2.7/site-packages/flask/__init__.py
new file mode 100644
index 0000000..3fd8908
--- /dev/null
+++ b/Assignments/microblog/flask/lib/python2.7/site-packages/flask/__init__.py
@@ -0,0 +1,50 @@
+# -*- coding: utf-8 -*-
+"""
+ flask
+ ~~~~~
+
+ A microframework based on Werkzeug. It's extensively documented
+ and follows best practice patterns.
+
+ :copyright: (c) 2011 by Armin Ronacher.
+ :license: BSD, see LICENSE for more details.
+"""
+
+__version__ = '0.10.1'
+
+# utilities we import from Werkzeug and Jinja2 that are unused
+# in the module but are exported as public interface.
+from werkzeug.exceptions import abort
+from werkzeug.utils import redirect
+from jinja2 import Markup, escape
+
+from .app import Flask, Request, Response
+from .config import Config
+from .helpers import url_for, flash, send_file, send_from_directory, \
+ get_flashed_messages, get_template_attribute, make_response, safe_join, \
+ stream_with_context
+from .globals import current_app, g, request, session, _request_ctx_stack, \
+ _app_ctx_stack
+from .ctx import has_request_context, has_app_context, \
+ after_this_request, copy_current_request_context
+from .module import Module
+from .blueprints import Blueprint
+from .templating import render_template, render_template_string
+
+# the signals
+from .signals import signals_available, template_rendered, request_started, \
+ request_finished, got_request_exception, request_tearing_down, \
+ appcontext_tearing_down, appcontext_pushed, \
+ appcontext_popped, message_flashed
+
+# We're not exposing the actual json module but a convenient wrapper around
+# it.
+from . import json
+
+# This was the only thing that flask used to export at one point and it had
+# a more generic name.
+jsonify = json.jsonify
+
+# backwards compat, goes away in 1.0
+from .sessions import SecureCookieSession as Session
+json_available = True
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/flask/__init__.pyc b/Assignments/microblog/flask/lib/python2.7/site-packages/flask/__init__.pyc
new file mode 100644
index 0000000..4965b36
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/flask/__init__.pyc differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/flask/_compat.py b/Assignments/microblog/flask/lib/python2.7/site-packages/flask/_compat.py
new file mode 100644
index 0000000..c342884
--- /dev/null
+++ b/Assignments/microblog/flask/lib/python2.7/site-packages/flask/_compat.py
@@ -0,0 +1,73 @@
+# -*- coding: utf-8 -*-
+"""
+ flask._compat
+ ~~~~~~~~~~~~~
+
+ Some py2/py3 compatibility support based on a stripped down
+ version of six so we don't have to depend on a specific version
+ of it.
+
+ :copyright: (c) 2013 by Armin Ronacher.
+ :license: BSD, see LICENSE for more details.
+"""
+import sys
+
+PY2 = sys.version_info[0] == 2
+_identity = lambda x: x
+
+
+if not PY2:
+ text_type = str
+ string_types = (str,)
+ integer_types = (int, )
+
+ iterkeys = lambda d: iter(d.keys())
+ itervalues = lambda d: iter(d.values())
+ iteritems = lambda d: iter(d.items())
+
+ from io import StringIO
+
+ def reraise(tp, value, tb=None):
+ if value.__traceback__ is not tb:
+ raise value.with_traceback(tb)
+ raise value
+
+ implements_to_string = _identity
+
+else:
+ text_type = unicode
+ string_types = (str, unicode)
+ integer_types = (int, long)
+
+ iterkeys = lambda d: d.iterkeys()
+ itervalues = lambda d: d.itervalues()
+ iteritems = lambda d: d.iteritems()
+
+ from cStringIO import StringIO
+
+ exec('def reraise(tp, value, tb=None):\n raise tp, value, tb')
+
+ def implements_to_string(cls):
+ cls.__unicode__ = cls.__str__
+ cls.__str__ = lambda x: x.__unicode__().encode('utf-8')
+ return cls
+
+
+def with_metaclass(meta, *bases):
+ # This requires a bit of explanation: the basic idea is to make a
+ # dummy metaclass for one level of class instantiation that replaces
+ # itself with the actual metaclass. Because of internal type checks
+ # we also need to make sure that we downgrade the custom metaclass
+ # for one level to something closer to type (that's why __call__ and
+ # __init__ comes back from type etc.).
+ #
+ # This has the advantage over six.with_metaclass in that it does not
+ # introduce dummy classes into the final MRO.
+ class metaclass(meta):
+ __call__ = type.__call__
+ __init__ = type.__init__
+ def __new__(cls, name, this_bases, d):
+ if this_bases is None:
+ return type.__new__(cls, name, (), d)
+ return meta(name, bases, d)
+ return metaclass('temporary_class', None, {})
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/flask/_compat.pyc b/Assignments/microblog/flask/lib/python2.7/site-packages/flask/_compat.pyc
new file mode 100644
index 0000000..3fd90dd
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/flask/_compat.pyc differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/flask/app.py b/Assignments/microblog/flask/lib/python2.7/site-packages/flask/app.py
new file mode 100644
index 0000000..addc40b
--- /dev/null
+++ b/Assignments/microblog/flask/lib/python2.7/site-packages/flask/app.py
@@ -0,0 +1,1842 @@
+# -*- coding: utf-8 -*-
+"""
+ flask.app
+ ~~~~~~~~~
+
+ This module implements the central WSGI application object.
+
+ :copyright: (c) 2011 by Armin Ronacher.
+ :license: BSD, see LICENSE for more details.
+"""
+
+import os
+import sys
+from threading import Lock
+from datetime import timedelta
+from itertools import chain
+from functools import update_wrapper
+
+from werkzeug.datastructures import ImmutableDict
+from werkzeug.routing import Map, Rule, RequestRedirect, BuildError
+from werkzeug.exceptions import HTTPException, InternalServerError, \
+ MethodNotAllowed, BadRequest
+
+from .helpers import _PackageBoundObject, url_for, get_flashed_messages, \
+ locked_cached_property, _endpoint_from_view_func, find_package
+from . import json
+from .wrappers import Request, Response
+from .config import ConfigAttribute, Config
+from .ctx import RequestContext, AppContext, _AppCtxGlobals
+from .globals import _request_ctx_stack, request, session, g
+from .sessions import SecureCookieSessionInterface
+from .module import blueprint_is_module
+from .templating import DispatchingJinjaLoader, Environment, \
+ _default_template_ctx_processor
+from .signals import request_started, request_finished, got_request_exception, \
+ request_tearing_down, appcontext_tearing_down
+from ._compat import reraise, string_types, text_type, integer_types
+
+# a lock used for logger initialization
+_logger_lock = Lock()
+
+
+def _make_timedelta(value):
+ if not isinstance(value, timedelta):
+ return timedelta(seconds=value)
+ return value
+
+
+def setupmethod(f):
+ """Wraps a method so that it performs a check in debug mode if the
+ first request was already handled.
+ """
+ def wrapper_func(self, *args, **kwargs):
+ if self.debug and self._got_first_request:
+ raise AssertionError('A setup function was called after the '
+ 'first request was handled. This usually indicates a bug '
+ 'in the application where a module was not imported '
+ 'and decorators or other functionality was called too late.\n'
+ 'To fix this make sure to import all your view modules, '
+ 'database models and everything related at a central place '
+ 'before the application starts serving requests.')
+ return f(self, *args, **kwargs)
+ return update_wrapper(wrapper_func, f)
+
+
+class Flask(_PackageBoundObject):
+ """The flask object implements a WSGI application and acts as the central
+ object. It is passed the name of the module or package of the
+ application. Once it is created it will act as a central registry for
+ the view functions, the URL rules, template configuration and much more.
+
+ The name of the package is used to resolve resources from inside the
+ package or the folder the module is contained in depending on if the
+ package parameter resolves to an actual python package (a folder with
+ an `__init__.py` file inside) or a standard module (just a `.py` file).
+
+ For more information about resource loading, see :func:`open_resource`.
+
+ Usually you create a :class:`Flask` instance in your main module or
+ in the `__init__.py` file of your package like this::
+
+ from flask import Flask
+ app = Flask(__name__)
+
+ .. admonition:: About the First Parameter
+
+ The idea of the first parameter is to give Flask an idea what
+ belongs to your application. This name is used to find resources
+ on the file system, can be used by extensions to improve debugging
+ information and a lot more.
+
+ So it's important what you provide there. If you are using a single
+ module, `__name__` is always the correct value. If you however are
+ using a package, it's usually recommended to hardcode the name of
+ your package there.
+
+ For example if your application is defined in `yourapplication/app.py`
+ you should create it with one of the two versions below::
+
+ app = Flask('yourapplication')
+ app = Flask(__name__.split('.')[0])
+
+ Why is that? The application will work even with `__name__`, thanks
+ to how resources are looked up. However it will make debugging more
+ painful. Certain extensions can make assumptions based on the
+ import name of your application. For example the Flask-SQLAlchemy
+ extension will look for the code in your application that triggered
+ an SQL query in debug mode. If the import name is not properly set
+ up, that debugging information is lost. (For example it would only
+ pick up SQL queries in `yourapplication.app` and not
+ `yourapplication.views.frontend`)
+
+ .. versionadded:: 0.7
+ The `static_url_path`, `static_folder`, and `template_folder`
+ parameters were added.
+
+ .. versionadded:: 0.8
+ The `instance_path` and `instance_relative_config` parameters were
+ added.
+
+ :param import_name: the name of the application package
+ :param static_url_path: can be used to specify a different path for the
+ static files on the web. Defaults to the name
+ of the `static_folder` folder.
+ :param static_folder: the folder with static files that should be served
+ at `static_url_path`. Defaults to the ``'static'``
+ folder in the root path of the application.
+ :param template_folder: the folder that contains the templates that should
+ be used by the application. Defaults to
+ ``'templates'`` folder in the root path of the
+ application.
+ :param instance_path: An alternative instance path for the application.
+ By default the folder ``'instance'`` next to the
+ package or module is assumed to be the instance
+ path.
+ :param instance_relative_config: if set to `True` relative filenames
+ for loading the config are assumed to
+ be relative to the instance path instead
+ of the application root.
+ """
+
+ #: The class that is used for request objects. See :class:`~flask.Request`
+ #: for more information.
+ request_class = Request
+
+ #: The class that is used for response objects. See
+ #: :class:`~flask.Response` for more information.
+ response_class = Response
+
+ #: The class that is used for the :data:`~flask.g` instance.
+ #:
+ #: Example use cases for a custom class:
+ #:
+ #: 1. Store arbitrary attributes on flask.g.
+ #: 2. Add a property for lazy per-request database connectors.
+ #: 3. Return None instead of AttributeError on expected attributes.
+ #: 4. Raise exception if an unexpected attr is set, a "controlled" flask.g.
+ #:
+ #: In Flask 0.9 this property was called `request_globals_class` but it
+ #: was changed in 0.10 to :attr:`app_ctx_globals_class` because the
+ #: flask.g object is not application context scoped.
+ #:
+ #: .. versionadded:: 0.10
+ app_ctx_globals_class = _AppCtxGlobals
+
+ # Backwards compatibility support
+ def _get_request_globals_class(self):
+ return self.app_ctx_globals_class
+ def _set_request_globals_class(self, value):
+ from warnings import warn
+ warn(DeprecationWarning('request_globals_class attribute is now '
+ 'called app_ctx_globals_class'))
+ self.app_ctx_globals_class = value
+ request_globals_class = property(_get_request_globals_class,
+ _set_request_globals_class)
+ del _get_request_globals_class, _set_request_globals_class
+
+ #: The debug flag. Set this to `True` to enable debugging of the
+ #: application. In debug mode the debugger will kick in when an unhandled
+ #: exception occurs and the integrated server will automatically reload
+ #: the application if changes in the code are detected.
+ #:
+ #: This attribute can also be configured from the config with the `DEBUG`
+ #: configuration key. Defaults to `False`.
+ debug = ConfigAttribute('DEBUG')
+
+ #: The testing flag. Set this to `True` to enable the test mode of
+ #: Flask extensions (and in the future probably also Flask itself).
+ #: For example this might activate unittest helpers that have an
+ #: additional runtime cost which should not be enabled by default.
+ #:
+ #: If this is enabled and PROPAGATE_EXCEPTIONS is not changed from the
+ #: default it's implicitly enabled.
+ #:
+ #: This attribute can also be configured from the config with the
+ #: `TESTING` configuration key. Defaults to `False`.
+ testing = ConfigAttribute('TESTING')
+
+ #: If a secret key is set, cryptographic components can use this to
+ #: sign cookies and other things. Set this to a complex random value
+ #: when you want to use the secure cookie for instance.
+ #:
+ #: This attribute can also be configured from the config with the
+ #: `SECRET_KEY` configuration key. Defaults to `None`.
+ secret_key = ConfigAttribute('SECRET_KEY')
+
+ #: The secure cookie uses this for the name of the session cookie.
+ #:
+ #: This attribute can also be configured from the config with the
+ #: `SESSION_COOKIE_NAME` configuration key. Defaults to ``'session'``
+ session_cookie_name = ConfigAttribute('SESSION_COOKIE_NAME')
+
+ #: A :class:`~datetime.timedelta` which is used to set the expiration
+ #: date of a permanent session. The default is 31 days which makes a
+ #: permanent session survive for roughly one month.
+ #:
+ #: This attribute can also be configured from the config with the
+ #: `PERMANENT_SESSION_LIFETIME` configuration key. Defaults to
+ #: ``timedelta(days=31)``
+ permanent_session_lifetime = ConfigAttribute('PERMANENT_SESSION_LIFETIME',
+ get_converter=_make_timedelta)
+
+ #: Enable this if you want to use the X-Sendfile feature. Keep in
+ #: mind that the server has to support this. This only affects files
+ #: sent with the :func:`send_file` method.
+ #:
+ #: .. versionadded:: 0.2
+ #:
+ #: This attribute can also be configured from the config with the
+ #: `USE_X_SENDFILE` configuration key. Defaults to `False`.
+ use_x_sendfile = ConfigAttribute('USE_X_SENDFILE')
+
+ #: The name of the logger to use. By default the logger name is the
+ #: package name passed to the constructor.
+ #:
+ #: .. versionadded:: 0.4
+ logger_name = ConfigAttribute('LOGGER_NAME')
+
+ #: Enable the deprecated module support? This is active by default
+ #: in 0.7 but will be changed to False in 0.8. With Flask 1.0 modules
+ #: will be removed in favor of Blueprints
+ enable_modules = True
+
+ #: The logging format used for the debug logger. This is only used when
+ #: the application is in debug mode, otherwise the attached logging
+ #: handler does the formatting.
+ #:
+ #: .. versionadded:: 0.3
+ debug_log_format = (
+ '-' * 80 + '\n' +
+ '%(levelname)s in %(module)s [%(pathname)s:%(lineno)d]:\n' +
+ '%(message)s\n' +
+ '-' * 80
+ )
+
+ #: The JSON encoder class to use. Defaults to :class:`~flask.json.JSONEncoder`.
+ #:
+ #: .. versionadded:: 0.10
+ json_encoder = json.JSONEncoder
+
+ #: The JSON decoder class to use. Defaults to :class:`~flask.json.JSONDecoder`.
+ #:
+ #: .. versionadded:: 0.10
+ json_decoder = json.JSONDecoder
+
+ #: Options that are passed directly to the Jinja2 environment.
+ jinja_options = ImmutableDict(
+ extensions=['jinja2.ext.autoescape', 'jinja2.ext.with_']
+ )
+
+ #: Default configuration parameters.
+ default_config = ImmutableDict({
+ 'DEBUG': False,
+ 'TESTING': False,
+ 'PROPAGATE_EXCEPTIONS': None,
+ 'PRESERVE_CONTEXT_ON_EXCEPTION': None,
+ 'SECRET_KEY': None,
+ 'PERMANENT_SESSION_LIFETIME': timedelta(days=31),
+ 'USE_X_SENDFILE': False,
+ 'LOGGER_NAME': None,
+ 'SERVER_NAME': None,
+ 'APPLICATION_ROOT': None,
+ 'SESSION_COOKIE_NAME': 'session',
+ 'SESSION_COOKIE_DOMAIN': None,
+ 'SESSION_COOKIE_PATH': None,
+ 'SESSION_COOKIE_HTTPONLY': True,
+ 'SESSION_COOKIE_SECURE': False,
+ 'MAX_CONTENT_LENGTH': None,
+ 'SEND_FILE_MAX_AGE_DEFAULT': 12 * 60 * 60, # 12 hours
+ 'TRAP_BAD_REQUEST_ERRORS': False,
+ 'TRAP_HTTP_EXCEPTIONS': False,
+ 'PREFERRED_URL_SCHEME': 'http',
+ 'JSON_AS_ASCII': True,
+ 'JSON_SORT_KEYS': True,
+ 'JSONIFY_PRETTYPRINT_REGULAR': True,
+ })
+
+ #: The rule object to use for URL rules created. This is used by
+ #: :meth:`add_url_rule`. Defaults to :class:`werkzeug.routing.Rule`.
+ #:
+ #: .. versionadded:: 0.7
+ url_rule_class = Rule
+
+ #: the test client that is used with when `test_client` is used.
+ #:
+ #: .. versionadded:: 0.7
+ test_client_class = None
+
+ #: the session interface to use. By default an instance of
+ #: :class:`~flask.sessions.SecureCookieSessionInterface` is used here.
+ #:
+ #: .. versionadded:: 0.8
+ session_interface = SecureCookieSessionInterface()
+
+ def __init__(self, import_name, static_path=None, static_url_path=None,
+ static_folder='static', template_folder='templates',
+ instance_path=None, instance_relative_config=False):
+ _PackageBoundObject.__init__(self, import_name,
+ template_folder=template_folder)
+ if static_path is not None:
+ from warnings import warn
+ warn(DeprecationWarning('static_path is now called '
+ 'static_url_path'), stacklevel=2)
+ static_url_path = static_path
+
+ if static_url_path is not None:
+ self.static_url_path = static_url_path
+ if static_folder is not None:
+ self.static_folder = static_folder
+ if instance_path is None:
+ instance_path = self.auto_find_instance_path()
+ elif not os.path.isabs(instance_path):
+ raise ValueError('If an instance path is provided it must be '
+ 'absolute. A relative path was given instead.')
+
+ #: Holds the path to the instance folder.
+ #:
+ #: .. versionadded:: 0.8
+ self.instance_path = instance_path
+
+ #: The configuration dictionary as :class:`Config`. This behaves
+ #: exactly like a regular dictionary but supports additional methods
+ #: to load a config from files.
+ self.config = self.make_config(instance_relative_config)
+
+ # Prepare the deferred setup of the logger.
+ self._logger = None
+ self.logger_name = self.import_name
+
+ #: A dictionary of all view functions registered. The keys will
+ #: be function names which are also used to generate URLs and
+ #: the values are the function objects themselves.
+ #: To register a view function, use the :meth:`route` decorator.
+ self.view_functions = {}
+
+ # support for the now deprecated `error_handlers` attribute. The
+ # :attr:`error_handler_spec` shall be used now.
+ self._error_handlers = {}
+
+ #: A dictionary of all registered error handlers. The key is `None`
+ #: for error handlers active on the application, otherwise the key is
+ #: the name of the blueprint. Each key points to another dictionary
+ #: where they key is the status code of the http exception. The
+ #: special key `None` points to a list of tuples where the first item
+ #: is the class for the instance check and the second the error handler
+ #: function.
+ #:
+ #: To register a error handler, use the :meth:`errorhandler`
+ #: decorator.
+ self.error_handler_spec = {None: self._error_handlers}
+
+ #: A list of functions that are called when :meth:`url_for` raises a
+ #: :exc:`~werkzeug.routing.BuildError`. Each function registered here
+ #: is called with `error`, `endpoint` and `values`. If a function
+ #: returns `None` or raises a `BuildError` the next function is
+ #: tried.
+ #:
+ #: .. versionadded:: 0.9
+ self.url_build_error_handlers = []
+
+ #: A dictionary with lists of functions that should be called at the
+ #: beginning of the request. The key of the dictionary is the name of
+ #: the blueprint this function is active for, `None` for all requests.
+ #: This can for example be used to open database connections or
+ #: getting hold of the currently logged in user. To register a
+ #: function here, use the :meth:`before_request` decorator.
+ self.before_request_funcs = {}
+
+ #: A lists of functions that should be called at the beginning of the
+ #: first request to this instance. To register a function here, use
+ #: the :meth:`before_first_request` decorator.
+ #:
+ #: .. versionadded:: 0.8
+ self.before_first_request_funcs = []
+
+ #: A dictionary with lists of functions that should be called after
+ #: each request. The key of the dictionary is the name of the blueprint
+ #: this function is active for, `None` for all requests. This can for
+ #: example be used to open database connections or getting hold of the
+ #: currently logged in user. To register a function here, use the
+ #: :meth:`after_request` decorator.
+ self.after_request_funcs = {}
+
+ #: A dictionary with lists of functions that are called after
+ #: each request, even if an exception has occurred. The key of the
+ #: dictionary is the name of the blueprint this function is active for,
+ #: `None` for all requests. These functions are not allowed to modify
+ #: the request, and their return values are ignored. If an exception
+ #: occurred while processing the request, it gets passed to each
+ #: teardown_request function. To register a function here, use the
+ #: :meth:`teardown_request` decorator.
+ #:
+ #: .. versionadded:: 0.7
+ self.teardown_request_funcs = {}
+
+ #: A list of functions that are called when the application context
+ #: is destroyed. Since the application context is also torn down
+ #: if the request ends this is the place to store code that disconnects
+ #: from databases.
+ #:
+ #: .. versionadded:: 0.9
+ self.teardown_appcontext_funcs = []
+
+ #: A dictionary with lists of functions that can be used as URL
+ #: value processor functions. Whenever a URL is built these functions
+ #: are called to modify the dictionary of values in place. The key
+ #: `None` here is used for application wide
+ #: callbacks, otherwise the key is the name of the blueprint.
+ #: Each of these functions has the chance to modify the dictionary
+ #:
+ #: .. versionadded:: 0.7
+ self.url_value_preprocessors = {}
+
+ #: A dictionary with lists of functions that can be used as URL value
+ #: preprocessors. The key `None` here is used for application wide
+ #: callbacks, otherwise the key is the name of the blueprint.
+ #: Each of these functions has the chance to modify the dictionary
+ #: of URL values before they are used as the keyword arguments of the
+ #: view function. For each function registered this one should also
+ #: provide a :meth:`url_defaults` function that adds the parameters
+ #: automatically again that were removed that way.
+ #:
+ #: .. versionadded:: 0.7
+ self.url_default_functions = {}
+
+ #: A dictionary with list of functions that are called without argument
+ #: to populate the template context. The key of the dictionary is the
+ #: name of the blueprint this function is active for, `None` for all
+ #: requests. Each returns a dictionary that the template context is
+ #: updated with. To register a function here, use the
+ #: :meth:`context_processor` decorator.
+ self.template_context_processors = {
+ None: [_default_template_ctx_processor]
+ }
+
+ #: all the attached blueprints in a dictionary by name. Blueprints
+ #: can be attached multiple times so this dictionary does not tell
+ #: you how often they got attached.
+ #:
+ #: .. versionadded:: 0.7
+ self.blueprints = {}
+
+ #: a place where extensions can store application specific state. For
+ #: example this is where an extension could store database engines and
+ #: similar things. For backwards compatibility extensions should register
+ #: themselves like this::
+ #:
+ #: if not hasattr(app, 'extensions'):
+ #: app.extensions = {}
+ #: app.extensions['extensionname'] = SomeObject()
+ #:
+ #: The key must match the name of the `flaskext` module. For example in
+ #: case of a "Flask-Foo" extension in `flaskext.foo`, the key would be
+ #: ``'foo'``.
+ #:
+ #: .. versionadded:: 0.7
+ self.extensions = {}
+
+ #: The :class:`~werkzeug.routing.Map` for this instance. You can use
+ #: this to change the routing converters after the class was created
+ #: but before any routes are connected. Example::
+ #:
+ #: from werkzeug.routing import BaseConverter
+ #:
+ #: class ListConverter(BaseConverter):
+ #: def to_python(self, value):
+ #: return value.split(',')
+ #: def to_url(self, values):
+ #: return ','.join(BaseConverter.to_url(value)
+ #: for value in values)
+ #:
+ #: app = Flask(__name__)
+ #: app.url_map.converters['list'] = ListConverter
+ self.url_map = Map()
+
+ # tracks internally if the application already handled at least one
+ # request.
+ self._got_first_request = False
+ self._before_request_lock = Lock()
+
+ # register the static folder for the application. Do that even
+ # if the folder does not exist. First of all it might be created
+ # while the server is running (usually happens during development)
+ # but also because google appengine stores static files somewhere
+ # else when mapped with the .yml file.
+ if self.has_static_folder:
+ self.add_url_rule(self.static_url_path + '/',
+ endpoint='static',
+ view_func=self.send_static_file)
+
+ def _get_error_handlers(self):
+ from warnings import warn
+ warn(DeprecationWarning('error_handlers is deprecated, use the '
+ 'new error_handler_spec attribute instead.'), stacklevel=1)
+ return self._error_handlers
+ def _set_error_handlers(self, value):
+ self._error_handlers = value
+ self.error_handler_spec[None] = value
+ error_handlers = property(_get_error_handlers, _set_error_handlers)
+ del _get_error_handlers, _set_error_handlers
+
+ @locked_cached_property
+ def name(self):
+ """The name of the application. This is usually the import name
+ with the difference that it's guessed from the run file if the
+ import name is main. This name is used as a display name when
+ Flask needs the name of the application. It can be set and overridden
+ to change the value.
+
+ .. versionadded:: 0.8
+ """
+ if self.import_name == '__main__':
+ fn = getattr(sys.modules['__main__'], '__file__', None)
+ if fn is None:
+ return '__main__'
+ return os.path.splitext(os.path.basename(fn))[0]
+ return self.import_name
+
+ @property
+ def propagate_exceptions(self):
+ """Returns the value of the `PROPAGATE_EXCEPTIONS` configuration
+ value in case it's set, otherwise a sensible default is returned.
+
+ .. versionadded:: 0.7
+ """
+ rv = self.config['PROPAGATE_EXCEPTIONS']
+ if rv is not None:
+ return rv
+ return self.testing or self.debug
+
+ @property
+ def preserve_context_on_exception(self):
+ """Returns the value of the `PRESERVE_CONTEXT_ON_EXCEPTION`
+ configuration value in case it's set, otherwise a sensible default
+ is returned.
+
+ .. versionadded:: 0.7
+ """
+ rv = self.config['PRESERVE_CONTEXT_ON_EXCEPTION']
+ if rv is not None:
+ return rv
+ return self.debug
+
+ @property
+ def logger(self):
+ """A :class:`logging.Logger` object for this application. The
+ default configuration is to log to stderr if the application is
+ in debug mode. This logger can be used to (surprise) log messages.
+ Here some examples::
+
+ app.logger.debug('A value for debugging')
+ app.logger.warning('A warning occurred (%d apples)', 42)
+ app.logger.error('An error occurred')
+
+ .. versionadded:: 0.3
+ """
+ if self._logger and self._logger.name == self.logger_name:
+ return self._logger
+ with _logger_lock:
+ if self._logger and self._logger.name == self.logger_name:
+ return self._logger
+ from flask.logging import create_logger
+ self._logger = rv = create_logger(self)
+ return rv
+
+ @locked_cached_property
+ def jinja_env(self):
+ """The Jinja2 environment used to load templates."""
+ return self.create_jinja_environment()
+
+ @property
+ def got_first_request(self):
+ """This attribute is set to `True` if the application started
+ handling the first request.
+
+ .. versionadded:: 0.8
+ """
+ return self._got_first_request
+
+ def make_config(self, instance_relative=False):
+ """Used to create the config attribute by the Flask constructor.
+ The `instance_relative` parameter is passed in from the constructor
+ of Flask (there named `instance_relative_config`) and indicates if
+ the config should be relative to the instance path or the root path
+ of the application.
+
+ .. versionadded:: 0.8
+ """
+ root_path = self.root_path
+ if instance_relative:
+ root_path = self.instance_path
+ return Config(root_path, self.default_config)
+
+ def auto_find_instance_path(self):
+ """Tries to locate the instance path if it was not provided to the
+ constructor of the application class. It will basically calculate
+ the path to a folder named ``instance`` next to your main file or
+ the package.
+
+ .. versionadded:: 0.8
+ """
+ prefix, package_path = find_package(self.import_name)
+ if prefix is None:
+ return os.path.join(package_path, 'instance')
+ return os.path.join(prefix, 'var', self.name + '-instance')
+
+ def open_instance_resource(self, resource, mode='rb'):
+ """Opens a resource from the application's instance folder
+ (:attr:`instance_path`). Otherwise works like
+ :meth:`open_resource`. Instance resources can also be opened for
+ writing.
+
+ :param resource: the name of the resource. To access resources within
+ subfolders use forward slashes as separator.
+ :param mode: resource file opening mode, default is 'rb'.
+ """
+ return open(os.path.join(self.instance_path, resource), mode)
+
+ def create_jinja_environment(self):
+ """Creates the Jinja2 environment based on :attr:`jinja_options`
+ and :meth:`select_jinja_autoescape`. Since 0.7 this also adds
+ the Jinja2 globals and filters after initialization. Override
+ this function to customize the behavior.
+
+ .. versionadded:: 0.5
+ """
+ options = dict(self.jinja_options)
+ if 'autoescape' not in options:
+ options['autoescape'] = self.select_jinja_autoescape
+ rv = Environment(self, **options)
+ rv.globals.update(
+ url_for=url_for,
+ get_flashed_messages=get_flashed_messages,
+ config=self.config,
+ # request, session and g are normally added with the
+ # context processor for efficiency reasons but for imported
+ # templates we also want the proxies in there.
+ request=request,
+ session=session,
+ g=g
+ )
+ rv.filters['tojson'] = json.tojson_filter
+ return rv
+
+ def create_global_jinja_loader(self):
+ """Creates the loader for the Jinja2 environment. Can be used to
+ override just the loader and keeping the rest unchanged. It's
+ discouraged to override this function. Instead one should override
+ the :meth:`jinja_loader` function instead.
+
+ The global loader dispatches between the loaders of the application
+ and the individual blueprints.
+
+ .. versionadded:: 0.7
+ """
+ return DispatchingJinjaLoader(self)
+
+ def init_jinja_globals(self):
+ """Deprecated. Used to initialize the Jinja2 globals.
+
+ .. versionadded:: 0.5
+ .. versionchanged:: 0.7
+ This method is deprecated with 0.7. Override
+ :meth:`create_jinja_environment` instead.
+ """
+
+ def select_jinja_autoescape(self, filename):
+ """Returns `True` if autoescaping should be active for the given
+ template name.
+
+ .. versionadded:: 0.5
+ """
+ if filename is None:
+ return False
+ return filename.endswith(('.html', '.htm', '.xml', '.xhtml'))
+
+ def update_template_context(self, context):
+ """Update the template context with some commonly used variables.
+ This injects request, session, config and g into the template
+ context as well as everything template context processors want
+ to inject. Note that the as of Flask 0.6, the original values
+ in the context will not be overridden if a context processor
+ decides to return a value with the same key.
+
+ :param context: the context as a dictionary that is updated in place
+ to add extra variables.
+ """
+ funcs = self.template_context_processors[None]
+ reqctx = _request_ctx_stack.top
+ if reqctx is not None:
+ bp = reqctx.request.blueprint
+ if bp is not None and bp in self.template_context_processors:
+ funcs = chain(funcs, self.template_context_processors[bp])
+ orig_ctx = context.copy()
+ for func in funcs:
+ context.update(func())
+ # make sure the original values win. This makes it possible to
+ # easier add new variables in context processors without breaking
+ # existing views.
+ context.update(orig_ctx)
+
+ def run(self, host=None, port=None, debug=None, **options):
+ """Runs the application on a local development server. If the
+ :attr:`debug` flag is set the server will automatically reload
+ for code changes and show a debugger in case an exception happened.
+
+ If you want to run the application in debug mode, but disable the
+ code execution on the interactive debugger, you can pass
+ ``use_evalex=False`` as parameter. This will keep the debugger's
+ traceback screen active, but disable code execution.
+
+ .. admonition:: Keep in Mind
+
+ Flask will suppress any server error with a generic error page
+ unless it is in debug mode. As such to enable just the
+ interactive debugger without the code reloading, you have to
+ invoke :meth:`run` with ``debug=True`` and ``use_reloader=False``.
+ Setting ``use_debugger`` to `True` without being in debug mode
+ won't catch any exceptions because there won't be any to
+ catch.
+
+ .. versionchanged:: 0.10
+ The default port is now picked from the ``SERVER_NAME`` variable.
+
+ :param host: the hostname to listen on. Set this to ``'0.0.0.0'`` to
+ have the server available externally as well. Defaults to
+ ``'127.0.0.1'``.
+ :param port: the port of the webserver. Defaults to ``5000`` or the
+ port defined in the ``SERVER_NAME`` config variable if
+ present.
+ :param debug: if given, enable or disable debug mode.
+ See :attr:`debug`.
+ :param options: the options to be forwarded to the underlying
+ Werkzeug server. See
+ :func:`werkzeug.serving.run_simple` for more
+ information.
+ """
+ from werkzeug.serving import run_simple
+ if host is None:
+ host = '127.0.0.1'
+ if port is None:
+ server_name = self.config['SERVER_NAME']
+ if server_name and ':' in server_name:
+ port = int(server_name.rsplit(':', 1)[1])
+ else:
+ port = 5000
+ if debug is not None:
+ self.debug = bool(debug)
+ options.setdefault('use_reloader', self.debug)
+ options.setdefault('use_debugger', self.debug)
+ try:
+ run_simple(host, port, self, **options)
+ finally:
+ # reset the first request information if the development server
+ # resetted normally. This makes it possible to restart the server
+ # without reloader and that stuff from an interactive shell.
+ self._got_first_request = False
+
+ def test_client(self, use_cookies=True):
+ """Creates a test client for this application. For information
+ about unit testing head over to :ref:`testing`.
+
+ Note that if you are testing for assertions or exceptions in your
+ application code, you must set ``app.testing = True`` in order for the
+ exceptions to propagate to the test client. Otherwise, the exception
+ will be handled by the application (not visible to the test client) and
+ the only indication of an AssertionError or other exception will be a
+ 500 status code response to the test client. See the :attr:`testing`
+ attribute. For example::
+
+ app.testing = True
+ client = app.test_client()
+
+ The test client can be used in a `with` block to defer the closing down
+ of the context until the end of the `with` block. This is useful if
+ you want to access the context locals for testing::
+
+ with app.test_client() as c:
+ rv = c.get('/?vodka=42')
+ assert request.args['vodka'] == '42'
+
+ See :class:`~flask.testing.FlaskClient` for more information.
+
+ .. versionchanged:: 0.4
+ added support for `with` block usage for the client.
+
+ .. versionadded:: 0.7
+ The `use_cookies` parameter was added as well as the ability
+ to override the client to be used by setting the
+ :attr:`test_client_class` attribute.
+ """
+ cls = self.test_client_class
+ if cls is None:
+ from flask.testing import FlaskClient as cls
+ return cls(self, self.response_class, use_cookies=use_cookies)
+
+ def open_session(self, request):
+ """Creates or opens a new session. Default implementation stores all
+ session data in a signed cookie. This requires that the
+ :attr:`secret_key` is set. Instead of overriding this method
+ we recommend replacing the :class:`session_interface`.
+
+ :param request: an instance of :attr:`request_class`.
+ """
+ return self.session_interface.open_session(self, request)
+
+ def save_session(self, session, response):
+ """Saves the session if it needs updates. For the default
+ implementation, check :meth:`open_session`. Instead of overriding this
+ method we recommend replacing the :class:`session_interface`.
+
+ :param session: the session to be saved (a
+ :class:`~werkzeug.contrib.securecookie.SecureCookie`
+ object)
+ :param response: an instance of :attr:`response_class`
+ """
+ return self.session_interface.save_session(self, session, response)
+
+ def make_null_session(self):
+ """Creates a new instance of a missing session. Instead of overriding
+ this method we recommend replacing the :class:`session_interface`.
+
+ .. versionadded:: 0.7
+ """
+ return self.session_interface.make_null_session(self)
+
+ def register_module(self, module, **options):
+ """Registers a module with this application. The keyword argument
+ of this function are the same as the ones for the constructor of the
+ :class:`Module` class and will override the values of the module if
+ provided.
+
+ .. versionchanged:: 0.7
+ The module system was deprecated in favor for the blueprint
+ system.
+ """
+ assert blueprint_is_module(module), 'register_module requires ' \
+ 'actual module objects. Please upgrade to blueprints though.'
+ if not self.enable_modules:
+ raise RuntimeError('Module support was disabled but code '
+ 'attempted to register a module named %r' % module)
+ else:
+ from warnings import warn
+ warn(DeprecationWarning('Modules are deprecated. Upgrade to '
+ 'using blueprints. Have a look into the documentation for '
+ 'more information. If this module was registered by a '
+ 'Flask-Extension upgrade the extension or contact the author '
+ 'of that extension instead. (Registered %r)' % module),
+ stacklevel=2)
+
+ self.register_blueprint(module, **options)
+
+ @setupmethod
+ def register_blueprint(self, blueprint, **options):
+ """Registers a blueprint on the application.
+
+ .. versionadded:: 0.7
+ """
+ first_registration = False
+ if blueprint.name in self.blueprints:
+ assert self.blueprints[blueprint.name] is blueprint, \
+ 'A blueprint\'s name collision occurred between %r and ' \
+ '%r. Both share the same name "%s". Blueprints that ' \
+ 'are created on the fly need unique names.' % \
+ (blueprint, self.blueprints[blueprint.name], blueprint.name)
+ else:
+ self.blueprints[blueprint.name] = blueprint
+ first_registration = True
+ blueprint.register(self, options, first_registration)
+
+ @setupmethod
+ def add_url_rule(self, rule, endpoint=None, view_func=None, **options):
+ """Connects a URL rule. Works exactly like the :meth:`route`
+ decorator. If a view_func is provided it will be registered with the
+ endpoint.
+
+ Basically this example::
+
+ @app.route('/')
+ def index():
+ pass
+
+ Is equivalent to the following::
+
+ def index():
+ pass
+ app.add_url_rule('/', 'index', index)
+
+ If the view_func is not provided you will need to connect the endpoint
+ to a view function like so::
+
+ app.view_functions['index'] = index
+
+ Internally :meth:`route` invokes :meth:`add_url_rule` so if you want
+ to customize the behavior via subclassing you only need to change
+ this method.
+
+ For more information refer to :ref:`url-route-registrations`.
+
+ .. versionchanged:: 0.2
+ `view_func` parameter added.
+
+ .. versionchanged:: 0.6
+ `OPTIONS` is added automatically as method.
+
+ :param rule: the URL rule as string
+ :param endpoint: the endpoint for the registered URL rule. Flask
+ itself assumes the name of the view function as
+ endpoint
+ :param view_func: the function to call when serving a request to the
+ provided endpoint
+ :param options: the options to be forwarded to the underlying
+ :class:`~werkzeug.routing.Rule` object. A change
+ to Werkzeug is handling of method options. methods
+ is a list of methods this rule should be limited
+ to (`GET`, `POST` etc.). By default a rule
+ just listens for `GET` (and implicitly `HEAD`).
+ Starting with Flask 0.6, `OPTIONS` is implicitly
+ added and handled by the standard request handling.
+ """
+ if endpoint is None:
+ endpoint = _endpoint_from_view_func(view_func)
+ options['endpoint'] = endpoint
+ methods = options.pop('methods', None)
+
+ # if the methods are not given and the view_func object knows its
+ # methods we can use that instead. If neither exists, we go with
+ # a tuple of only `GET` as default.
+ if methods is None:
+ methods = getattr(view_func, 'methods', None) or ('GET',)
+ methods = set(methods)
+
+ # Methods that should always be added
+ required_methods = set(getattr(view_func, 'required_methods', ()))
+
+ # starting with Flask 0.8 the view_func object can disable and
+ # force-enable the automatic options handling.
+ provide_automatic_options = getattr(view_func,
+ 'provide_automatic_options', None)
+
+ if provide_automatic_options is None:
+ if 'OPTIONS' not in methods:
+ provide_automatic_options = True
+ required_methods.add('OPTIONS')
+ else:
+ provide_automatic_options = False
+
+ # Add the required methods now.
+ methods |= required_methods
+
+ # due to a werkzeug bug we need to make sure that the defaults are
+ # None if they are an empty dictionary. This should not be necessary
+ # with Werkzeug 0.7
+ options['defaults'] = options.get('defaults') or None
+
+ rule = self.url_rule_class(rule, methods=methods, **options)
+ rule.provide_automatic_options = provide_automatic_options
+
+ self.url_map.add(rule)
+ if view_func is not None:
+ old_func = self.view_functions.get(endpoint)
+ if old_func is not None and old_func != view_func:
+ raise AssertionError('View function mapping is overwriting an '
+ 'existing endpoint function: %s' % endpoint)
+ self.view_functions[endpoint] = view_func
+
+ def route(self, rule, **options):
+ """A decorator that is used to register a view function for a
+ given URL rule. This does the same thing as :meth:`add_url_rule`
+ but is intended for decorator usage::
+
+ @app.route('/')
+ def index():
+ return 'Hello World'
+
+ For more information refer to :ref:`url-route-registrations`.
+
+ :param rule: the URL rule as string
+ :param endpoint: the endpoint for the registered URL rule. Flask
+ itself assumes the name of the view function as
+ endpoint
+ :param options: the options to be forwarded to the underlying
+ :class:`~werkzeug.routing.Rule` object. A change
+ to Werkzeug is handling of method options. methods
+ is a list of methods this rule should be limited
+ to (`GET`, `POST` etc.). By default a rule
+ just listens for `GET` (and implicitly `HEAD`).
+ Starting with Flask 0.6, `OPTIONS` is implicitly
+ added and handled by the standard request handling.
+ """
+ def decorator(f):
+ endpoint = options.pop('endpoint', None)
+ self.add_url_rule(rule, endpoint, f, **options)
+ return f
+ return decorator
+
+ @setupmethod
+ def endpoint(self, endpoint):
+ """A decorator to register a function as an endpoint.
+ Example::
+
+ @app.endpoint('example.endpoint')
+ def example():
+ return "example"
+
+ :param endpoint: the name of the endpoint
+ """
+ def decorator(f):
+ self.view_functions[endpoint] = f
+ return f
+ return decorator
+
+ @setupmethod
+ def errorhandler(self, code_or_exception):
+ """A decorator that is used to register a function give a given
+ error code. Example::
+
+ @app.errorhandler(404)
+ def page_not_found(error):
+ return 'This page does not exist', 404
+
+ You can also register handlers for arbitrary exceptions::
+
+ @app.errorhandler(DatabaseError)
+ def special_exception_handler(error):
+ return 'Database connection failed', 500
+
+ You can also register a function as error handler without using
+ the :meth:`errorhandler` decorator. The following example is
+ equivalent to the one above::
+
+ def page_not_found(error):
+ return 'This page does not exist', 404
+ app.error_handler_spec[None][404] = page_not_found
+
+ Setting error handlers via assignments to :attr:`error_handler_spec`
+ however is discouraged as it requires fiddling with nested dictionaries
+ and the special case for arbitrary exception types.
+
+ The first `None` refers to the active blueprint. If the error
+ handler should be application wide `None` shall be used.
+
+ .. versionadded:: 0.7
+ One can now additionally also register custom exception types
+ that do not necessarily have to be a subclass of the
+ :class:`~werkzeug.exceptions.HTTPException` class.
+
+ :param code: the code as integer for the handler
+ """
+ def decorator(f):
+ self._register_error_handler(None, code_or_exception, f)
+ return f
+ return decorator
+
+ def register_error_handler(self, code_or_exception, f):
+ """Alternative error attach function to the :meth:`errorhandler`
+ decorator that is more straightforward to use for non decorator
+ usage.
+
+ .. versionadded:: 0.7
+ """
+ self._register_error_handler(None, code_or_exception, f)
+
+ @setupmethod
+ def _register_error_handler(self, key, code_or_exception, f):
+ if isinstance(code_or_exception, HTTPException):
+ code_or_exception = code_or_exception.code
+ if isinstance(code_or_exception, integer_types):
+ assert code_or_exception != 500 or key is None, \
+ 'It is currently not possible to register a 500 internal ' \
+ 'server error on a per-blueprint level.'
+ self.error_handler_spec.setdefault(key, {})[code_or_exception] = f
+ else:
+ self.error_handler_spec.setdefault(key, {}).setdefault(None, []) \
+ .append((code_or_exception, f))
+
+ @setupmethod
+ def template_filter(self, name=None):
+ """A decorator that is used to register custom template filter.
+ You can specify a name for the filter, otherwise the function
+ name will be used. Example::
+
+ @app.template_filter()
+ def reverse(s):
+ return s[::-1]
+
+ :param name: the optional name of the filter, otherwise the
+ function name will be used.
+ """
+ def decorator(f):
+ self.add_template_filter(f, name=name)
+ return f
+ return decorator
+
+ @setupmethod
+ def add_template_filter(self, f, name=None):
+ """Register a custom template filter. Works exactly like the
+ :meth:`template_filter` decorator.
+
+ :param name: the optional name of the filter, otherwise the
+ function name will be used.
+ """
+ self.jinja_env.filters[name or f.__name__] = f
+
+ @setupmethod
+ def template_test(self, name=None):
+ """A decorator that is used to register custom template test.
+ You can specify a name for the test, otherwise the function
+ name will be used. Example::
+
+ @app.template_test()
+ def is_prime(n):
+ if n == 2:
+ return True
+ for i in range(2, int(math.ceil(math.sqrt(n))) + 1):
+ if n % i == 0:
+ return False
+ return True
+
+ .. versionadded:: 0.10
+
+ :param name: the optional name of the test, otherwise the
+ function name will be used.
+ """
+ def decorator(f):
+ self.add_template_test(f, name=name)
+ return f
+ return decorator
+
+ @setupmethod
+ def add_template_test(self, f, name=None):
+ """Register a custom template test. Works exactly like the
+ :meth:`template_test` decorator.
+
+ .. versionadded:: 0.10
+
+ :param name: the optional name of the test, otherwise the
+ function name will be used.
+ """
+ self.jinja_env.tests[name or f.__name__] = f
+
+
+ @setupmethod
+ def template_global(self, name=None):
+ """A decorator that is used to register a custom template global function.
+ You can specify a name for the global function, otherwise the function
+ name will be used. Example::
+
+ @app.template_global()
+ def double(n):
+ return 2 * n
+
+ .. versionadded:: 0.10
+
+ :param name: the optional name of the global function, otherwise the
+ function name will be used.
+ """
+ def decorator(f):
+ self.add_template_global(f, name=name)
+ return f
+ return decorator
+
+ @setupmethod
+ def add_template_global(self, f, name=None):
+ """Register a custom template global function. Works exactly like the
+ :meth:`template_global` decorator.
+
+ .. versionadded:: 0.10
+
+ :param name: the optional name of the global function, otherwise the
+ function name will be used.
+ """
+ self.jinja_env.globals[name or f.__name__] = f
+
+ @setupmethod
+ def before_request(self, f):
+ """Registers a function to run before each request."""
+ self.before_request_funcs.setdefault(None, []).append(f)
+ return f
+
+ @setupmethod
+ def before_first_request(self, f):
+ """Registers a function to be run before the first request to this
+ instance of the application.
+
+ .. versionadded:: 0.8
+ """
+ self.before_first_request_funcs.append(f)
+
+ @setupmethod
+ def after_request(self, f):
+ """Register a function to be run after each request. Your function
+ must take one parameter, a :attr:`response_class` object and return
+ a new response object or the same (see :meth:`process_response`).
+
+ As of Flask 0.7 this function might not be executed at the end of the
+ request in case an unhandled exception occurred.
+ """
+ self.after_request_funcs.setdefault(None, []).append(f)
+ return f
+
+ @setupmethod
+ def teardown_request(self, f):
+ """Register a function to be run at the end of each request,
+ regardless of whether there was an exception or not. These functions
+ are executed when the request context is popped, even if not an
+ actual request was performed.
+
+ Example::
+
+ ctx = app.test_request_context()
+ ctx.push()
+ ...
+ ctx.pop()
+
+ When ``ctx.pop()`` is executed in the above example, the teardown
+ functions are called just before the request context moves from the
+ stack of active contexts. This becomes relevant if you are using
+ such constructs in tests.
+
+ Generally teardown functions must take every necessary step to avoid
+ that they will fail. If they do execute code that might fail they
+ will have to surround the execution of these code by try/except
+ statements and log occurring errors.
+
+ When a teardown function was called because of a exception it will
+ be passed an error object.
+
+ .. admonition:: Debug Note
+
+ In debug mode Flask will not tear down a request on an exception
+ immediately. Instead if will keep it alive so that the interactive
+ debugger can still access it. This behavior can be controlled
+ by the ``PRESERVE_CONTEXT_ON_EXCEPTION`` configuration variable.
+ """
+ self.teardown_request_funcs.setdefault(None, []).append(f)
+ return f
+
+ @setupmethod
+ def teardown_appcontext(self, f):
+ """Registers a function to be called when the application context
+ ends. These functions are typically also called when the request
+ context is popped.
+
+ Example::
+
+ ctx = app.app_context()
+ ctx.push()
+ ...
+ ctx.pop()
+
+ When ``ctx.pop()`` is executed in the above example, the teardown
+ functions are called just before the app context moves from the
+ stack of active contexts. This becomes relevant if you are using
+ such constructs in tests.
+
+ Since a request context typically also manages an application
+ context it would also be called when you pop a request context.
+
+ When a teardown function was called because of an exception it will
+ be passed an error object.
+
+ .. versionadded:: 0.9
+ """
+ self.teardown_appcontext_funcs.append(f)
+ return f
+
+ @setupmethod
+ def context_processor(self, f):
+ """Registers a template context processor function."""
+ self.template_context_processors[None].append(f)
+ return f
+
+ @setupmethod
+ def url_value_preprocessor(self, f):
+ """Registers a function as URL value preprocessor for all view
+ functions of the application. It's called before the view functions
+ are called and can modify the url values provided.
+ """
+ self.url_value_preprocessors.setdefault(None, []).append(f)
+ return f
+
+ @setupmethod
+ def url_defaults(self, f):
+ """Callback function for URL defaults for all view functions of the
+ application. It's called with the endpoint and values and should
+ update the values passed in place.
+ """
+ self.url_default_functions.setdefault(None, []).append(f)
+ return f
+
+ def handle_http_exception(self, e):
+ """Handles an HTTP exception. By default this will invoke the
+ registered error handlers and fall back to returning the
+ exception as response.
+
+ .. versionadded:: 0.3
+ """
+ handlers = self.error_handler_spec.get(request.blueprint)
+ # Proxy exceptions don't have error codes. We want to always return
+ # those unchanged as errors
+ if e.code is None:
+ return e
+ if handlers and e.code in handlers:
+ handler = handlers[e.code]
+ else:
+ handler = self.error_handler_spec[None].get(e.code)
+ if handler is None:
+ return e
+ return handler(e)
+
+ def trap_http_exception(self, e):
+ """Checks if an HTTP exception should be trapped or not. By default
+ this will return `False` for all exceptions except for a bad request
+ key error if ``TRAP_BAD_REQUEST_ERRORS`` is set to `True`. It
+ also returns `True` if ``TRAP_HTTP_EXCEPTIONS`` is set to `True`.
+
+ This is called for all HTTP exceptions raised by a view function.
+ If it returns `True` for any exception the error handler for this
+ exception is not called and it shows up as regular exception in the
+ traceback. This is helpful for debugging implicitly raised HTTP
+ exceptions.
+
+ .. versionadded:: 0.8
+ """
+ if self.config['TRAP_HTTP_EXCEPTIONS']:
+ return True
+ if self.config['TRAP_BAD_REQUEST_ERRORS']:
+ return isinstance(e, BadRequest)
+ return False
+
+ def handle_user_exception(self, e):
+ """This method is called whenever an exception occurs that should be
+ handled. A special case are
+ :class:`~werkzeug.exception.HTTPException`\s which are forwarded by
+ this function to the :meth:`handle_http_exception` method. This
+ function will either return a response value or reraise the
+ exception with the same traceback.
+
+ .. versionadded:: 0.7
+ """
+ exc_type, exc_value, tb = sys.exc_info()
+ assert exc_value is e
+
+ # ensure not to trash sys.exc_info() at that point in case someone
+ # wants the traceback preserved in handle_http_exception. Of course
+ # we cannot prevent users from trashing it themselves in a custom
+ # trap_http_exception method so that's their fault then.
+ if isinstance(e, HTTPException) and not self.trap_http_exception(e):
+ return self.handle_http_exception(e)
+
+ blueprint_handlers = ()
+ handlers = self.error_handler_spec.get(request.blueprint)
+ if handlers is not None:
+ blueprint_handlers = handlers.get(None, ())
+ app_handlers = self.error_handler_spec[None].get(None, ())
+ for typecheck, handler in chain(blueprint_handlers, app_handlers):
+ if isinstance(e, typecheck):
+ return handler(e)
+
+ reraise(exc_type, exc_value, tb)
+
+ def handle_exception(self, e):
+ """Default exception handling that kicks in when an exception
+ occurs that is not caught. In debug mode the exception will
+ be re-raised immediately, otherwise it is logged and the handler
+ for a 500 internal server error is used. If no such handler
+ exists, a default 500 internal server error message is displayed.
+
+ .. versionadded:: 0.3
+ """
+ exc_type, exc_value, tb = sys.exc_info()
+
+ got_request_exception.send(self, exception=e)
+ handler = self.error_handler_spec[None].get(500)
+
+ if self.propagate_exceptions:
+ # if we want to repropagate the exception, we can attempt to
+ # raise it with the whole traceback in case we can do that
+ # (the function was actually called from the except part)
+ # otherwise, we just raise the error again
+ if exc_value is e:
+ reraise(exc_type, exc_value, tb)
+ else:
+ raise e
+
+ self.log_exception((exc_type, exc_value, tb))
+ if handler is None:
+ return InternalServerError()
+ return handler(e)
+
+ def log_exception(self, exc_info):
+ """Logs an exception. This is called by :meth:`handle_exception`
+ if debugging is disabled and right before the handler is called.
+ The default implementation logs the exception as error on the
+ :attr:`logger`.
+
+ .. versionadded:: 0.8
+ """
+ self.logger.error('Exception on %s [%s]' % (
+ request.path,
+ request.method
+ ), exc_info=exc_info)
+
+ def raise_routing_exception(self, request):
+ """Exceptions that are recording during routing are reraised with
+ this method. During debug we are not reraising redirect requests
+ for non ``GET``, ``HEAD``, or ``OPTIONS`` requests and we're raising
+ a different error instead to help debug situations.
+
+ :internal:
+ """
+ if not self.debug \
+ or not isinstance(request.routing_exception, RequestRedirect) \
+ or request.method in ('GET', 'HEAD', 'OPTIONS'):
+ raise request.routing_exception
+
+ from .debughelpers import FormDataRoutingRedirect
+ raise FormDataRoutingRedirect(request)
+
+ def dispatch_request(self):
+ """Does the request dispatching. Matches the URL and returns the
+ return value of the view or error handler. This does not have to
+ be a response object. In order to convert the return value to a
+ proper response object, call :func:`make_response`.
+
+ .. versionchanged:: 0.7
+ This no longer does the exception handling, this code was
+ moved to the new :meth:`full_dispatch_request`.
+ """
+ req = _request_ctx_stack.top.request
+ if req.routing_exception is not None:
+ self.raise_routing_exception(req)
+ rule = req.url_rule
+ # if we provide automatic options for this URL and the
+ # request came with the OPTIONS method, reply automatically
+ if getattr(rule, 'provide_automatic_options', False) \
+ and req.method == 'OPTIONS':
+ return self.make_default_options_response()
+ # otherwise dispatch to the handler for that endpoint
+ return self.view_functions[rule.endpoint](**req.view_args)
+
+ def full_dispatch_request(self):
+ """Dispatches the request and on top of that performs request
+ pre and postprocessing as well as HTTP exception catching and
+ error handling.
+
+ .. versionadded:: 0.7
+ """
+ self.try_trigger_before_first_request_functions()
+ try:
+ request_started.send(self)
+ rv = self.preprocess_request()
+ if rv is None:
+ rv = self.dispatch_request()
+ except Exception as e:
+ rv = self.handle_user_exception(e)
+ response = self.make_response(rv)
+ response = self.process_response(response)
+ request_finished.send(self, response=response)
+ return response
+
+ def try_trigger_before_first_request_functions(self):
+ """Called before each request and will ensure that it triggers
+ the :attr:`before_first_request_funcs` and only exactly once per
+ application instance (which means process usually).
+
+ :internal:
+ """
+ if self._got_first_request:
+ return
+ with self._before_request_lock:
+ if self._got_first_request:
+ return
+ self._got_first_request = True
+ for func in self.before_first_request_funcs:
+ func()
+
+ def make_default_options_response(self):
+ """This method is called to create the default `OPTIONS` response.
+ This can be changed through subclassing to change the default
+ behavior of `OPTIONS` responses.
+
+ .. versionadded:: 0.7
+ """
+ adapter = _request_ctx_stack.top.url_adapter
+ if hasattr(adapter, 'allowed_methods'):
+ methods = adapter.allowed_methods()
+ else:
+ # fallback for Werkzeug < 0.7
+ methods = []
+ try:
+ adapter.match(method='--')
+ except MethodNotAllowed as e:
+ methods = e.valid_methods
+ except HTTPException as e:
+ pass
+ rv = self.response_class()
+ rv.allow.update(methods)
+ return rv
+
+ def should_ignore_error(self, error):
+ """This is called to figure out if an error should be ignored
+ or not as far as the teardown system is concerned. If this
+ function returns `True` then the teardown handlers will not be
+ passed the error.
+
+ .. versionadded:: 0.10
+ """
+ return False
+
+ def make_response(self, rv):
+ """Converts the return value from a view function to a real
+ response object that is an instance of :attr:`response_class`.
+
+ The following types are allowed for `rv`:
+
+ .. tabularcolumns:: |p{3.5cm}|p{9.5cm}|
+
+ ======================= ===========================================
+ :attr:`response_class` the object is returned unchanged
+ :class:`str` a response object is created with the
+ string as body
+ :class:`unicode` a response object is created with the
+ string encoded to utf-8 as body
+ a WSGI function the function is called as WSGI application
+ and buffered as response object
+ :class:`tuple` A tuple in the form ``(response, status,
+ headers)`` where `response` is any of the
+ types defined here, `status` is a string
+ or an integer and `headers` is a list of
+ a dictionary with header values.
+ ======================= ===========================================
+
+ :param rv: the return value from the view function
+
+ .. versionchanged:: 0.9
+ Previously a tuple was interpreted as the arguments for the
+ response object.
+ """
+ status = headers = None
+ if isinstance(rv, tuple):
+ rv, status, headers = rv + (None,) * (3 - len(rv))
+
+ if rv is None:
+ raise ValueError('View function did not return a response')
+
+ if not isinstance(rv, self.response_class):
+ # When we create a response object directly, we let the constructor
+ # set the headers and status. We do this because there can be
+ # some extra logic involved when creating these objects with
+ # specific values (like default content type selection).
+ if isinstance(rv, (text_type, bytes, bytearray)):
+ rv = self.response_class(rv, headers=headers, status=status)
+ headers = status = None
+ else:
+ rv = self.response_class.force_type(rv, request.environ)
+
+ if status is not None:
+ if isinstance(status, string_types):
+ rv.status = status
+ else:
+ rv.status_code = status
+ if headers:
+ rv.headers.extend(headers)
+
+ return rv
+
+ def create_url_adapter(self, request):
+ """Creates a URL adapter for the given request. The URL adapter
+ is created at a point where the request context is not yet set up
+ so the request is passed explicitly.
+
+ .. versionadded:: 0.6
+
+ .. versionchanged:: 0.9
+ This can now also be called without a request object when the
+ URL adapter is created for the application context.
+ """
+ if request is not None:
+ return self.url_map.bind_to_environ(request.environ,
+ server_name=self.config['SERVER_NAME'])
+ # We need at the very least the server name to be set for this
+ # to work.
+ if self.config['SERVER_NAME'] is not None:
+ return self.url_map.bind(
+ self.config['SERVER_NAME'],
+ script_name=self.config['APPLICATION_ROOT'] or '/',
+ url_scheme=self.config['PREFERRED_URL_SCHEME'])
+
+ def inject_url_defaults(self, endpoint, values):
+ """Injects the URL defaults for the given endpoint directly into
+ the values dictionary passed. This is used internally and
+ automatically called on URL building.
+
+ .. versionadded:: 0.7
+ """
+ funcs = self.url_default_functions.get(None, ())
+ if '.' in endpoint:
+ bp = endpoint.rsplit('.', 1)[0]
+ funcs = chain(funcs, self.url_default_functions.get(bp, ()))
+ for func in funcs:
+ func(endpoint, values)
+
+ def handle_url_build_error(self, error, endpoint, values):
+ """Handle :class:`~werkzeug.routing.BuildError` on :meth:`url_for`.
+ """
+ exc_type, exc_value, tb = sys.exc_info()
+ for handler in self.url_build_error_handlers:
+ try:
+ rv = handler(error, endpoint, values)
+ if rv is not None:
+ return rv
+ except BuildError as error:
+ pass
+
+ # At this point we want to reraise the exception. If the error is
+ # still the same one we can reraise it with the original traceback,
+ # otherwise we raise it from here.
+ if error is exc_value:
+ reraise(exc_type, exc_value, tb)
+ raise error
+
+ def preprocess_request(self):
+ """Called before the actual request dispatching and will
+ call every as :meth:`before_request` decorated function.
+ If any of these function returns a value it's handled as
+ if it was the return value from the view and further
+ request handling is stopped.
+
+ This also triggers the :meth:`url_value_processor` functions before
+ the actual :meth:`before_request` functions are called.
+ """
+ bp = _request_ctx_stack.top.request.blueprint
+
+ funcs = self.url_value_preprocessors.get(None, ())
+ if bp is not None and bp in self.url_value_preprocessors:
+ funcs = chain(funcs, self.url_value_preprocessors[bp])
+ for func in funcs:
+ func(request.endpoint, request.view_args)
+
+ funcs = self.before_request_funcs.get(None, ())
+ if bp is not None and bp in self.before_request_funcs:
+ funcs = chain(funcs, self.before_request_funcs[bp])
+ for func in funcs:
+ rv = func()
+ if rv is not None:
+ return rv
+
+ def process_response(self, response):
+ """Can be overridden in order to modify the response object
+ before it's sent to the WSGI server. By default this will
+ call all the :meth:`after_request` decorated functions.
+
+ .. versionchanged:: 0.5
+ As of Flask 0.5 the functions registered for after request
+ execution are called in reverse order of registration.
+
+ :param response: a :attr:`response_class` object.
+ :return: a new response object or the same, has to be an
+ instance of :attr:`response_class`.
+ """
+ ctx = _request_ctx_stack.top
+ bp = ctx.request.blueprint
+ funcs = ctx._after_request_functions
+ if bp is not None and bp in self.after_request_funcs:
+ funcs = chain(funcs, reversed(self.after_request_funcs[bp]))
+ if None in self.after_request_funcs:
+ funcs = chain(funcs, reversed(self.after_request_funcs[None]))
+ for handler in funcs:
+ response = handler(response)
+ if not self.session_interface.is_null_session(ctx.session):
+ self.save_session(ctx.session, response)
+ return response
+
+ def do_teardown_request(self, exc=None):
+ """Called after the actual request dispatching and will
+ call every as :meth:`teardown_request` decorated function. This is
+ not actually called by the :class:`Flask` object itself but is always
+ triggered when the request context is popped. That way we have a
+ tighter control over certain resources under testing environments.
+
+ .. versionchanged:: 0.9
+ Added the `exc` argument. Previously this was always using the
+ current exception information.
+ """
+ if exc is None:
+ exc = sys.exc_info()[1]
+ funcs = reversed(self.teardown_request_funcs.get(None, ()))
+ bp = _request_ctx_stack.top.request.blueprint
+ if bp is not None and bp in self.teardown_request_funcs:
+ funcs = chain(funcs, reversed(self.teardown_request_funcs[bp]))
+ for func in funcs:
+ rv = func(exc)
+ request_tearing_down.send(self, exc=exc)
+
+ def do_teardown_appcontext(self, exc=None):
+ """Called when an application context is popped. This works pretty
+ much the same as :meth:`do_teardown_request` but for the application
+ context.
+
+ .. versionadded:: 0.9
+ """
+ if exc is None:
+ exc = sys.exc_info()[1]
+ for func in reversed(self.teardown_appcontext_funcs):
+ func(exc)
+ appcontext_tearing_down.send(self, exc=exc)
+
+ def app_context(self):
+ """Binds the application only. For as long as the application is bound
+ to the current context the :data:`flask.current_app` points to that
+ application. An application context is automatically created when a
+ request context is pushed if necessary.
+
+ Example usage::
+
+ with app.app_context():
+ ...
+
+ .. versionadded:: 0.9
+ """
+ return AppContext(self)
+
+ def request_context(self, environ):
+ """Creates a :class:`~flask.ctx.RequestContext` from the given
+ environment and binds it to the current context. This must be used in
+ combination with the `with` statement because the request is only bound
+ to the current context for the duration of the `with` block.
+
+ Example usage::
+
+ with app.request_context(environ):
+ do_something_with(request)
+
+ The object returned can also be used without the `with` statement
+ which is useful for working in the shell. The example above is
+ doing exactly the same as this code::
+
+ ctx = app.request_context(environ)
+ ctx.push()
+ try:
+ do_something_with(request)
+ finally:
+ ctx.pop()
+
+ .. versionchanged:: 0.3
+ Added support for non-with statement usage and `with` statement
+ is now passed the ctx object.
+
+ :param environ: a WSGI environment
+ """
+ return RequestContext(self, environ)
+
+ def test_request_context(self, *args, **kwargs):
+ """Creates a WSGI environment from the given values (see
+ :func:`werkzeug.test.EnvironBuilder` for more information, this
+ function accepts the same arguments).
+ """
+ from flask.testing import make_test_environ_builder
+ builder = make_test_environ_builder(self, *args, **kwargs)
+ try:
+ return self.request_context(builder.get_environ())
+ finally:
+ builder.close()
+
+ def wsgi_app(self, environ, start_response):
+ """The actual WSGI application. This is not implemented in
+ `__call__` so that middlewares can be applied without losing a
+ reference to the class. So instead of doing this::
+
+ app = MyMiddleware(app)
+
+ It's a better idea to do this instead::
+
+ app.wsgi_app = MyMiddleware(app.wsgi_app)
+
+ Then you still have the original application object around and
+ can continue to call methods on it.
+
+ .. versionchanged:: 0.7
+ The behavior of the before and after request callbacks was changed
+ under error conditions and a new callback was added that will
+ always execute at the end of the request, independent on if an
+ error occurred or not. See :ref:`callbacks-and-errors`.
+
+ :param environ: a WSGI environment
+ :param start_response: a callable accepting a status code,
+ a list of headers and an optional
+ exception context to start the response
+ """
+ ctx = self.request_context(environ)
+ ctx.push()
+ error = None
+ try:
+ try:
+ response = self.full_dispatch_request()
+ except Exception as e:
+ error = e
+ response = self.make_response(self.handle_exception(e))
+ return response(environ, start_response)
+ finally:
+ if self.should_ignore_error(error):
+ error = None
+ ctx.auto_pop(error)
+
+ @property
+ def modules(self):
+ from warnings import warn
+ warn(DeprecationWarning('Flask.modules is deprecated, use '
+ 'Flask.blueprints instead'), stacklevel=2)
+ return self.blueprints
+
+ def __call__(self, environ, start_response):
+ """Shortcut for :attr:`wsgi_app`."""
+ return self.wsgi_app(environ, start_response)
+
+ def __repr__(self):
+ return '<%s %r>' % (
+ self.__class__.__name__,
+ self.name,
+ )
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/flask/app.pyc b/Assignments/microblog/flask/lib/python2.7/site-packages/flask/app.pyc
new file mode 100644
index 0000000..59d4a53
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/flask/app.pyc differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/flask/blueprints.py b/Assignments/microblog/flask/lib/python2.7/site-packages/flask/blueprints.py
new file mode 100644
index 0000000..4575ec9
--- /dev/null
+++ b/Assignments/microblog/flask/lib/python2.7/site-packages/flask/blueprints.py
@@ -0,0 +1,401 @@
+# -*- coding: utf-8 -*-
+"""
+ flask.blueprints
+ ~~~~~~~~~~~~~~~~
+
+ Blueprints are the recommended way to implement larger or more
+ pluggable applications in Flask 0.7 and later.
+
+ :copyright: (c) 2011 by Armin Ronacher.
+ :license: BSD, see LICENSE for more details.
+"""
+from functools import update_wrapper
+
+from .helpers import _PackageBoundObject, _endpoint_from_view_func
+
+
+class BlueprintSetupState(object):
+ """Temporary holder object for registering a blueprint with the
+ application. An instance of this class is created by the
+ :meth:`~flask.Blueprint.make_setup_state` method and later passed
+ to all register callback functions.
+ """
+
+ def __init__(self, blueprint, app, options, first_registration):
+ #: a reference to the current application
+ self.app = app
+
+ #: a reference to the blueprint that created this setup state.
+ self.blueprint = blueprint
+
+ #: a dictionary with all options that were passed to the
+ #: :meth:`~flask.Flask.register_blueprint` method.
+ self.options = options
+
+ #: as blueprints can be registered multiple times with the
+ #: application and not everything wants to be registered
+ #: multiple times on it, this attribute can be used to figure
+ #: out if the blueprint was registered in the past already.
+ self.first_registration = first_registration
+
+ subdomain = self.options.get('subdomain')
+ if subdomain is None:
+ subdomain = self.blueprint.subdomain
+
+ #: The subdomain that the blueprint should be active for, `None`
+ #: otherwise.
+ self.subdomain = subdomain
+
+ url_prefix = self.options.get('url_prefix')
+ if url_prefix is None:
+ url_prefix = self.blueprint.url_prefix
+
+ #: The prefix that should be used for all URLs defined on the
+ #: blueprint.
+ self.url_prefix = url_prefix
+
+ #: A dictionary with URL defaults that is added to each and every
+ #: URL that was defined with the blueprint.
+ self.url_defaults = dict(self.blueprint.url_values_defaults)
+ self.url_defaults.update(self.options.get('url_defaults', ()))
+
+ def add_url_rule(self, rule, endpoint=None, view_func=None, **options):
+ """A helper method to register a rule (and optionally a view function)
+ to the application. The endpoint is automatically prefixed with the
+ blueprint's name.
+ """
+ if self.url_prefix:
+ rule = self.url_prefix + rule
+ options.setdefault('subdomain', self.subdomain)
+ if endpoint is None:
+ endpoint = _endpoint_from_view_func(view_func)
+ defaults = self.url_defaults
+ if 'defaults' in options:
+ defaults = dict(defaults, **options.pop('defaults'))
+ self.app.add_url_rule(rule, '%s.%s' % (self.blueprint.name, endpoint),
+ view_func, defaults=defaults, **options)
+
+
+class Blueprint(_PackageBoundObject):
+ """Represents a blueprint. A blueprint is an object that records
+ functions that will be called with the
+ :class:`~flask.blueprint.BlueprintSetupState` later to register functions
+ or other things on the main application. See :ref:`blueprints` for more
+ information.
+
+ .. versionadded:: 0.7
+ """
+
+ warn_on_modifications = False
+ _got_registered_once = False
+
+ def __init__(self, name, import_name, static_folder=None,
+ static_url_path=None, template_folder=None,
+ url_prefix=None, subdomain=None, url_defaults=None):
+ _PackageBoundObject.__init__(self, import_name, template_folder)
+ self.name = name
+ self.url_prefix = url_prefix
+ self.subdomain = subdomain
+ self.static_folder = static_folder
+ self.static_url_path = static_url_path
+ self.deferred_functions = []
+ self.view_functions = {}
+ if url_defaults is None:
+ url_defaults = {}
+ self.url_values_defaults = url_defaults
+
+ def record(self, func):
+ """Registers a function that is called when the blueprint is
+ registered on the application. This function is called with the
+ state as argument as returned by the :meth:`make_setup_state`
+ method.
+ """
+ if self._got_registered_once and self.warn_on_modifications:
+ from warnings import warn
+ warn(Warning('The blueprint was already registered once '
+ 'but is getting modified now. These changes '
+ 'will not show up.'))
+ self.deferred_functions.append(func)
+
+ def record_once(self, func):
+ """Works like :meth:`record` but wraps the function in another
+ function that will ensure the function is only called once. If the
+ blueprint is registered a second time on the application, the
+ function passed is not called.
+ """
+ def wrapper(state):
+ if state.first_registration:
+ func(state)
+ return self.record(update_wrapper(wrapper, func))
+
+ def make_setup_state(self, app, options, first_registration=False):
+ """Creates an instance of :meth:`~flask.blueprints.BlueprintSetupState`
+ object that is later passed to the register callback functions.
+ Subclasses can override this to return a subclass of the setup state.
+ """
+ return BlueprintSetupState(self, app, options, first_registration)
+
+ def register(self, app, options, first_registration=False):
+ """Called by :meth:`Flask.register_blueprint` to register a blueprint
+ on the application. This can be overridden to customize the register
+ behavior. Keyword arguments from
+ :func:`~flask.Flask.register_blueprint` are directly forwarded to this
+ method in the `options` dictionary.
+ """
+ self._got_registered_once = True
+ state = self.make_setup_state(app, options, first_registration)
+ if self.has_static_folder:
+ state.add_url_rule(self.static_url_path + '/',
+ view_func=self.send_static_file,
+ endpoint='static')
+
+ for deferred in self.deferred_functions:
+ deferred(state)
+
+ def route(self, rule, **options):
+ """Like :meth:`Flask.route` but for a blueprint. The endpoint for the
+ :func:`url_for` function is prefixed with the name of the blueprint.
+ """
+ def decorator(f):
+ endpoint = options.pop("endpoint", f.__name__)
+ self.add_url_rule(rule, endpoint, f, **options)
+ return f
+ return decorator
+
+ def add_url_rule(self, rule, endpoint=None, view_func=None, **options):
+ """Like :meth:`Flask.add_url_rule` but for a blueprint. The endpoint for
+ the :func:`url_for` function is prefixed with the name of the blueprint.
+ """
+ if endpoint:
+ assert '.' not in endpoint, "Blueprint endpoint's should not contain dot's"
+ self.record(lambda s:
+ s.add_url_rule(rule, endpoint, view_func, **options))
+
+ def endpoint(self, endpoint):
+ """Like :meth:`Flask.endpoint` but for a blueprint. This does not
+ prefix the endpoint with the blueprint name, this has to be done
+ explicitly by the user of this method. If the endpoint is prefixed
+ with a `.` it will be registered to the current blueprint, otherwise
+ it's an application independent endpoint.
+ """
+ def decorator(f):
+ def register_endpoint(state):
+ state.app.view_functions[endpoint] = f
+ self.record_once(register_endpoint)
+ return f
+ return decorator
+
+ def app_template_filter(self, name=None):
+ """Register a custom template filter, available application wide. Like
+ :meth:`Flask.template_filter` but for a blueprint.
+
+ :param name: the optional name of the filter, otherwise the
+ function name will be used.
+ """
+ def decorator(f):
+ self.add_app_template_filter(f, name=name)
+ return f
+ return decorator
+
+ def add_app_template_filter(self, f, name=None):
+ """Register a custom template filter, available application wide. Like
+ :meth:`Flask.add_template_filter` but for a blueprint. Works exactly
+ like the :meth:`app_template_filter` decorator.
+
+ :param name: the optional name of the filter, otherwise the
+ function name will be used.
+ """
+ def register_template(state):
+ state.app.jinja_env.filters[name or f.__name__] = f
+ self.record_once(register_template)
+
+ def app_template_test(self, name=None):
+ """Register a custom template test, available application wide. Like
+ :meth:`Flask.template_test` but for a blueprint.
+
+ .. versionadded:: 0.10
+
+ :param name: the optional name of the test, otherwise the
+ function name will be used.
+ """
+ def decorator(f):
+ self.add_app_template_test(f, name=name)
+ return f
+ return decorator
+
+ def add_app_template_test(self, f, name=None):
+ """Register a custom template test, available application wide. Like
+ :meth:`Flask.add_template_test` but for a blueprint. Works exactly
+ like the :meth:`app_template_test` decorator.
+
+ .. versionadded:: 0.10
+
+ :param name: the optional name of the test, otherwise the
+ function name will be used.
+ """
+ def register_template(state):
+ state.app.jinja_env.tests[name or f.__name__] = f
+ self.record_once(register_template)
+
+ def app_template_global(self, name=None):
+ """Register a custom template global, available application wide. Like
+ :meth:`Flask.template_global` but for a blueprint.
+
+ .. versionadded:: 0.10
+
+ :param name: the optional name of the global, otherwise the
+ function name will be used.
+ """
+ def decorator(f):
+ self.add_app_template_global(f, name=name)
+ return f
+ return decorator
+
+ def add_app_template_global(self, f, name=None):
+ """Register a custom template global, available application wide. Like
+ :meth:`Flask.add_template_global` but for a blueprint. Works exactly
+ like the :meth:`app_template_global` decorator.
+
+ .. versionadded:: 0.10
+
+ :param name: the optional name of the global, otherwise the
+ function name will be used.
+ """
+ def register_template(state):
+ state.app.jinja_env.globals[name or f.__name__] = f
+ self.record_once(register_template)
+
+ def before_request(self, f):
+ """Like :meth:`Flask.before_request` but for a blueprint. This function
+ is only executed before each request that is handled by a function of
+ that blueprint.
+ """
+ self.record_once(lambda s: s.app.before_request_funcs
+ .setdefault(self.name, []).append(f))
+ return f
+
+ def before_app_request(self, f):
+ """Like :meth:`Flask.before_request`. Such a function is executed
+ before each request, even if outside of a blueprint.
+ """
+ self.record_once(lambda s: s.app.before_request_funcs
+ .setdefault(None, []).append(f))
+ return f
+
+ def before_app_first_request(self, f):
+ """Like :meth:`Flask.before_first_request`. Such a function is
+ executed before the first request to the application.
+ """
+ self.record_once(lambda s: s.app.before_first_request_funcs.append(f))
+ return f
+
+ def after_request(self, f):
+ """Like :meth:`Flask.after_request` but for a blueprint. This function
+ is only executed after each request that is handled by a function of
+ that blueprint.
+ """
+ self.record_once(lambda s: s.app.after_request_funcs
+ .setdefault(self.name, []).append(f))
+ return f
+
+ def after_app_request(self, f):
+ """Like :meth:`Flask.after_request` but for a blueprint. Such a function
+ is executed after each request, even if outside of the blueprint.
+ """
+ self.record_once(lambda s: s.app.after_request_funcs
+ .setdefault(None, []).append(f))
+ return f
+
+ def teardown_request(self, f):
+ """Like :meth:`Flask.teardown_request` but for a blueprint. This
+ function is only executed when tearing down requests handled by a
+ function of that blueprint. Teardown request functions are executed
+ when the request context is popped, even when no actual request was
+ performed.
+ """
+ self.record_once(lambda s: s.app.teardown_request_funcs
+ .setdefault(self.name, []).append(f))
+ return f
+
+ def teardown_app_request(self, f):
+ """Like :meth:`Flask.teardown_request` but for a blueprint. Such a
+ function is executed when tearing down each request, even if outside of
+ the blueprint.
+ """
+ self.record_once(lambda s: s.app.teardown_request_funcs
+ .setdefault(None, []).append(f))
+ return f
+
+ def context_processor(self, f):
+ """Like :meth:`Flask.context_processor` but for a blueprint. This
+ function is only executed for requests handled by a blueprint.
+ """
+ self.record_once(lambda s: s.app.template_context_processors
+ .setdefault(self.name, []).append(f))
+ return f
+
+ def app_context_processor(self, f):
+ """Like :meth:`Flask.context_processor` but for a blueprint. Such a
+ function is executed each request, even if outside of the blueprint.
+ """
+ self.record_once(lambda s: s.app.template_context_processors
+ .setdefault(None, []).append(f))
+ return f
+
+ def app_errorhandler(self, code):
+ """Like :meth:`Flask.errorhandler` but for a blueprint. This
+ handler is used for all requests, even if outside of the blueprint.
+ """
+ def decorator(f):
+ self.record_once(lambda s: s.app.errorhandler(code)(f))
+ return f
+ return decorator
+
+ def url_value_preprocessor(self, f):
+ """Registers a function as URL value preprocessor for this
+ blueprint. It's called before the view functions are called and
+ can modify the url values provided.
+ """
+ self.record_once(lambda s: s.app.url_value_preprocessors
+ .setdefault(self.name, []).append(f))
+ return f
+
+ def url_defaults(self, f):
+ """Callback function for URL defaults for this blueprint. It's called
+ with the endpoint and values and should update the values passed
+ in place.
+ """
+ self.record_once(lambda s: s.app.url_default_functions
+ .setdefault(self.name, []).append(f))
+ return f
+
+ def app_url_value_preprocessor(self, f):
+ """Same as :meth:`url_value_preprocessor` but application wide.
+ """
+ self.record_once(lambda s: s.app.url_value_preprocessors
+ .setdefault(None, []).append(f))
+ return f
+
+ def app_url_defaults(self, f):
+ """Same as :meth:`url_defaults` but application wide.
+ """
+ self.record_once(lambda s: s.app.url_default_functions
+ .setdefault(None, []).append(f))
+ return f
+
+ def errorhandler(self, code_or_exception):
+ """Registers an error handler that becomes active for this blueprint
+ only. Please be aware that routing does not happen local to a
+ blueprint so an error handler for 404 usually is not handled by
+ a blueprint unless it is caused inside a view function. Another
+ special case is the 500 internal server error which is always looked
+ up from the application.
+
+ Otherwise works as the :meth:`~flask.Flask.errorhandler` decorator
+ of the :class:`~flask.Flask` object.
+ """
+ def decorator(f):
+ self.record_once(lambda s: s.app._register_error_handler(
+ self.name, code_or_exception, f))
+ return f
+ return decorator
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/flask/blueprints.pyc b/Assignments/microblog/flask/lib/python2.7/site-packages/flask/blueprints.pyc
new file mode 100644
index 0000000..c9944d1
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/flask/blueprints.pyc differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/flask/config.py b/Assignments/microblog/flask/lib/python2.7/site-packages/flask/config.py
new file mode 100644
index 0000000..155afa2
--- /dev/null
+++ b/Assignments/microblog/flask/lib/python2.7/site-packages/flask/config.py
@@ -0,0 +1,168 @@
+# -*- coding: utf-8 -*-
+"""
+ flask.config
+ ~~~~~~~~~~~~
+
+ Implements the configuration related objects.
+
+ :copyright: (c) 2011 by Armin Ronacher.
+ :license: BSD, see LICENSE for more details.
+"""
+
+import imp
+import os
+import errno
+
+from werkzeug.utils import import_string
+from ._compat import string_types
+
+
+class ConfigAttribute(object):
+ """Makes an attribute forward to the config"""
+
+ def __init__(self, name, get_converter=None):
+ self.__name__ = name
+ self.get_converter = get_converter
+
+ def __get__(self, obj, type=None):
+ if obj is None:
+ return self
+ rv = obj.config[self.__name__]
+ if self.get_converter is not None:
+ rv = self.get_converter(rv)
+ return rv
+
+ def __set__(self, obj, value):
+ obj.config[self.__name__] = value
+
+
+class Config(dict):
+ """Works exactly like a dict but provides ways to fill it from files
+ or special dictionaries. There are two common patterns to populate the
+ config.
+
+ Either you can fill the config from a config file::
+
+ app.config.from_pyfile('yourconfig.cfg')
+
+ Or alternatively you can define the configuration options in the
+ module that calls :meth:`from_object` or provide an import path to
+ a module that should be loaded. It is also possible to tell it to
+ use the same module and with that provide the configuration values
+ just before the call::
+
+ DEBUG = True
+ SECRET_KEY = 'development key'
+ app.config.from_object(__name__)
+
+ In both cases (loading from any Python file or loading from modules),
+ only uppercase keys are added to the config. This makes it possible to use
+ lowercase values in the config file for temporary values that are not added
+ to the config or to define the config keys in the same file that implements
+ the application.
+
+ Probably the most interesting way to load configurations is from an
+ environment variable pointing to a file::
+
+ app.config.from_envvar('YOURAPPLICATION_SETTINGS')
+
+ In this case before launching the application you have to set this
+ environment variable to the file you want to use. On Linux and OS X
+ use the export statement::
+
+ export YOURAPPLICATION_SETTINGS='/path/to/config/file'
+
+ On windows use `set` instead.
+
+ :param root_path: path to which files are read relative from. When the
+ config object is created by the application, this is
+ the application's :attr:`~flask.Flask.root_path`.
+ :param defaults: an optional dictionary of default values
+ """
+
+ def __init__(self, root_path, defaults=None):
+ dict.__init__(self, defaults or {})
+ self.root_path = root_path
+
+ def from_envvar(self, variable_name, silent=False):
+ """Loads a configuration from an environment variable pointing to
+ a configuration file. This is basically just a shortcut with nicer
+ error messages for this line of code::
+
+ app.config.from_pyfile(os.environ['YOURAPPLICATION_SETTINGS'])
+
+ :param variable_name: name of the environment variable
+ :param silent: set to `True` if you want silent failure for missing
+ files.
+ :return: bool. `True` if able to load config, `False` otherwise.
+ """
+ rv = os.environ.get(variable_name)
+ if not rv:
+ if silent:
+ return False
+ raise RuntimeError('The environment variable %r is not set '
+ 'and as such configuration could not be '
+ 'loaded. Set this variable and make it '
+ 'point to a configuration file' %
+ variable_name)
+ return self.from_pyfile(rv, silent=silent)
+
+ def from_pyfile(self, filename, silent=False):
+ """Updates the values in the config from a Python file. This function
+ behaves as if the file was imported as module with the
+ :meth:`from_object` function.
+
+ :param filename: the filename of the config. This can either be an
+ absolute filename or a filename relative to the
+ root path.
+ :param silent: set to `True` if you want silent failure for missing
+ files.
+
+ .. versionadded:: 0.7
+ `silent` parameter.
+ """
+ filename = os.path.join(self.root_path, filename)
+ d = imp.new_module('config')
+ d.__file__ = filename
+ try:
+ with open(filename) as config_file:
+ exec(compile(config_file.read(), filename, 'exec'), d.__dict__)
+ except IOError as e:
+ if silent and e.errno in (errno.ENOENT, errno.EISDIR):
+ return False
+ e.strerror = 'Unable to load configuration file (%s)' % e.strerror
+ raise
+ self.from_object(d)
+ return True
+
+ def from_object(self, obj):
+ """Updates the values from the given object. An object can be of one
+ of the following two types:
+
+ - a string: in this case the object with that name will be imported
+ - an actual object reference: that object is used directly
+
+ Objects are usually either modules or classes.
+
+ Just the uppercase variables in that object are stored in the config.
+ Example usage::
+
+ app.config.from_object('yourapplication.default_config')
+ from yourapplication import default_config
+ app.config.from_object(default_config)
+
+ You should not use this function to load the actual configuration but
+ rather configuration defaults. The actual config should be loaded
+ with :meth:`from_pyfile` and ideally from a location not within the
+ package because the package might be installed system wide.
+
+ :param obj: an import name or object
+ """
+ if isinstance(obj, string_types):
+ obj = import_string(obj)
+ for key in dir(obj):
+ if key.isupper():
+ self[key] = getattr(obj, key)
+
+ def __repr__(self):
+ return '<%s %s>' % (self.__class__.__name__, dict.__repr__(self))
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/flask/config.pyc b/Assignments/microblog/flask/lib/python2.7/site-packages/flask/config.pyc
new file mode 100644
index 0000000..244f9f3
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/flask/config.pyc differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/flask/ctx.py b/Assignments/microblog/flask/lib/python2.7/site-packages/flask/ctx.py
new file mode 100644
index 0000000..f134237
--- /dev/null
+++ b/Assignments/microblog/flask/lib/python2.7/site-packages/flask/ctx.py
@@ -0,0 +1,394 @@
+# -*- coding: utf-8 -*-
+"""
+ flask.ctx
+ ~~~~~~~~~
+
+ Implements the objects required to keep the context.
+
+ :copyright: (c) 2011 by Armin Ronacher.
+ :license: BSD, see LICENSE for more details.
+"""
+
+from __future__ import with_statement
+
+import sys
+from functools import update_wrapper
+
+from werkzeug.exceptions import HTTPException
+
+from .globals import _request_ctx_stack, _app_ctx_stack
+from .module import blueprint_is_module
+from .signals import appcontext_pushed, appcontext_popped
+
+
+class _AppCtxGlobals(object):
+ """A plain object."""
+
+ def get(self, name, default=None):
+ return self.__dict__.get(name, default)
+
+ def __contains__(self, item):
+ return item in self.__dict__
+
+ def __iter__(self):
+ return iter(self.__dict__)
+
+ def __repr__(self):
+ top = _app_ctx_stack.top
+ if top is not None:
+ return '' % top.app.name
+ return object.__repr__(self)
+
+
+def after_this_request(f):
+ """Executes a function after this request. This is useful to modify
+ response objects. The function is passed the response object and has
+ to return the same or a new one.
+
+ Example::
+
+ @app.route('/')
+ def index():
+ @after_this_request
+ def add_header(response):
+ response.headers['X-Foo'] = 'Parachute'
+ return response
+ return 'Hello World!'
+
+ This is more useful if a function other than the view function wants to
+ modify a response. For instance think of a decorator that wants to add
+ some headers without converting the return value into a response object.
+
+ .. versionadded:: 0.9
+ """
+ _request_ctx_stack.top._after_request_functions.append(f)
+ return f
+
+
+def copy_current_request_context(f):
+ """A helper function that decorates a function to retain the current
+ request context. This is useful when working with greenlets. The moment
+ the function is decorated a copy of the request context is created and
+ then pushed when the function is called.
+
+ Example::
+
+ import gevent
+ from flask import copy_current_request_context
+
+ @app.route('/')
+ def index():
+ @copy_current_request_context
+ def do_some_work():
+ # do some work here, it can access flask.request like you
+ # would otherwise in the view function.
+ ...
+ gevent.spawn(do_some_work)
+ return 'Regular response'
+
+ .. versionadded:: 0.10
+ """
+ top = _request_ctx_stack.top
+ if top is None:
+ raise RuntimeError('This decorator can only be used at local scopes '
+ 'when a request context is on the stack. For instance within '
+ 'view functions.')
+ reqctx = top.copy()
+ def wrapper(*args, **kwargs):
+ with reqctx:
+ return f(*args, **kwargs)
+ return update_wrapper(wrapper, f)
+
+
+def has_request_context():
+ """If you have code that wants to test if a request context is there or
+ not this function can be used. For instance, you may want to take advantage
+ of request information if the request object is available, but fail
+ silently if it is unavailable.
+
+ ::
+
+ class User(db.Model):
+
+ def __init__(self, username, remote_addr=None):
+ self.username = username
+ if remote_addr is None and has_request_context():
+ remote_addr = request.remote_addr
+ self.remote_addr = remote_addr
+
+ Alternatively you can also just test any of the context bound objects
+ (such as :class:`request` or :class:`g` for truthness)::
+
+ class User(db.Model):
+
+ def __init__(self, username, remote_addr=None):
+ self.username = username
+ if remote_addr is None and request:
+ remote_addr = request.remote_addr
+ self.remote_addr = remote_addr
+
+ .. versionadded:: 0.7
+ """
+ return _request_ctx_stack.top is not None
+
+
+def has_app_context():
+ """Works like :func:`has_request_context` but for the application
+ context. You can also just do a boolean check on the
+ :data:`current_app` object instead.
+
+ .. versionadded:: 0.9
+ """
+ return _app_ctx_stack.top is not None
+
+
+class AppContext(object):
+ """The application context binds an application object implicitly
+ to the current thread or greenlet, similar to how the
+ :class:`RequestContext` binds request information. The application
+ context is also implicitly created if a request context is created
+ but the application is not on top of the individual application
+ context.
+ """
+
+ def __init__(self, app):
+ self.app = app
+ self.url_adapter = app.create_url_adapter(None)
+ self.g = app.app_ctx_globals_class()
+
+ # Like request context, app contexts can be pushed multiple times
+ # but there a basic "refcount" is enough to track them.
+ self._refcnt = 0
+
+ def push(self):
+ """Binds the app context to the current context."""
+ self._refcnt += 1
+ _app_ctx_stack.push(self)
+ appcontext_pushed.send(self.app)
+
+ def pop(self, exc=None):
+ """Pops the app context."""
+ self._refcnt -= 1
+ if self._refcnt <= 0:
+ if exc is None:
+ exc = sys.exc_info()[1]
+ self.app.do_teardown_appcontext(exc)
+ rv = _app_ctx_stack.pop()
+ assert rv is self, 'Popped wrong app context. (%r instead of %r)' \
+ % (rv, self)
+ appcontext_popped.send(self.app)
+
+ def __enter__(self):
+ self.push()
+ return self
+
+ def __exit__(self, exc_type, exc_value, tb):
+ self.pop(exc_value)
+
+
+class RequestContext(object):
+ """The request context contains all request relevant information. It is
+ created at the beginning of the request and pushed to the
+ `_request_ctx_stack` and removed at the end of it. It will create the
+ URL adapter and request object for the WSGI environment provided.
+
+ Do not attempt to use this class directly, instead use
+ :meth:`~flask.Flask.test_request_context` and
+ :meth:`~flask.Flask.request_context` to create this object.
+
+ When the request context is popped, it will evaluate all the
+ functions registered on the application for teardown execution
+ (:meth:`~flask.Flask.teardown_request`).
+
+ The request context is automatically popped at the end of the request
+ for you. In debug mode the request context is kept around if
+ exceptions happen so that interactive debuggers have a chance to
+ introspect the data. With 0.4 this can also be forced for requests
+ that did not fail and outside of `DEBUG` mode. By setting
+ ``'flask._preserve_context'`` to `True` on the WSGI environment the
+ context will not pop itself at the end of the request. This is used by
+ the :meth:`~flask.Flask.test_client` for example to implement the
+ deferred cleanup functionality.
+
+ You might find this helpful for unittests where you need the
+ information from the context local around for a little longer. Make
+ sure to properly :meth:`~werkzeug.LocalStack.pop` the stack yourself in
+ that situation, otherwise your unittests will leak memory.
+ """
+
+ def __init__(self, app, environ, request=None):
+ self.app = app
+ if request is None:
+ request = app.request_class(environ)
+ self.request = request
+ self.url_adapter = app.create_url_adapter(self.request)
+ self.flashes = None
+ self.session = None
+
+ # Request contexts can be pushed multiple times and interleaved with
+ # other request contexts. Now only if the last level is popped we
+ # get rid of them. Additionally if an application context is missing
+ # one is created implicitly so for each level we add this information
+ self._implicit_app_ctx_stack = []
+
+ # indicator if the context was preserved. Next time another context
+ # is pushed the preserved context is popped.
+ self.preserved = False
+
+ # remembers the exception for pop if there is one in case the context
+ # preservation kicks in.
+ self._preserved_exc = None
+
+ # Functions that should be executed after the request on the response
+ # object. These will be called before the regular "after_request"
+ # functions.
+ self._after_request_functions = []
+
+ self.match_request()
+
+ # XXX: Support for deprecated functionality. This is going away with
+ # Flask 1.0
+ blueprint = self.request.blueprint
+ if blueprint is not None:
+ # better safe than sorry, we don't want to break code that
+ # already worked
+ bp = app.blueprints.get(blueprint)
+ if bp is not None and blueprint_is_module(bp):
+ self.request._is_old_module = True
+
+ def _get_g(self):
+ return _app_ctx_stack.top.g
+ def _set_g(self, value):
+ _app_ctx_stack.top.g = value
+ g = property(_get_g, _set_g)
+ del _get_g, _set_g
+
+ def copy(self):
+ """Creates a copy of this request context with the same request object.
+ This can be used to move a request context to a different greenlet.
+ Because the actual request object is the same this cannot be used to
+ move a request context to a different thread unless access to the
+ request object is locked.
+
+ .. versionadded:: 0.10
+ """
+ return self.__class__(self.app,
+ environ=self.request.environ,
+ request=self.request
+ )
+
+ def match_request(self):
+ """Can be overridden by a subclass to hook into the matching
+ of the request.
+ """
+ try:
+ url_rule, self.request.view_args = \
+ self.url_adapter.match(return_rule=True)
+ self.request.url_rule = url_rule
+ except HTTPException as e:
+ self.request.routing_exception = e
+
+ def push(self):
+ """Binds the request context to the current context."""
+ # If an exception occurs in debug mode or if context preservation is
+ # activated under exception situations exactly one context stays
+ # on the stack. The rationale is that you want to access that
+ # information under debug situations. However if someone forgets to
+ # pop that context again we want to make sure that on the next push
+ # it's invalidated, otherwise we run at risk that something leaks
+ # memory. This is usually only a problem in testsuite since this
+ # functionality is not active in production environments.
+ top = _request_ctx_stack.top
+ if top is not None and top.preserved:
+ top.pop(top._preserved_exc)
+
+ # Before we push the request context we have to ensure that there
+ # is an application context.
+ app_ctx = _app_ctx_stack.top
+ if app_ctx is None or app_ctx.app != self.app:
+ app_ctx = self.app.app_context()
+ app_ctx.push()
+ self._implicit_app_ctx_stack.append(app_ctx)
+ else:
+ self._implicit_app_ctx_stack.append(None)
+
+ _request_ctx_stack.push(self)
+
+ # Open the session at the moment that the request context is
+ # available. This allows a custom open_session method to use the
+ # request context (e.g. code that access database information
+ # stored on `g` instead of the appcontext).
+ self.session = self.app.open_session(self.request)
+ if self.session is None:
+ self.session = self.app.make_null_session()
+
+ def pop(self, exc=None):
+ """Pops the request context and unbinds it by doing that. This will
+ also trigger the execution of functions registered by the
+ :meth:`~flask.Flask.teardown_request` decorator.
+
+ .. versionchanged:: 0.9
+ Added the `exc` argument.
+ """
+ app_ctx = self._implicit_app_ctx_stack.pop()
+
+ clear_request = False
+ if not self._implicit_app_ctx_stack:
+ self.preserved = False
+ self._preserved_exc = None
+ if exc is None:
+ exc = sys.exc_info()[1]
+ self.app.do_teardown_request(exc)
+
+ # If this interpreter supports clearing the exception information
+ # we do that now. This will only go into effect on Python 2.x,
+ # on 3.x it disappears automatically at the end of the exception
+ # stack.
+ if hasattr(sys, 'exc_clear'):
+ sys.exc_clear()
+
+ request_close = getattr(self.request, 'close', None)
+ if request_close is not None:
+ request_close()
+ clear_request = True
+
+ rv = _request_ctx_stack.pop()
+ assert rv is self, 'Popped wrong request context. (%r instead of %r)' \
+ % (rv, self)
+
+ # get rid of circular dependencies at the end of the request
+ # so that we don't require the GC to be active.
+ if clear_request:
+ rv.request.environ['werkzeug.request'] = None
+
+ # Get rid of the app as well if necessary.
+ if app_ctx is not None:
+ app_ctx.pop(exc)
+
+ def auto_pop(self, exc):
+ if self.request.environ.get('flask._preserve_context') or \
+ (exc is not None and self.app.preserve_context_on_exception):
+ self.preserved = True
+ self._preserved_exc = exc
+ else:
+ self.pop(exc)
+
+ def __enter__(self):
+ self.push()
+ return self
+
+ def __exit__(self, exc_type, exc_value, tb):
+ # do not pop the request stack if we are in debug mode and an
+ # exception happened. This will allow the debugger to still
+ # access the request object in the interactive shell. Furthermore
+ # the context can be force kept alive for the test client.
+ # See flask.testing for how this works.
+ self.auto_pop(exc_value)
+
+ def __repr__(self):
+ return '<%s \'%s\' [%s] of %s>' % (
+ self.__class__.__name__,
+ self.request.url,
+ self.request.method,
+ self.app.name,
+ )
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/flask/ctx.pyc b/Assignments/microblog/flask/lib/python2.7/site-packages/flask/ctx.pyc
new file mode 100644
index 0000000..3bfe37b
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/flask/ctx.pyc differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/flask/debughelpers.py b/Assignments/microblog/flask/lib/python2.7/site-packages/flask/debughelpers.py
new file mode 100644
index 0000000..2f8510f
--- /dev/null
+++ b/Assignments/microblog/flask/lib/python2.7/site-packages/flask/debughelpers.py
@@ -0,0 +1,87 @@
+# -*- coding: utf-8 -*-
+"""
+ flask.debughelpers
+ ~~~~~~~~~~~~~~~~~~
+
+ Various helpers to make the development experience better.
+
+ :copyright: (c) 2011 by Armin Ronacher.
+ :license: BSD, see LICENSE for more details.
+"""
+from ._compat import implements_to_string
+
+
+class UnexpectedUnicodeError(AssertionError, UnicodeError):
+ """Raised in places where we want some better error reporting for
+ unexpected unicode or binary data.
+ """
+
+
+@implements_to_string
+class DebugFilesKeyError(KeyError, AssertionError):
+ """Raised from request.files during debugging. The idea is that it can
+ provide a better error message than just a generic KeyError/BadRequest.
+ """
+
+ def __init__(self, request, key):
+ form_matches = request.form.getlist(key)
+ buf = ['You tried to access the file "%s" in the request.files '
+ 'dictionary but it does not exist. The mimetype for the request '
+ 'is "%s" instead of "multipart/form-data" which means that no '
+ 'file contents were transmitted. To fix this error you should '
+ 'provide enctype="multipart/form-data" in your form.' %
+ (key, request.mimetype)]
+ if form_matches:
+ buf.append('\n\nThe browser instead transmitted some file names. '
+ 'This was submitted: %s' % ', '.join('"%s"' % x
+ for x in form_matches))
+ self.msg = ''.join(buf)
+
+ def __str__(self):
+ return self.msg
+
+
+class FormDataRoutingRedirect(AssertionError):
+ """This exception is raised by Flask in debug mode if it detects a
+ redirect caused by the routing system when the request method is not
+ GET, HEAD or OPTIONS. Reasoning: form data will be dropped.
+ """
+
+ def __init__(self, request):
+ exc = request.routing_exception
+ buf = ['A request was sent to this URL (%s) but a redirect was '
+ 'issued automatically by the routing system to "%s".'
+ % (request.url, exc.new_url)]
+
+ # In case just a slash was appended we can be extra helpful
+ if request.base_url + '/' == exc.new_url.split('?')[0]:
+ buf.append(' The URL was defined with a trailing slash so '
+ 'Flask will automatically redirect to the URL '
+ 'with the trailing slash if it was accessed '
+ 'without one.')
+
+ buf.append(' Make sure to directly send your %s-request to this URL '
+ 'since we can\'t make browsers or HTTP clients redirect '
+ 'with form data reliably or without user interaction.' %
+ request.method)
+ buf.append('\n\nNote: this exception is only raised in debug mode')
+ AssertionError.__init__(self, ''.join(buf).encode('utf-8'))
+
+
+def attach_enctype_error_multidict(request):
+ """Since Flask 0.8 we're monkeypatching the files object in case a
+ request is detected that does not use multipart form data but the files
+ object is accessed.
+ """
+ oldcls = request.files.__class__
+ class newcls(oldcls):
+ def __getitem__(self, key):
+ try:
+ return oldcls.__getitem__(self, key)
+ except KeyError as e:
+ if key not in request.form:
+ raise
+ raise DebugFilesKeyError(request, key)
+ newcls.__name__ = oldcls.__name__
+ newcls.__module__ = oldcls.__module__
+ request.files.__class__ = newcls
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/flask/debughelpers.pyc b/Assignments/microblog/flask/lib/python2.7/site-packages/flask/debughelpers.pyc
new file mode 100644
index 0000000..8ee88ae
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/flask/debughelpers.pyc differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/flask/ext/__init__.py b/Assignments/microblog/flask/lib/python2.7/site-packages/flask/ext/__init__.py
new file mode 100644
index 0000000..f29958a
--- /dev/null
+++ b/Assignments/microblog/flask/lib/python2.7/site-packages/flask/ext/__init__.py
@@ -0,0 +1,29 @@
+# -*- coding: utf-8 -*-
+"""
+ flask.ext
+ ~~~~~~~~~
+
+ Redirect imports for extensions. This module basically makes it possible
+ for us to transition from flaskext.foo to flask_foo without having to
+ force all extensions to upgrade at the same time.
+
+ When a user does ``from flask.ext.foo import bar`` it will attempt to
+ import ``from flask_foo import bar`` first and when that fails it will
+ try to import ``from flaskext.foo import bar``.
+
+ We're switching from namespace packages because it was just too painful for
+ everybody involved.
+
+ :copyright: (c) 2011 by Armin Ronacher.
+ :license: BSD, see LICENSE for more details.
+"""
+
+
+def setup():
+ from ..exthook import ExtensionImporter
+ importer = ExtensionImporter(['flask_%s', 'flaskext.%s'], __name__)
+ importer.install()
+
+
+setup()
+del setup
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/flask/ext/__init__.pyc b/Assignments/microblog/flask/lib/python2.7/site-packages/flask/ext/__init__.pyc
new file mode 100644
index 0000000..7a320a8
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/flask/ext/__init__.pyc differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/flask/exthook.py b/Assignments/microblog/flask/lib/python2.7/site-packages/flask/exthook.py
new file mode 100644
index 0000000..d0d814c
--- /dev/null
+++ b/Assignments/microblog/flask/lib/python2.7/site-packages/flask/exthook.py
@@ -0,0 +1,120 @@
+# -*- coding: utf-8 -*-
+"""
+ flask.exthook
+ ~~~~~~~~~~~~~
+
+ Redirect imports for extensions. This module basically makes it possible
+ for us to transition from flaskext.foo to flask_foo without having to
+ force all extensions to upgrade at the same time.
+
+ When a user does ``from flask.ext.foo import bar`` it will attempt to
+ import ``from flask_foo import bar`` first and when that fails it will
+ try to import ``from flaskext.foo import bar``.
+
+ We're switching from namespace packages because it was just too painful for
+ everybody involved.
+
+ This is used by `flask.ext`.
+
+ :copyright: (c) 2011 by Armin Ronacher.
+ :license: BSD, see LICENSE for more details.
+"""
+import sys
+import os
+from ._compat import reraise
+
+
+class ExtensionImporter(object):
+ """This importer redirects imports from this submodule to other locations.
+ This makes it possible to transition from the old flaskext.name to the
+ newer flask_name without people having a hard time.
+ """
+
+ def __init__(self, module_choices, wrapper_module):
+ self.module_choices = module_choices
+ self.wrapper_module = wrapper_module
+ self.prefix = wrapper_module + '.'
+ self.prefix_cutoff = wrapper_module.count('.') + 1
+
+ def __eq__(self, other):
+ return self.__class__.__module__ == other.__class__.__module__ and \
+ self.__class__.__name__ == other.__class__.__name__ and \
+ self.wrapper_module == other.wrapper_module and \
+ self.module_choices == other.module_choices
+
+ def __ne__(self, other):
+ return not self.__eq__(other)
+
+ def install(self):
+ sys.meta_path[:] = [x for x in sys.meta_path if self != x] + [self]
+
+ def find_module(self, fullname, path=None):
+ if fullname.startswith(self.prefix):
+ return self
+
+ def load_module(self, fullname):
+ if fullname in sys.modules:
+ return sys.modules[fullname]
+ modname = fullname.split('.', self.prefix_cutoff)[self.prefix_cutoff]
+ for path in self.module_choices:
+ realname = path % modname
+ try:
+ __import__(realname)
+ except ImportError:
+ exc_type, exc_value, tb = sys.exc_info()
+ # since we only establish the entry in sys.modules at the
+ # very this seems to be redundant, but if recursive imports
+ # happen we will call into the move import a second time.
+ # On the second invocation we still don't have an entry for
+ # fullname in sys.modules, but we will end up with the same
+ # fake module name and that import will succeed since this
+ # one already has a temporary entry in the modules dict.
+ # Since this one "succeeded" temporarily that second
+ # invocation now will have created a fullname entry in
+ # sys.modules which we have to kill.
+ sys.modules.pop(fullname, None)
+
+ # If it's an important traceback we reraise it, otherwise
+ # we swallow it and try the next choice. The skipped frame
+ # is the one from __import__ above which we don't care about
+ if self.is_important_traceback(realname, tb):
+ reraise(exc_type, exc_value, tb.tb_next)
+ continue
+ module = sys.modules[fullname] = sys.modules[realname]
+ if '.' not in modname:
+ setattr(sys.modules[self.wrapper_module], modname, module)
+ return module
+ raise ImportError('No module named %s' % fullname)
+
+ def is_important_traceback(self, important_module, tb):
+ """Walks a traceback's frames and checks if any of the frames
+ originated in the given important module. If that is the case then we
+ were able to import the module itself but apparently something went
+ wrong when the module was imported. (Eg: import of an import failed).
+ """
+ while tb is not None:
+ if self.is_important_frame(important_module, tb):
+ return True
+ tb = tb.tb_next
+ return False
+
+ def is_important_frame(self, important_module, tb):
+ """Checks a single frame if it's important."""
+ g = tb.tb_frame.f_globals
+ if '__name__' not in g:
+ return False
+
+ module_name = g['__name__']
+
+ # Python 2.7 Behavior. Modules are cleaned up late so the
+ # name shows up properly here. Success!
+ if module_name == important_module:
+ return True
+
+ # Some python versions will will clean up modules so early that the
+ # module name at that point is no longer set. Try guessing from
+ # the filename then.
+ filename = os.path.abspath(tb.tb_frame.f_code.co_filename)
+ test_string = os.path.sep + important_module.replace('.', os.path.sep)
+ return test_string + '.py' in filename or \
+ test_string + os.path.sep + '__init__.py' in filename
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/flask/exthook.pyc b/Assignments/microblog/flask/lib/python2.7/site-packages/flask/exthook.pyc
new file mode 100644
index 0000000..d667389
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/flask/exthook.pyc differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/flask/globals.py b/Assignments/microblog/flask/lib/python2.7/site-packages/flask/globals.py
new file mode 100644
index 0000000..67d41f5
--- /dev/null
+++ b/Assignments/microblog/flask/lib/python2.7/site-packages/flask/globals.py
@@ -0,0 +1,44 @@
+# -*- coding: utf-8 -*-
+"""
+ flask.globals
+ ~~~~~~~~~~~~~
+
+ Defines all the global objects that are proxies to the current
+ active context.
+
+ :copyright: (c) 2011 by Armin Ronacher.
+ :license: BSD, see LICENSE for more details.
+"""
+
+from functools import partial
+from werkzeug.local import LocalStack, LocalProxy
+
+
+def _lookup_req_object(name):
+ top = _request_ctx_stack.top
+ if top is None:
+ raise RuntimeError('working outside of request context')
+ return getattr(top, name)
+
+
+def _lookup_app_object(name):
+ top = _app_ctx_stack.top
+ if top is None:
+ raise RuntimeError('working outside of application context')
+ return getattr(top, name)
+
+
+def _find_app():
+ top = _app_ctx_stack.top
+ if top is None:
+ raise RuntimeError('working outside of application context')
+ return top.app
+
+
+# context locals
+_request_ctx_stack = LocalStack()
+_app_ctx_stack = LocalStack()
+current_app = LocalProxy(_find_app)
+request = LocalProxy(partial(_lookup_req_object, 'request'))
+session = LocalProxy(partial(_lookup_req_object, 'session'))
+g = LocalProxy(partial(_lookup_app_object, 'g'))
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/flask/globals.pyc b/Assignments/microblog/flask/lib/python2.7/site-packages/flask/globals.pyc
new file mode 100644
index 0000000..54b20b0
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/flask/globals.pyc differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/flask/helpers.py b/Assignments/microblog/flask/lib/python2.7/site-packages/flask/helpers.py
new file mode 100644
index 0000000..1e7c87f
--- /dev/null
+++ b/Assignments/microblog/flask/lib/python2.7/site-packages/flask/helpers.py
@@ -0,0 +1,849 @@
+# -*- coding: utf-8 -*-
+"""
+ flask.helpers
+ ~~~~~~~~~~~~~
+
+ Implements various helpers.
+
+ :copyright: (c) 2011 by Armin Ronacher.
+ :license: BSD, see LICENSE for more details.
+"""
+
+import os
+import sys
+import pkgutil
+import posixpath
+import mimetypes
+from time import time
+from zlib import adler32
+from threading import RLock
+from werkzeug.routing import BuildError
+from functools import update_wrapper
+
+try:
+ from werkzeug.urls import url_quote
+except ImportError:
+ from urlparse import quote as url_quote
+
+from werkzeug.datastructures import Headers
+from werkzeug.exceptions import NotFound
+
+# this was moved in 0.7
+try:
+ from werkzeug.wsgi import wrap_file
+except ImportError:
+ from werkzeug.utils import wrap_file
+
+from jinja2 import FileSystemLoader
+
+from .signals import message_flashed
+from .globals import session, _request_ctx_stack, _app_ctx_stack, \
+ current_app, request
+from ._compat import string_types, text_type
+
+
+# sentinel
+_missing = object()
+
+
+# what separators does this operating system provide that are not a slash?
+# this is used by the send_from_directory function to ensure that nobody is
+# able to access files from outside the filesystem.
+_os_alt_seps = list(sep for sep in [os.path.sep, os.path.altsep]
+ if sep not in (None, '/'))
+
+
+def _endpoint_from_view_func(view_func):
+ """Internal helper that returns the default endpoint for a given
+ function. This always is the function name.
+ """
+ assert view_func is not None, 'expected view func if endpoint ' \
+ 'is not provided.'
+ return view_func.__name__
+
+
+def stream_with_context(generator_or_function):
+ """Request contexts disappear when the response is started on the server.
+ This is done for efficiency reasons and to make it less likely to encounter
+ memory leaks with badly written WSGI middlewares. The downside is that if
+ you are using streamed responses, the generator cannot access request bound
+ information any more.
+
+ This function however can help you keep the context around for longer::
+
+ from flask import stream_with_context, request, Response
+
+ @app.route('/stream')
+ def streamed_response():
+ @stream_with_context
+ def generate():
+ yield 'Hello '
+ yield request.args['name']
+ yield '!'
+ return Response(generate())
+
+ Alternatively it can also be used around a specific generator::
+
+ from flask import stream_with_context, request, Response
+
+ @app.route('/stream')
+ def streamed_response():
+ def generate():
+ yield 'Hello '
+ yield request.args['name']
+ yield '!'
+ return Response(stream_with_context(generate()))
+
+ .. versionadded:: 0.9
+ """
+ try:
+ gen = iter(generator_or_function)
+ except TypeError:
+ def decorator(*args, **kwargs):
+ gen = generator_or_function()
+ return stream_with_context(gen)
+ return update_wrapper(decorator, generator_or_function)
+
+ def generator():
+ ctx = _request_ctx_stack.top
+ if ctx is None:
+ raise RuntimeError('Attempted to stream with context but '
+ 'there was no context in the first place to keep around.')
+ with ctx:
+ # Dummy sentinel. Has to be inside the context block or we're
+ # not actually keeping the context around.
+ yield None
+
+ # The try/finally is here so that if someone passes a WSGI level
+ # iterator in we're still running the cleanup logic. Generators
+ # don't need that because they are closed on their destruction
+ # automatically.
+ try:
+ for item in gen:
+ yield item
+ finally:
+ if hasattr(gen, 'close'):
+ gen.close()
+
+ # The trick is to start the generator. Then the code execution runs until
+ # the first dummy None is yielded at which point the context was already
+ # pushed. This item is discarded. Then when the iteration continues the
+ # real generator is executed.
+ wrapped_g = generator()
+ next(wrapped_g)
+ return wrapped_g
+
+
+def make_response(*args):
+ """Sometimes it is necessary to set additional headers in a view. Because
+ views do not have to return response objects but can return a value that
+ is converted into a response object by Flask itself, it becomes tricky to
+ add headers to it. This function can be called instead of using a return
+ and you will get a response object which you can use to attach headers.
+
+ If view looked like this and you want to add a new header::
+
+ def index():
+ return render_template('index.html', foo=42)
+
+ You can now do something like this::
+
+ def index():
+ response = make_response(render_template('index.html', foo=42))
+ response.headers['X-Parachutes'] = 'parachutes are cool'
+ return response
+
+ This function accepts the very same arguments you can return from a
+ view function. This for example creates a response with a 404 error
+ code::
+
+ response = make_response(render_template('not_found.html'), 404)
+
+ The other use case of this function is to force the return value of a
+ view function into a response which is helpful with view
+ decorators::
+
+ response = make_response(view_function())
+ response.headers['X-Parachutes'] = 'parachutes are cool'
+
+ Internally this function does the following things:
+
+ - if no arguments are passed, it creates a new response argument
+ - if one argument is passed, :meth:`flask.Flask.make_response`
+ is invoked with it.
+ - if more than one argument is passed, the arguments are passed
+ to the :meth:`flask.Flask.make_response` function as tuple.
+
+ .. versionadded:: 0.6
+ """
+ if not args:
+ return current_app.response_class()
+ if len(args) == 1:
+ args = args[0]
+ return current_app.make_response(args)
+
+
+def url_for(endpoint, **values):
+ """Generates a URL to the given endpoint with the method provided.
+
+ Variable arguments that are unknown to the target endpoint are appended
+ to the generated URL as query arguments. If the value of a query argument
+ is `None`, the whole pair is skipped. In case blueprints are active
+ you can shortcut references to the same blueprint by prefixing the
+ local endpoint with a dot (``.``).
+
+ This will reference the index function local to the current blueprint::
+
+ url_for('.index')
+
+ For more information, head over to the :ref:`Quickstart `.
+
+ To integrate applications, :class:`Flask` has a hook to intercept URL build
+ errors through :attr:`Flask.build_error_handler`. The `url_for` function
+ results in a :exc:`~werkzeug.routing.BuildError` when the current app does
+ not have a URL for the given endpoint and values. When it does, the
+ :data:`~flask.current_app` calls its :attr:`~Flask.build_error_handler` if
+ it is not `None`, which can return a string to use as the result of
+ `url_for` (instead of `url_for`'s default to raise the
+ :exc:`~werkzeug.routing.BuildError` exception) or re-raise the exception.
+ An example::
+
+ def external_url_handler(error, endpoint, **values):
+ "Looks up an external URL when `url_for` cannot build a URL."
+ # This is an example of hooking the build_error_handler.
+ # Here, lookup_url is some utility function you've built
+ # which looks up the endpoint in some external URL registry.
+ url = lookup_url(endpoint, **values)
+ if url is None:
+ # External lookup did not have a URL.
+ # Re-raise the BuildError, in context of original traceback.
+ exc_type, exc_value, tb = sys.exc_info()
+ if exc_value is error:
+ raise exc_type, exc_value, tb
+ else:
+ raise error
+ # url_for will use this result, instead of raising BuildError.
+ return url
+
+ app.build_error_handler = external_url_handler
+
+ Here, `error` is the instance of :exc:`~werkzeug.routing.BuildError`, and
+ `endpoint` and `**values` are the arguments passed into `url_for`. Note
+ that this is for building URLs outside the current application, and not for
+ handling 404 NotFound errors.
+
+ .. versionadded:: 0.10
+ The `_scheme` parameter was added.
+
+ .. versionadded:: 0.9
+ The `_anchor` and `_method` parameters were added.
+
+ .. versionadded:: 0.9
+ Calls :meth:`Flask.handle_build_error` on
+ :exc:`~werkzeug.routing.BuildError`.
+
+ :param endpoint: the endpoint of the URL (name of the function)
+ :param values: the variable arguments of the URL rule
+ :param _external: if set to `True`, an absolute URL is generated. Server
+ address can be changed via `SERVER_NAME` configuration variable which
+ defaults to `localhost`.
+ :param _scheme: a string specifying the desired URL scheme. The `_external`
+ parameter must be set to `True` or a `ValueError` is raised.
+ :param _anchor: if provided this is added as anchor to the URL.
+ :param _method: if provided this explicitly specifies an HTTP method.
+ """
+ appctx = _app_ctx_stack.top
+ reqctx = _request_ctx_stack.top
+ if appctx is None:
+ raise RuntimeError('Attempted to generate a URL without the '
+ 'application context being pushed. This has to be '
+ 'executed when application context is available.')
+
+ # If request specific information is available we have some extra
+ # features that support "relative" urls.
+ if reqctx is not None:
+ url_adapter = reqctx.url_adapter
+ blueprint_name = request.blueprint
+ if not reqctx.request._is_old_module:
+ if endpoint[:1] == '.':
+ if blueprint_name is not None:
+ endpoint = blueprint_name + endpoint
+ else:
+ endpoint = endpoint[1:]
+ else:
+ # TODO: get rid of this deprecated functionality in 1.0
+ if '.' not in endpoint:
+ if blueprint_name is not None:
+ endpoint = blueprint_name + '.' + endpoint
+ elif endpoint.startswith('.'):
+ endpoint = endpoint[1:]
+ external = values.pop('_external', False)
+
+ # Otherwise go with the url adapter from the appctx and make
+ # the urls external by default.
+ else:
+ url_adapter = appctx.url_adapter
+ if url_adapter is None:
+ raise RuntimeError('Application was not able to create a URL '
+ 'adapter for request independent URL generation. '
+ 'You might be able to fix this by setting '
+ 'the SERVER_NAME config variable.')
+ external = values.pop('_external', True)
+
+ anchor = values.pop('_anchor', None)
+ method = values.pop('_method', None)
+ scheme = values.pop('_scheme', None)
+ appctx.app.inject_url_defaults(endpoint, values)
+
+ if scheme is not None:
+ if not external:
+ raise ValueError('When specifying _scheme, _external must be True')
+ url_adapter.url_scheme = scheme
+
+ try:
+ rv = url_adapter.build(endpoint, values, method=method,
+ force_external=external)
+ except BuildError as error:
+ # We need to inject the values again so that the app callback can
+ # deal with that sort of stuff.
+ values['_external'] = external
+ values['_anchor'] = anchor
+ values['_method'] = method
+ return appctx.app.handle_url_build_error(error, endpoint, values)
+
+ if anchor is not None:
+ rv += '#' + url_quote(anchor)
+ return rv
+
+
+def get_template_attribute(template_name, attribute):
+ """Loads a macro (or variable) a template exports. This can be used to
+ invoke a macro from within Python code. If you for example have a
+ template named `_cider.html` with the following contents:
+
+ .. sourcecode:: html+jinja
+
+ {% macro hello(name) %}Hello {{ name }}!{% endmacro %}
+
+ You can access this from Python code like this::
+
+ hello = get_template_attribute('_cider.html', 'hello')
+ return hello('World')
+
+ .. versionadded:: 0.2
+
+ :param template_name: the name of the template
+ :param attribute: the name of the variable of macro to access
+ """
+ return getattr(current_app.jinja_env.get_template(template_name).module,
+ attribute)
+
+
+def flash(message, category='message'):
+ """Flashes a message to the next request. In order to remove the
+ flashed message from the session and to display it to the user,
+ the template has to call :func:`get_flashed_messages`.
+
+ .. versionchanged:: 0.3
+ `category` parameter added.
+
+ :param message: the message to be flashed.
+ :param category: the category for the message. The following values
+ are recommended: ``'message'`` for any kind of message,
+ ``'error'`` for errors, ``'info'`` for information
+ messages and ``'warning'`` for warnings. However any
+ kind of string can be used as category.
+ """
+ # Original implementation:
+ #
+ # session.setdefault('_flashes', []).append((category, message))
+ #
+ # This assumed that changes made to mutable structures in the session are
+ # are always in sync with the sess on object, which is not true for session
+ # implementations that use external storage for keeping their keys/values.
+ flashes = session.get('_flashes', [])
+ flashes.append((category, message))
+ session['_flashes'] = flashes
+ message_flashed.send(current_app._get_current_object(),
+ message=message, category=category)
+
+
+def get_flashed_messages(with_categories=False, category_filter=[]):
+ """Pulls all flashed messages from the session and returns them.
+ Further calls in the same request to the function will return
+ the same messages. By default just the messages are returned,
+ but when `with_categories` is set to `True`, the return value will
+ be a list of tuples in the form ``(category, message)`` instead.
+
+ Filter the flashed messages to one or more categories by providing those
+ categories in `category_filter`. This allows rendering categories in
+ separate html blocks. The `with_categories` and `category_filter`
+ arguments are distinct:
+
+ * `with_categories` controls whether categories are returned with message
+ text (`True` gives a tuple, where `False` gives just the message text).
+ * `category_filter` filters the messages down to only those matching the
+ provided categories.
+
+ See :ref:`message-flashing-pattern` for examples.
+
+ .. versionchanged:: 0.3
+ `with_categories` parameter added.
+
+ .. versionchanged:: 0.9
+ `category_filter` parameter added.
+
+ :param with_categories: set to `True` to also receive categories.
+ :param category_filter: whitelist of categories to limit return values
+ """
+ flashes = _request_ctx_stack.top.flashes
+ if flashes is None:
+ _request_ctx_stack.top.flashes = flashes = session.pop('_flashes') \
+ if '_flashes' in session else []
+ if category_filter:
+ flashes = list(filter(lambda f: f[0] in category_filter, flashes))
+ if not with_categories:
+ return [x[1] for x in flashes]
+ return flashes
+
+
+def send_file(filename_or_fp, mimetype=None, as_attachment=False,
+ attachment_filename=None, add_etags=True,
+ cache_timeout=None, conditional=False):
+ """Sends the contents of a file to the client. This will use the
+ most efficient method available and configured. By default it will
+ try to use the WSGI server's file_wrapper support. Alternatively
+ you can set the application's :attr:`~Flask.use_x_sendfile` attribute
+ to ``True`` to directly emit an `X-Sendfile` header. This however
+ requires support of the underlying webserver for `X-Sendfile`.
+
+ By default it will try to guess the mimetype for you, but you can
+ also explicitly provide one. For extra security you probably want
+ to send certain files as attachment (HTML for instance). The mimetype
+ guessing requires a `filename` or an `attachment_filename` to be
+ provided.
+
+ Please never pass filenames to this function from user sources without
+ checking them first. Something like this is usually sufficient to
+ avoid security problems::
+
+ if '..' in filename or filename.startswith('/'):
+ abort(404)
+
+ .. versionadded:: 0.2
+
+ .. versionadded:: 0.5
+ The `add_etags`, `cache_timeout` and `conditional` parameters were
+ added. The default behavior is now to attach etags.
+
+ .. versionchanged:: 0.7
+ mimetype guessing and etag support for file objects was
+ deprecated because it was unreliable. Pass a filename if you are
+ able to, otherwise attach an etag yourself. This functionality
+ will be removed in Flask 1.0
+
+ .. versionchanged:: 0.9
+ cache_timeout pulls its default from application config, when None.
+
+ :param filename_or_fp: the filename of the file to send. This is
+ relative to the :attr:`~Flask.root_path` if a
+ relative path is specified.
+ Alternatively a file object might be provided
+ in which case `X-Sendfile` might not work and
+ fall back to the traditional method. Make sure
+ that the file pointer is positioned at the start
+ of data to send before calling :func:`send_file`.
+ :param mimetype: the mimetype of the file if provided, otherwise
+ auto detection happens.
+ :param as_attachment: set to `True` if you want to send this file with
+ a ``Content-Disposition: attachment`` header.
+ :param attachment_filename: the filename for the attachment if it
+ differs from the file's filename.
+ :param add_etags: set to `False` to disable attaching of etags.
+ :param conditional: set to `True` to enable conditional responses.
+
+ :param cache_timeout: the timeout in seconds for the headers. When `None`
+ (default), this value is set by
+ :meth:`~Flask.get_send_file_max_age` of
+ :data:`~flask.current_app`.
+ """
+ mtime = None
+ if isinstance(filename_or_fp, string_types):
+ filename = filename_or_fp
+ file = None
+ else:
+ from warnings import warn
+ file = filename_or_fp
+ filename = getattr(file, 'name', None)
+
+ # XXX: this behavior is now deprecated because it was unreliable.
+ # removed in Flask 1.0
+ if not attachment_filename and not mimetype \
+ and isinstance(filename, string_types):
+ warn(DeprecationWarning('The filename support for file objects '
+ 'passed to send_file is now deprecated. Pass an '
+ 'attach_filename if you want mimetypes to be guessed.'),
+ stacklevel=2)
+ if add_etags:
+ warn(DeprecationWarning('In future flask releases etags will no '
+ 'longer be generated for file objects passed to the send_file '
+ 'function because this behavior was unreliable. Pass '
+ 'filenames instead if possible, otherwise attach an etag '
+ 'yourself based on another value'), stacklevel=2)
+
+ if filename is not None:
+ if not os.path.isabs(filename):
+ filename = os.path.join(current_app.root_path, filename)
+ if mimetype is None and (filename or attachment_filename):
+ mimetype = mimetypes.guess_type(filename or attachment_filename)[0]
+ if mimetype is None:
+ mimetype = 'application/octet-stream'
+
+ headers = Headers()
+ if as_attachment:
+ if attachment_filename is None:
+ if filename is None:
+ raise TypeError('filename unavailable, required for '
+ 'sending as attachment')
+ attachment_filename = os.path.basename(filename)
+ headers.add('Content-Disposition', 'attachment',
+ filename=attachment_filename)
+
+ if current_app.use_x_sendfile and filename:
+ if file is not None:
+ file.close()
+ headers['X-Sendfile'] = filename
+ headers['Content-Length'] = os.path.getsize(filename)
+ data = None
+ else:
+ if file is None:
+ file = open(filename, 'rb')
+ mtime = os.path.getmtime(filename)
+ headers['Content-Length'] = os.path.getsize(filename)
+ data = wrap_file(request.environ, file)
+
+ rv = current_app.response_class(data, mimetype=mimetype, headers=headers,
+ direct_passthrough=True)
+
+ # if we know the file modification date, we can store it as the
+ # the time of the last modification.
+ if mtime is not None:
+ rv.last_modified = int(mtime)
+
+ rv.cache_control.public = True
+ if cache_timeout is None:
+ cache_timeout = current_app.get_send_file_max_age(filename)
+ if cache_timeout is not None:
+ rv.cache_control.max_age = cache_timeout
+ rv.expires = int(time() + cache_timeout)
+
+ if add_etags and filename is not None:
+ rv.set_etag('flask-%s-%s-%s' % (
+ os.path.getmtime(filename),
+ os.path.getsize(filename),
+ adler32(
+ filename.encode('utf-8') if isinstance(filename, text_type)
+ else filename
+ ) & 0xffffffff
+ ))
+ if conditional:
+ rv = rv.make_conditional(request)
+ # make sure we don't send x-sendfile for servers that
+ # ignore the 304 status code for x-sendfile.
+ if rv.status_code == 304:
+ rv.headers.pop('x-sendfile', None)
+ return rv
+
+
+def safe_join(directory, filename):
+ """Safely join `directory` and `filename`.
+
+ Example usage::
+
+ @app.route('/wiki/')
+ def wiki_page(filename):
+ filename = safe_join(app.config['WIKI_FOLDER'], filename)
+ with open(filename, 'rb') as fd:
+ content = fd.read() # Read and process the file content...
+
+ :param directory: the base directory.
+ :param filename: the untrusted filename relative to that directory.
+ :raises: :class:`~werkzeug.exceptions.NotFound` if the resulting path
+ would fall out of `directory`.
+ """
+ filename = posixpath.normpath(filename)
+ for sep in _os_alt_seps:
+ if sep in filename:
+ raise NotFound()
+ if os.path.isabs(filename) or \
+ filename == '..' or \
+ filename.startswith('../'):
+ raise NotFound()
+ return os.path.join(directory, filename)
+
+
+def send_from_directory(directory, filename, **options):
+ """Send a file from a given directory with :func:`send_file`. This
+ is a secure way to quickly expose static files from an upload folder
+ or something similar.
+
+ Example usage::
+
+ @app.route('/uploads/')
+ def download_file(filename):
+ return send_from_directory(app.config['UPLOAD_FOLDER'],
+ filename, as_attachment=True)
+
+ .. admonition:: Sending files and Performance
+
+ It is strongly recommended to activate either `X-Sendfile` support in
+ your webserver or (if no authentication happens) to tell the webserver
+ to serve files for the given path on its own without calling into the
+ web application for improved performance.
+
+ .. versionadded:: 0.5
+
+ :param directory: the directory where all the files are stored.
+ :param filename: the filename relative to that directory to
+ download.
+ :param options: optional keyword arguments that are directly
+ forwarded to :func:`send_file`.
+ """
+ filename = safe_join(directory, filename)
+ if not os.path.isfile(filename):
+ raise NotFound()
+ options.setdefault('conditional', True)
+ return send_file(filename, **options)
+
+
+def get_root_path(import_name):
+ """Returns the path to a package or cwd if that cannot be found. This
+ returns the path of a package or the folder that contains a module.
+
+ Not to be confused with the package path returned by :func:`find_package`.
+ """
+ # Module already imported and has a file attribute. Use that first.
+ mod = sys.modules.get(import_name)
+ if mod is not None and hasattr(mod, '__file__'):
+ return os.path.dirname(os.path.abspath(mod.__file__))
+
+ # Next attempt: check the loader.
+ loader = pkgutil.get_loader(import_name)
+
+ # Loader does not exist or we're referring to an unloaded main module
+ # or a main module without path (interactive sessions), go with the
+ # current working directory.
+ if loader is None or import_name == '__main__':
+ return os.getcwd()
+
+ # For .egg, zipimporter does not have get_filename until Python 2.7.
+ # Some other loaders might exhibit the same behavior.
+ if hasattr(loader, 'get_filename'):
+ filepath = loader.get_filename(import_name)
+ else:
+ # Fall back to imports.
+ __import__(import_name)
+ filepath = sys.modules[import_name].__file__
+
+ # filepath is import_name.py for a module, or __init__.py for a package.
+ return os.path.dirname(os.path.abspath(filepath))
+
+
+def find_package(import_name):
+ """Finds a package and returns the prefix (or None if the package is
+ not installed) as well as the folder that contains the package or
+ module as a tuple. The package path returned is the module that would
+ have to be added to the pythonpath in order to make it possible to
+ import the module. The prefix is the path below which a UNIX like
+ folder structure exists (lib, share etc.).
+ """
+ root_mod_name = import_name.split('.')[0]
+ loader = pkgutil.get_loader(root_mod_name)
+ if loader is None or import_name == '__main__':
+ # import name is not found, or interactive/main module
+ package_path = os.getcwd()
+ else:
+ # For .egg, zipimporter does not have get_filename until Python 2.7.
+ if hasattr(loader, 'get_filename'):
+ filename = loader.get_filename(root_mod_name)
+ elif hasattr(loader, 'archive'):
+ # zipimporter's loader.archive points to the .egg or .zip
+ # archive filename is dropped in call to dirname below.
+ filename = loader.archive
+ else:
+ # At least one loader is missing both get_filename and archive:
+ # Google App Engine's HardenedModulesHook
+ #
+ # Fall back to imports.
+ __import__(import_name)
+ filename = sys.modules[import_name].__file__
+ package_path = os.path.abspath(os.path.dirname(filename))
+ # package_path ends with __init__.py for a package
+ if loader.is_package(root_mod_name):
+ package_path = os.path.dirname(package_path)
+
+ site_parent, site_folder = os.path.split(package_path)
+ py_prefix = os.path.abspath(sys.prefix)
+ if package_path.startswith(py_prefix):
+ return py_prefix, package_path
+ elif site_folder.lower() == 'site-packages':
+ parent, folder = os.path.split(site_parent)
+ # Windows like installations
+ if folder.lower() == 'lib':
+ base_dir = parent
+ # UNIX like installations
+ elif os.path.basename(parent).lower() == 'lib':
+ base_dir = os.path.dirname(parent)
+ else:
+ base_dir = site_parent
+ return base_dir, package_path
+ return None, package_path
+
+
+class locked_cached_property(object):
+ """A decorator that converts a function into a lazy property. The
+ function wrapped is called the first time to retrieve the result
+ and then that calculated result is used the next time you access
+ the value. Works like the one in Werkzeug but has a lock for
+ thread safety.
+ """
+
+ def __init__(self, func, name=None, doc=None):
+ self.__name__ = name or func.__name__
+ self.__module__ = func.__module__
+ self.__doc__ = doc or func.__doc__
+ self.func = func
+ self.lock = RLock()
+
+ def __get__(self, obj, type=None):
+ if obj is None:
+ return self
+ with self.lock:
+ value = obj.__dict__.get(self.__name__, _missing)
+ if value is _missing:
+ value = self.func(obj)
+ obj.__dict__[self.__name__] = value
+ return value
+
+
+class _PackageBoundObject(object):
+
+ def __init__(self, import_name, template_folder=None):
+ #: The name of the package or module. Do not change this once
+ #: it was set by the constructor.
+ self.import_name = import_name
+
+ #: location of the templates. `None` if templates should not be
+ #: exposed.
+ self.template_folder = template_folder
+
+ #: Where is the app root located?
+ self.root_path = get_root_path(self.import_name)
+
+ self._static_folder = None
+ self._static_url_path = None
+
+ def _get_static_folder(self):
+ if self._static_folder is not None:
+ return os.path.join(self.root_path, self._static_folder)
+ def _set_static_folder(self, value):
+ self._static_folder = value
+ static_folder = property(_get_static_folder, _set_static_folder)
+ del _get_static_folder, _set_static_folder
+
+ def _get_static_url_path(self):
+ if self._static_url_path is None:
+ if self.static_folder is None:
+ return None
+ return '/' + os.path.basename(self.static_folder)
+ return self._static_url_path
+ def _set_static_url_path(self, value):
+ self._static_url_path = value
+ static_url_path = property(_get_static_url_path, _set_static_url_path)
+ del _get_static_url_path, _set_static_url_path
+
+ @property
+ def has_static_folder(self):
+ """This is `True` if the package bound object's container has a
+ folder named ``'static'``.
+
+ .. versionadded:: 0.5
+ """
+ return self.static_folder is not None
+
+ @locked_cached_property
+ def jinja_loader(self):
+ """The Jinja loader for this package bound object.
+
+ .. versionadded:: 0.5
+ """
+ if self.template_folder is not None:
+ return FileSystemLoader(os.path.join(self.root_path,
+ self.template_folder))
+
+ def get_send_file_max_age(self, filename):
+ """Provides default cache_timeout for the :func:`send_file` functions.
+
+ By default, this function returns ``SEND_FILE_MAX_AGE_DEFAULT`` from
+ the configuration of :data:`~flask.current_app`.
+
+ Static file functions such as :func:`send_from_directory` use this
+ function, and :func:`send_file` calls this function on
+ :data:`~flask.current_app` when the given cache_timeout is `None`. If a
+ cache_timeout is given in :func:`send_file`, that timeout is used;
+ otherwise, this method is called.
+
+ This allows subclasses to change the behavior when sending files based
+ on the filename. For example, to set the cache timeout for .js files
+ to 60 seconds::
+
+ class MyFlask(flask.Flask):
+ def get_send_file_max_age(self, name):
+ if name.lower().endswith('.js'):
+ return 60
+ return flask.Flask.get_send_file_max_age(self, name)
+
+ .. versionadded:: 0.9
+ """
+ return current_app.config['SEND_FILE_MAX_AGE_DEFAULT']
+
+ def send_static_file(self, filename):
+ """Function used internally to send static files from the static
+ folder to the browser.
+
+ .. versionadded:: 0.5
+ """
+ if not self.has_static_folder:
+ raise RuntimeError('No static folder for this object')
+ # Ensure get_send_file_max_age is called in all cases.
+ # Here, we ensure get_send_file_max_age is called for Blueprints.
+ cache_timeout = self.get_send_file_max_age(filename)
+ return send_from_directory(self.static_folder, filename,
+ cache_timeout=cache_timeout)
+
+ def open_resource(self, resource, mode='rb'):
+ """Opens a resource from the application's resource folder. To see
+ how this works, consider the following folder structure::
+
+ /myapplication.py
+ /schema.sql
+ /static
+ /style.css
+ /templates
+ /layout.html
+ /index.html
+
+ If you want to open the `schema.sql` file you would do the
+ following::
+
+ with app.open_resource('schema.sql') as f:
+ contents = f.read()
+ do_something_with(contents)
+
+ :param resource: the name of the resource. To access resources within
+ subfolders use forward slashes as separator.
+ :param mode: resource file opening mode, default is 'rb'.
+ """
+ if mode not in ('r', 'rb'):
+ raise ValueError('Resources can only be opened for reading')
+ return open(os.path.join(self.root_path, resource), mode)
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/flask/helpers.pyc b/Assignments/microblog/flask/lib/python2.7/site-packages/flask/helpers.pyc
new file mode 100644
index 0000000..952fa38
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/flask/helpers.pyc differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/flask/json.py b/Assignments/microblog/flask/lib/python2.7/site-packages/flask/json.py
new file mode 100644
index 0000000..45ba324
--- /dev/null
+++ b/Assignments/microblog/flask/lib/python2.7/site-packages/flask/json.py
@@ -0,0 +1,243 @@
+# -*- coding: utf-8 -*-
+"""
+ flask.jsonimpl
+ ~~~~~~~~~~~~~~
+
+ Implementation helpers for the JSON support in Flask.
+
+ :copyright: (c) 2012 by Armin Ronacher.
+ :license: BSD, see LICENSE for more details.
+"""
+import io
+import uuid
+from datetime import datetime
+from .globals import current_app, request
+from ._compat import text_type, PY2
+
+from werkzeug.http import http_date
+from jinja2 import Markup
+
+# Use the same json implementation as itsdangerous on which we
+# depend anyways.
+try:
+ from itsdangerous import simplejson as _json
+except ImportError:
+ from itsdangerous import json as _json
+
+
+# figure out if simplejson escapes slashes. This behavior was changed
+# from one version to another without reason.
+_slash_escape = '\\/' not in _json.dumps('/')
+
+
+__all__ = ['dump', 'dumps', 'load', 'loads', 'htmlsafe_dump',
+ 'htmlsafe_dumps', 'JSONDecoder', 'JSONEncoder',
+ 'jsonify']
+
+
+def _wrap_reader_for_text(fp, encoding):
+ if isinstance(fp.read(0), bytes):
+ fp = io.TextIOWrapper(io.BufferedReader(fp), encoding)
+ return fp
+
+
+def _wrap_writer_for_text(fp, encoding):
+ try:
+ fp.write('')
+ except TypeError:
+ fp = io.TextIOWrapper(fp, encoding)
+ return fp
+
+
+class JSONEncoder(_json.JSONEncoder):
+ """The default Flask JSON encoder. This one extends the default simplejson
+ encoder by also supporting ``datetime`` objects, ``UUID`` as well as
+ ``Markup`` objects which are serialized as RFC 822 datetime strings (same
+ as the HTTP date format). In order to support more data types override the
+ :meth:`default` method.
+ """
+
+ def default(self, o):
+ """Implement this method in a subclass such that it returns a
+ serializable object for ``o``, or calls the base implementation (to
+ raise a ``TypeError``).
+
+ For example, to support arbitrary iterators, you could implement
+ default like this::
+
+ def default(self, o):
+ try:
+ iterable = iter(o)
+ except TypeError:
+ pass
+ else:
+ return list(iterable)
+ return JSONEncoder.default(self, o)
+ """
+ if isinstance(o, datetime):
+ return http_date(o)
+ if isinstance(o, uuid.UUID):
+ return str(o)
+ if hasattr(o, '__html__'):
+ return text_type(o.__html__())
+ return _json.JSONEncoder.default(self, o)
+
+
+class JSONDecoder(_json.JSONDecoder):
+ """The default JSON decoder. This one does not change the behavior from
+ the default simplejson encoder. Consult the :mod:`json` documentation
+ for more information. This decoder is not only used for the load
+ functions of this module but also :attr:`~flask.Request`.
+ """
+
+
+def _dump_arg_defaults(kwargs):
+ """Inject default arguments for dump functions."""
+ if current_app:
+ kwargs.setdefault('cls', current_app.json_encoder)
+ if not current_app.config['JSON_AS_ASCII']:
+ kwargs.setdefault('ensure_ascii', False)
+ kwargs.setdefault('sort_keys', current_app.config['JSON_SORT_KEYS'])
+ else:
+ kwargs.setdefault('sort_keys', True)
+ kwargs.setdefault('cls', JSONEncoder)
+
+
+def _load_arg_defaults(kwargs):
+ """Inject default arguments for load functions."""
+ if current_app:
+ kwargs.setdefault('cls', current_app.json_decoder)
+ else:
+ kwargs.setdefault('cls', JSONDecoder)
+
+
+def dumps(obj, **kwargs):
+ """Serialize ``obj`` to a JSON formatted ``str`` by using the application's
+ configured encoder (:attr:`~flask.Flask.json_encoder`) if there is an
+ application on the stack.
+
+ This function can return ``unicode`` strings or ascii-only bytestrings by
+ default which coerce into unicode strings automatically. That behavior by
+ default is controlled by the ``JSON_AS_ASCII`` configuration variable
+ and can be overriden by the simplejson ``ensure_ascii`` parameter.
+ """
+ _dump_arg_defaults(kwargs)
+ encoding = kwargs.pop('encoding', None)
+ rv = _json.dumps(obj, **kwargs)
+ if encoding is not None and isinstance(rv, text_type):
+ rv = rv.encode(encoding)
+ return rv
+
+
+def dump(obj, fp, **kwargs):
+ """Like :func:`dumps` but writes into a file object."""
+ _dump_arg_defaults(kwargs)
+ encoding = kwargs.pop('encoding', None)
+ if encoding is not None:
+ fp = _wrap_writer_for_text(fp, encoding)
+ _json.dump(obj, fp, **kwargs)
+
+
+def loads(s, **kwargs):
+ """Unserialize a JSON object from a string ``s`` by using the application's
+ configured decoder (:attr:`~flask.Flask.json_decoder`) if there is an
+ application on the stack.
+ """
+ _load_arg_defaults(kwargs)
+ if isinstance(s, bytes):
+ s = s.decode(kwargs.pop('encoding', None) or 'utf-8')
+ return _json.loads(s, **kwargs)
+
+
+def load(fp, **kwargs):
+ """Like :func:`loads` but reads from a file object.
+ """
+ _load_arg_defaults(kwargs)
+ if not PY2:
+ fp = _wrap_reader_for_text(fp, kwargs.pop('encoding', None) or 'utf-8')
+ return _json.load(fp, **kwargs)
+
+
+def htmlsafe_dumps(obj, **kwargs):
+ """Works exactly like :func:`dumps` but is safe for use in ``')
+ self.assert_equal(rv, u'"\\u003c/script\\u003e"')
+ self.assert_equal(type(rv), text_type)
+ rv = render('{{ ""|tojson }}')
+ self.assert_equal(rv, '"\\u003c/script\\u003e"')
+ rv = render('{{ "<\0/script>"|tojson }}')
+ self.assert_equal(rv, '"\\u003c\\u0000/script\\u003e"')
+ rv = render('{{ "' % (
+ render_traceback(self, full=full),
+ self.render_as_text().decode('utf-8', 'replace')
+ )
+
+ @property
+ def is_template_syntax_error(self):
+ """`True` if this is a template syntax error."""
+ return isinstance(self.exc_value, TemplateSyntaxError)
+
+ @property
+ def exc_info(self):
+ """Exception info tuple with a proxy around the frame objects."""
+ return self.exc_type, self.exc_value, self.frames[0]
+
+ @property
+ def standard_exc_info(self):
+ """Standard python exc_info for re-raising"""
+ tb = self.frames[0]
+ # the frame will be an actual traceback (or transparent proxy) if
+ # we are on pypy or a python implementation with support for tproxy
+ if type(tb) is not TracebackType:
+ tb = tb.tb
+ return self.exc_type, self.exc_value, tb
+
+
+def make_traceback(exc_info, source_hint=None):
+ """Creates a processed traceback object from the exc_info."""
+ exc_type, exc_value, tb = exc_info
+ if isinstance(exc_value, TemplateSyntaxError):
+ exc_info = translate_syntax_error(exc_value, source_hint)
+ initial_skip = 0
+ else:
+ initial_skip = 1
+ return translate_exception(exc_info, initial_skip)
+
+
+def translate_syntax_error(error, source=None):
+ """Rewrites a syntax error to please traceback systems."""
+ error.source = source
+ error.translated = True
+ exc_info = (error.__class__, error, None)
+ filename = error.filename
+ if filename is None:
+ filename = ''
+ return fake_exc_info(exc_info, filename, error.lineno)
+
+
+def translate_exception(exc_info, initial_skip=0):
+ """If passed an exc_info it will automatically rewrite the exceptions
+ all the way down to the correct line numbers and frames.
+ """
+ tb = exc_info[2]
+ frames = []
+
+ # skip some internal frames if wanted
+ for x in range(initial_skip):
+ if tb is not None:
+ tb = tb.tb_next
+ initial_tb = tb
+
+ while tb is not None:
+ # skip frames decorated with @internalcode. These are internal
+ # calls we can't avoid and that are useless in template debugging
+ # output.
+ if tb.tb_frame.f_code in internal_code:
+ tb = tb.tb_next
+ continue
+
+ # save a reference to the next frame if we override the current
+ # one with a faked one.
+ next = tb.tb_next
+
+ # fake template exceptions
+ template = tb.tb_frame.f_globals.get('__jinja_template__')
+ if template is not None:
+ lineno = template.get_corresponding_lineno(tb.tb_lineno)
+ tb = fake_exc_info(exc_info[:2] + (tb,), template.filename,
+ lineno)[2]
+
+ frames.append(make_frame_proxy(tb))
+ tb = next
+
+ # if we don't have any exceptions in the frames left, we have to
+ # reraise it unchanged.
+ # XXX: can we backup here? when could this happen?
+ if not frames:
+ reraise(exc_info[0], exc_info[1], exc_info[2])
+
+ return ProcessedTraceback(exc_info[0], exc_info[1], frames)
+
+
+def fake_exc_info(exc_info, filename, lineno):
+ """Helper for `translate_exception`."""
+ exc_type, exc_value, tb = exc_info
+
+ # figure the real context out
+ if tb is not None:
+ real_locals = tb.tb_frame.f_locals.copy()
+ ctx = real_locals.get('context')
+ if ctx:
+ locals = ctx.get_all()
+ else:
+ locals = {}
+ for name, value in iteritems(real_locals):
+ if name.startswith('l_') and value is not missing:
+ locals[name[2:]] = value
+
+ # if there is a local called __jinja_exception__, we get
+ # rid of it to not break the debug functionality.
+ locals.pop('__jinja_exception__', None)
+ else:
+ locals = {}
+
+ # assamble fake globals we need
+ globals = {
+ '__name__': filename,
+ '__file__': filename,
+ '__jinja_exception__': exc_info[:2],
+
+ # we don't want to keep the reference to the template around
+ # to not cause circular dependencies, but we mark it as Jinja
+ # frame for the ProcessedTraceback
+ '__jinja_template__': None
+ }
+
+ # and fake the exception
+ code = compile('\n' * (lineno - 1) + raise_helper, filename, 'exec')
+
+ # if it's possible, change the name of the code. This won't work
+ # on some python environments such as google appengine
+ try:
+ if tb is None:
+ location = 'template'
+ else:
+ function = tb.tb_frame.f_code.co_name
+ if function == 'root':
+ location = 'top-level template code'
+ elif function.startswith('block_'):
+ location = 'block "%s"' % function[6:]
+ else:
+ location = 'template'
+
+ if PY2:
+ code = CodeType(0, code.co_nlocals, code.co_stacksize,
+ code.co_flags, code.co_code, code.co_consts,
+ code.co_names, code.co_varnames, filename,
+ location, code.co_firstlineno,
+ code.co_lnotab, (), ())
+ else:
+ code = CodeType(0, code.co_kwonlyargcount,
+ code.co_nlocals, code.co_stacksize,
+ code.co_flags, code.co_code, code.co_consts,
+ code.co_names, code.co_varnames, filename,
+ location, code.co_firstlineno,
+ code.co_lnotab, (), ())
+ except Exception as e:
+ pass
+
+ # execute the code and catch the new traceback
+ try:
+ exec(code, globals, locals)
+ except:
+ exc_info = sys.exc_info()
+ new_tb = exc_info[2].tb_next
+
+ # return without this frame
+ return exc_info[:2] + (new_tb,)
+
+
+def _init_ugly_crap():
+ """This function implements a few ugly things so that we can patch the
+ traceback objects. The function returned allows resetting `tb_next` on
+ any python traceback object. Do not attempt to use this on non cpython
+ interpreters
+ """
+ import ctypes
+ from types import TracebackType
+
+ if PY2:
+ # figure out size of _Py_ssize_t for Python 2:
+ if hasattr(ctypes.pythonapi, 'Py_InitModule4_64'):
+ _Py_ssize_t = ctypes.c_int64
+ else:
+ _Py_ssize_t = ctypes.c_int
+ else:
+ # platform ssize_t on Python 3
+ _Py_ssize_t = ctypes.c_ssize_t
+
+ # regular python
+ class _PyObject(ctypes.Structure):
+ pass
+ _PyObject._fields_ = [
+ ('ob_refcnt', _Py_ssize_t),
+ ('ob_type', ctypes.POINTER(_PyObject))
+ ]
+
+ # python with trace
+ if hasattr(sys, 'getobjects'):
+ class _PyObject(ctypes.Structure):
+ pass
+ _PyObject._fields_ = [
+ ('_ob_next', ctypes.POINTER(_PyObject)),
+ ('_ob_prev', ctypes.POINTER(_PyObject)),
+ ('ob_refcnt', _Py_ssize_t),
+ ('ob_type', ctypes.POINTER(_PyObject))
+ ]
+
+ class _Traceback(_PyObject):
+ pass
+ _Traceback._fields_ = [
+ ('tb_next', ctypes.POINTER(_Traceback)),
+ ('tb_frame', ctypes.POINTER(_PyObject)),
+ ('tb_lasti', ctypes.c_int),
+ ('tb_lineno', ctypes.c_int)
+ ]
+
+ def tb_set_next(tb, next):
+ """Set the tb_next attribute of a traceback object."""
+ if not (isinstance(tb, TracebackType) and
+ (next is None or isinstance(next, TracebackType))):
+ raise TypeError('tb_set_next arguments must be traceback objects')
+ obj = _Traceback.from_address(id(tb))
+ if tb.tb_next is not None:
+ old = _Traceback.from_address(id(tb.tb_next))
+ old.ob_refcnt -= 1
+ if next is None:
+ obj.tb_next = ctypes.POINTER(_Traceback)()
+ else:
+ next = _Traceback.from_address(id(next))
+ next.ob_refcnt += 1
+ obj.tb_next = ctypes.pointer(next)
+
+ return tb_set_next
+
+
+# try to get a tb_set_next implementation if we don't have transparent
+# proxies.
+tb_set_next = None
+if tproxy is None:
+ try:
+ tb_set_next = _init_ugly_crap()
+ except:
+ pass
+ del _init_ugly_crap
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/jinja2/debug.pyc b/Assignments/microblog/flask/lib/python2.7/site-packages/jinja2/debug.pyc
new file mode 100644
index 0000000..d70b188
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/jinja2/debug.pyc differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/jinja2/defaults.py b/Assignments/microblog/flask/lib/python2.7/site-packages/jinja2/defaults.py
new file mode 100644
index 0000000..3717a72
--- /dev/null
+++ b/Assignments/microblog/flask/lib/python2.7/site-packages/jinja2/defaults.py
@@ -0,0 +1,43 @@
+# -*- coding: utf-8 -*-
+"""
+ jinja2.defaults
+ ~~~~~~~~~~~~~~~
+
+ Jinja default filters and tags.
+
+ :copyright: (c) 2010 by the Jinja Team.
+ :license: BSD, see LICENSE for more details.
+"""
+from jinja2._compat import range_type
+from jinja2.utils import generate_lorem_ipsum, Cycler, Joiner
+
+
+# defaults for the parser / lexer
+BLOCK_START_STRING = '{%'
+BLOCK_END_STRING = '%}'
+VARIABLE_START_STRING = '{{'
+VARIABLE_END_STRING = '}}'
+COMMENT_START_STRING = '{#'
+COMMENT_END_STRING = '#}'
+LINE_STATEMENT_PREFIX = None
+LINE_COMMENT_PREFIX = None
+TRIM_BLOCKS = False
+LSTRIP_BLOCKS = False
+NEWLINE_SEQUENCE = '\n'
+KEEP_TRAILING_NEWLINE = False
+
+
+# default filters, tests and namespace
+from jinja2.filters import FILTERS as DEFAULT_FILTERS
+from jinja2.tests import TESTS as DEFAULT_TESTS
+DEFAULT_NAMESPACE = {
+ 'range': range_type,
+ 'dict': dict,
+ 'lipsum': generate_lorem_ipsum,
+ 'cycler': Cycler,
+ 'joiner': Joiner
+}
+
+
+# export all constants
+__all__ = tuple(x for x in locals().keys() if x.isupper())
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/jinja2/defaults.pyc b/Assignments/microblog/flask/lib/python2.7/site-packages/jinja2/defaults.pyc
new file mode 100644
index 0000000..3b2cba8
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/jinja2/defaults.pyc differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/jinja2/environment.py b/Assignments/microblog/flask/lib/python2.7/site-packages/jinja2/environment.py
new file mode 100644
index 0000000..8b2572b
--- /dev/null
+++ b/Assignments/microblog/flask/lib/python2.7/site-packages/jinja2/environment.py
@@ -0,0 +1,1213 @@
+# -*- coding: utf-8 -*-
+"""
+ jinja2.environment
+ ~~~~~~~~~~~~~~~~~~
+
+ Provides a class that holds runtime and parsing time options.
+
+ :copyright: (c) 2010 by the Jinja Team.
+ :license: BSD, see LICENSE for more details.
+"""
+import os
+import sys
+from jinja2 import nodes
+from jinja2.defaults import BLOCK_START_STRING, \
+ BLOCK_END_STRING, VARIABLE_START_STRING, VARIABLE_END_STRING, \
+ COMMENT_START_STRING, COMMENT_END_STRING, LINE_STATEMENT_PREFIX, \
+ LINE_COMMENT_PREFIX, TRIM_BLOCKS, NEWLINE_SEQUENCE, \
+ DEFAULT_FILTERS, DEFAULT_TESTS, DEFAULT_NAMESPACE, \
+ KEEP_TRAILING_NEWLINE, LSTRIP_BLOCKS
+from jinja2.lexer import get_lexer, TokenStream
+from jinja2.parser import Parser
+from jinja2.nodes import EvalContext
+from jinja2.optimizer import optimize
+from jinja2.compiler import generate, CodeGenerator
+from jinja2.runtime import Undefined, new_context, Context
+from jinja2.exceptions import TemplateSyntaxError, TemplateNotFound, \
+ TemplatesNotFound, TemplateRuntimeError
+from jinja2.utils import import_string, LRUCache, Markup, missing, \
+ concat, consume, internalcode
+from jinja2._compat import imap, ifilter, string_types, iteritems, \
+ text_type, reraise, implements_iterator, implements_to_string, \
+ get_next, encode_filename, PY2, PYPY
+from functools import reduce
+
+
+# for direct template usage we have up to ten living environments
+_spontaneous_environments = LRUCache(10)
+
+# the function to create jinja traceback objects. This is dynamically
+# imported on the first exception in the exception handler.
+_make_traceback = None
+
+
+def get_spontaneous_environment(*args):
+ """Return a new spontaneous environment. A spontaneous environment is an
+ unnamed and unaccessible (in theory) environment that is used for
+ templates generated from a string and not from the file system.
+ """
+ try:
+ env = _spontaneous_environments.get(args)
+ except TypeError:
+ return Environment(*args)
+ if env is not None:
+ return env
+ _spontaneous_environments[args] = env = Environment(*args)
+ env.shared = True
+ return env
+
+
+def create_cache(size):
+ """Return the cache class for the given size."""
+ if size == 0:
+ return None
+ if size < 0:
+ return {}
+ return LRUCache(size)
+
+
+def copy_cache(cache):
+ """Create an empty copy of the given cache."""
+ if cache is None:
+ return None
+ elif type(cache) is dict:
+ return {}
+ return LRUCache(cache.capacity)
+
+
+def load_extensions(environment, extensions):
+ """Load the extensions from the list and bind it to the environment.
+ Returns a dict of instantiated environments.
+ """
+ result = {}
+ for extension in extensions:
+ if isinstance(extension, string_types):
+ extension = import_string(extension)
+ result[extension.identifier] = extension(environment)
+ return result
+
+
+def _environment_sanity_check(environment):
+ """Perform a sanity check on the environment."""
+ assert issubclass(environment.undefined, Undefined), 'undefined must ' \
+ 'be a subclass of undefined because filters depend on it.'
+ assert environment.block_start_string != \
+ environment.variable_start_string != \
+ environment.comment_start_string, 'block, variable and comment ' \
+ 'start strings must be different'
+ assert environment.newline_sequence in ('\r', '\r\n', '\n'), \
+ 'newline_sequence set to unknown line ending string.'
+ return environment
+
+
+class Environment(object):
+ r"""The core component of Jinja is the `Environment`. It contains
+ important shared variables like configuration, filters, tests,
+ globals and others. Instances of this class may be modified if
+ they are not shared and if no template was loaded so far.
+ Modifications on environments after the first template was loaded
+ will lead to surprising effects and undefined behavior.
+
+ Here are the possible initialization parameters:
+
+ `block_start_string`
+ The string marking the beginning of a block. Defaults to ``'{%'``.
+
+ `block_end_string`
+ The string marking the end of a block. Defaults to ``'%}'``.
+
+ `variable_start_string`
+ The string marking the beginning of a print statement.
+ Defaults to ``'{{'``.
+
+ `variable_end_string`
+ The string marking the end of a print statement. Defaults to
+ ``'}}'``.
+
+ `comment_start_string`
+ The string marking the beginning of a comment. Defaults to ``'{#'``.
+
+ `comment_end_string`
+ The string marking the end of a comment. Defaults to ``'#}'``.
+
+ `line_statement_prefix`
+ If given and a string, this will be used as prefix for line based
+ statements. See also :ref:`line-statements`.
+
+ `line_comment_prefix`
+ If given and a string, this will be used as prefix for line based
+ comments. See also :ref:`line-statements`.
+
+ .. versionadded:: 2.2
+
+ `trim_blocks`
+ If this is set to ``True`` the first newline after a block is
+ removed (block, not variable tag!). Defaults to `False`.
+
+ `lstrip_blocks`
+ If this is set to ``True`` leading spaces and tabs are stripped
+ from the start of a line to a block. Defaults to `False`.
+
+ `newline_sequence`
+ The sequence that starts a newline. Must be one of ``'\r'``,
+ ``'\n'`` or ``'\r\n'``. The default is ``'\n'`` which is a
+ useful default for Linux and OS X systems as well as web
+ applications.
+
+ `keep_trailing_newline`
+ Preserve the trailing newline when rendering templates.
+ The default is ``False``, which causes a single newline,
+ if present, to be stripped from the end of the template.
+
+ .. versionadded:: 2.7
+
+ `extensions`
+ List of Jinja extensions to use. This can either be import paths
+ as strings or extension classes. For more information have a
+ look at :ref:`the extensions documentation `.
+
+ `optimized`
+ should the optimizer be enabled? Default is `True`.
+
+ `undefined`
+ :class:`Undefined` or a subclass of it that is used to represent
+ undefined values in the template.
+
+ `finalize`
+ A callable that can be used to process the result of a variable
+ expression before it is output. For example one can convert
+ `None` implicitly into an empty string here.
+
+ `autoescape`
+ If set to true the XML/HTML autoescaping feature is enabled by
+ default. For more details about autoescaping see
+ :class:`~jinja2.utils.Markup`. As of Jinja 2.4 this can also
+ be a callable that is passed the template name and has to
+ return `True` or `False` depending on autoescape should be
+ enabled by default.
+
+ .. versionchanged:: 2.4
+ `autoescape` can now be a function
+
+ `loader`
+ The template loader for this environment.
+
+ `cache_size`
+ The size of the cache. Per default this is ``400`` which means
+ that if more than 400 templates are loaded the loader will clean
+ out the least recently used template. If the cache size is set to
+ ``0`` templates are recompiled all the time, if the cache size is
+ ``-1`` the cache will not be cleaned.
+
+ .. versionchanged:: 2.8
+ The cache size was increased to 400 from a low 50.
+
+ `auto_reload`
+ Some loaders load templates from locations where the template
+ sources may change (ie: file system or database). If
+ `auto_reload` is set to `True` (default) every time a template is
+ requested the loader checks if the source changed and if yes, it
+ will reload the template. For higher performance it's possible to
+ disable that.
+
+ `bytecode_cache`
+ If set to a bytecode cache object, this object will provide a
+ cache for the internal Jinja bytecode so that templates don't
+ have to be parsed if they were not changed.
+
+ See :ref:`bytecode-cache` for more information.
+ """
+
+ #: if this environment is sandboxed. Modifying this variable won't make
+ #: the environment sandboxed though. For a real sandboxed environment
+ #: have a look at jinja2.sandbox. This flag alone controls the code
+ #: generation by the compiler.
+ sandboxed = False
+
+ #: True if the environment is just an overlay
+ overlayed = False
+
+ #: the environment this environment is linked to if it is an overlay
+ linked_to = None
+
+ #: shared environments have this set to `True`. A shared environment
+ #: must not be modified
+ shared = False
+
+ #: these are currently EXPERIMENTAL undocumented features.
+ exception_handler = None
+ exception_formatter = None
+
+ #: the class that is used for code generation. See
+ #: :class:`~jinja2.compiler.CodeGenerator` for more information.
+ code_generator_class = CodeGenerator
+
+ #: the context class thatis used for templates. See
+ #: :class:`~jinja2.runtime.Context` for more information.
+ context_class = Context
+
+ def __init__(self,
+ block_start_string=BLOCK_START_STRING,
+ block_end_string=BLOCK_END_STRING,
+ variable_start_string=VARIABLE_START_STRING,
+ variable_end_string=VARIABLE_END_STRING,
+ comment_start_string=COMMENT_START_STRING,
+ comment_end_string=COMMENT_END_STRING,
+ line_statement_prefix=LINE_STATEMENT_PREFIX,
+ line_comment_prefix=LINE_COMMENT_PREFIX,
+ trim_blocks=TRIM_BLOCKS,
+ lstrip_blocks=LSTRIP_BLOCKS,
+ newline_sequence=NEWLINE_SEQUENCE,
+ keep_trailing_newline=KEEP_TRAILING_NEWLINE,
+ extensions=(),
+ optimized=True,
+ undefined=Undefined,
+ finalize=None,
+ autoescape=False,
+ loader=None,
+ cache_size=400,
+ auto_reload=True,
+ bytecode_cache=None):
+ # !!Important notice!!
+ # The constructor accepts quite a few arguments that should be
+ # passed by keyword rather than position. However it's important to
+ # not change the order of arguments because it's used at least
+ # internally in those cases:
+ # - spontaneous environments (i18n extension and Template)
+ # - unittests
+ # If parameter changes are required only add parameters at the end
+ # and don't change the arguments (or the defaults!) of the arguments
+ # existing already.
+
+ # lexer / parser information
+ self.block_start_string = block_start_string
+ self.block_end_string = block_end_string
+ self.variable_start_string = variable_start_string
+ self.variable_end_string = variable_end_string
+ self.comment_start_string = comment_start_string
+ self.comment_end_string = comment_end_string
+ self.line_statement_prefix = line_statement_prefix
+ self.line_comment_prefix = line_comment_prefix
+ self.trim_blocks = trim_blocks
+ self.lstrip_blocks = lstrip_blocks
+ self.newline_sequence = newline_sequence
+ self.keep_trailing_newline = keep_trailing_newline
+
+ # runtime information
+ self.undefined = undefined
+ self.optimized = optimized
+ self.finalize = finalize
+ self.autoescape = autoescape
+
+ # defaults
+ self.filters = DEFAULT_FILTERS.copy()
+ self.tests = DEFAULT_TESTS.copy()
+ self.globals = DEFAULT_NAMESPACE.copy()
+
+ # set the loader provided
+ self.loader = loader
+ self.cache = create_cache(cache_size)
+ self.bytecode_cache = bytecode_cache
+ self.auto_reload = auto_reload
+
+ # load extensions
+ self.extensions = load_extensions(self, extensions)
+
+ _environment_sanity_check(self)
+
+ def add_extension(self, extension):
+ """Adds an extension after the environment was created.
+
+ .. versionadded:: 2.5
+ """
+ self.extensions.update(load_extensions(self, [extension]))
+
+ def extend(self, **attributes):
+ """Add the items to the instance of the environment if they do not exist
+ yet. This is used by :ref:`extensions ` to register
+ callbacks and configuration values without breaking inheritance.
+ """
+ for key, value in iteritems(attributes):
+ if not hasattr(self, key):
+ setattr(self, key, value)
+
+ def overlay(self, block_start_string=missing, block_end_string=missing,
+ variable_start_string=missing, variable_end_string=missing,
+ comment_start_string=missing, comment_end_string=missing,
+ line_statement_prefix=missing, line_comment_prefix=missing,
+ trim_blocks=missing, lstrip_blocks=missing,
+ extensions=missing, optimized=missing,
+ undefined=missing, finalize=missing, autoescape=missing,
+ loader=missing, cache_size=missing, auto_reload=missing,
+ bytecode_cache=missing):
+ """Create a new overlay environment that shares all the data with the
+ current environment except for cache and the overridden attributes.
+ Extensions cannot be removed for an overlayed environment. An overlayed
+ environment automatically gets all the extensions of the environment it
+ is linked to plus optional extra extensions.
+
+ Creating overlays should happen after the initial environment was set
+ up completely. Not all attributes are truly linked, some are just
+ copied over so modifications on the original environment may not shine
+ through.
+ """
+ args = dict(locals())
+ del args['self'], args['cache_size'], args['extensions']
+
+ rv = object.__new__(self.__class__)
+ rv.__dict__.update(self.__dict__)
+ rv.overlayed = True
+ rv.linked_to = self
+
+ for key, value in iteritems(args):
+ if value is not missing:
+ setattr(rv, key, value)
+
+ if cache_size is not missing:
+ rv.cache = create_cache(cache_size)
+ else:
+ rv.cache = copy_cache(self.cache)
+
+ rv.extensions = {}
+ for key, value in iteritems(self.extensions):
+ rv.extensions[key] = value.bind(rv)
+ if extensions is not missing:
+ rv.extensions.update(load_extensions(rv, extensions))
+
+ return _environment_sanity_check(rv)
+
+ lexer = property(get_lexer, doc="The lexer for this environment.")
+
+ def iter_extensions(self):
+ """Iterates over the extensions by priority."""
+ return iter(sorted(self.extensions.values(),
+ key=lambda x: x.priority))
+
+ def getitem(self, obj, argument):
+ """Get an item or attribute of an object but prefer the item."""
+ try:
+ return obj[argument]
+ except (TypeError, LookupError):
+ if isinstance(argument, string_types):
+ try:
+ attr = str(argument)
+ except Exception:
+ pass
+ else:
+ try:
+ return getattr(obj, attr)
+ except AttributeError:
+ pass
+ return self.undefined(obj=obj, name=argument)
+
+ def getattr(self, obj, attribute):
+ """Get an item or attribute of an object but prefer the attribute.
+ Unlike :meth:`getitem` the attribute *must* be a bytestring.
+ """
+ try:
+ return getattr(obj, attribute)
+ except AttributeError:
+ pass
+ try:
+ return obj[attribute]
+ except (TypeError, LookupError, AttributeError):
+ return self.undefined(obj=obj, name=attribute)
+
+ def call_filter(self, name, value, args=None, kwargs=None,
+ context=None, eval_ctx=None):
+ """Invokes a filter on a value the same way the compiler does it.
+
+ .. versionadded:: 2.7
+ """
+ func = self.filters.get(name)
+ if func is None:
+ raise TemplateRuntimeError('no filter named %r' % name)
+ args = [value] + list(args or ())
+ if getattr(func, 'contextfilter', False):
+ if context is None:
+ raise TemplateRuntimeError('Attempted to invoke context '
+ 'filter without context')
+ args.insert(0, context)
+ elif getattr(func, 'evalcontextfilter', False):
+ if eval_ctx is None:
+ if context is not None:
+ eval_ctx = context.eval_ctx
+ else:
+ eval_ctx = EvalContext(self)
+ args.insert(0, eval_ctx)
+ elif getattr(func, 'environmentfilter', False):
+ args.insert(0, self)
+ return func(*args, **(kwargs or {}))
+
+ def call_test(self, name, value, args=None, kwargs=None):
+ """Invokes a test on a value the same way the compiler does it.
+
+ .. versionadded:: 2.7
+ """
+ func = self.tests.get(name)
+ if func is None:
+ raise TemplateRuntimeError('no test named %r' % name)
+ return func(value, *(args or ()), **(kwargs or {}))
+
+ @internalcode
+ def parse(self, source, name=None, filename=None):
+ """Parse the sourcecode and return the abstract syntax tree. This
+ tree of nodes is used by the compiler to convert the template into
+ executable source- or bytecode. This is useful for debugging or to
+ extract information from templates.
+
+ If you are :ref:`developing Jinja2 extensions `
+ this gives you a good overview of the node tree generated.
+ """
+ try:
+ return self._parse(source, name, filename)
+ except TemplateSyntaxError:
+ exc_info = sys.exc_info()
+ self.handle_exception(exc_info, source_hint=source)
+
+ def _parse(self, source, name, filename):
+ """Internal parsing function used by `parse` and `compile`."""
+ return Parser(self, source, name, encode_filename(filename)).parse()
+
+ def lex(self, source, name=None, filename=None):
+ """Lex the given sourcecode and return a generator that yields
+ tokens as tuples in the form ``(lineno, token_type, value)``.
+ This can be useful for :ref:`extension development `
+ and debugging templates.
+
+ This does not perform preprocessing. If you want the preprocessing
+ of the extensions to be applied you have to filter source through
+ the :meth:`preprocess` method.
+ """
+ source = text_type(source)
+ try:
+ return self.lexer.tokeniter(source, name, filename)
+ except TemplateSyntaxError:
+ exc_info = sys.exc_info()
+ self.handle_exception(exc_info, source_hint=source)
+
+ def preprocess(self, source, name=None, filename=None):
+ """Preprocesses the source with all extensions. This is automatically
+ called for all parsing and compiling methods but *not* for :meth:`lex`
+ because there you usually only want the actual source tokenized.
+ """
+ return reduce(lambda s, e: e.preprocess(s, name, filename),
+ self.iter_extensions(), text_type(source))
+
+ def _tokenize(self, source, name, filename=None, state=None):
+ """Called by the parser to do the preprocessing and filtering
+ for all the extensions. Returns a :class:`~jinja2.lexer.TokenStream`.
+ """
+ source = self.preprocess(source, name, filename)
+ stream = self.lexer.tokenize(source, name, filename, state)
+ for ext in self.iter_extensions():
+ stream = ext.filter_stream(stream)
+ if not isinstance(stream, TokenStream):
+ stream = TokenStream(stream, name, filename)
+ return stream
+
+ def _generate(self, source, name, filename, defer_init=False):
+ """Internal hook that can be overridden to hook a different generate
+ method in.
+
+ .. versionadded:: 2.5
+ """
+ return generate(source, self, name, filename, defer_init=defer_init)
+
+ def _compile(self, source, filename):
+ """Internal hook that can be overridden to hook a different compile
+ method in.
+
+ .. versionadded:: 2.5
+ """
+ return compile(source, filename, 'exec')
+
+ @internalcode
+ def compile(self, source, name=None, filename=None, raw=False,
+ defer_init=False):
+ """Compile a node or template source code. The `name` parameter is
+ the load name of the template after it was joined using
+ :meth:`join_path` if necessary, not the filename on the file system.
+ the `filename` parameter is the estimated filename of the template on
+ the file system. If the template came from a database or memory this
+ can be omitted.
+
+ The return value of this method is a python code object. If the `raw`
+ parameter is `True` the return value will be a string with python
+ code equivalent to the bytecode returned otherwise. This method is
+ mainly used internally.
+
+ `defer_init` is use internally to aid the module code generator. This
+ causes the generated code to be able to import without the global
+ environment variable to be set.
+
+ .. versionadded:: 2.4
+ `defer_init` parameter added.
+ """
+ source_hint = None
+ try:
+ if isinstance(source, string_types):
+ source_hint = source
+ source = self._parse(source, name, filename)
+ if self.optimized:
+ source = optimize(source, self)
+ source = self._generate(source, name, filename,
+ defer_init=defer_init)
+ if raw:
+ return source
+ if filename is None:
+ filename = ''
+ else:
+ filename = encode_filename(filename)
+ return self._compile(source, filename)
+ except TemplateSyntaxError:
+ exc_info = sys.exc_info()
+ self.handle_exception(exc_info, source_hint=source_hint)
+
+ def compile_expression(self, source, undefined_to_none=True):
+ """A handy helper method that returns a callable that accepts keyword
+ arguments that appear as variables in the expression. If called it
+ returns the result of the expression.
+
+ This is useful if applications want to use the same rules as Jinja
+ in template "configuration files" or similar situations.
+
+ Example usage:
+
+ >>> env = Environment()
+ >>> expr = env.compile_expression('foo == 42')
+ >>> expr(foo=23)
+ False
+ >>> expr(foo=42)
+ True
+
+ Per default the return value is converted to `None` if the
+ expression returns an undefined value. This can be changed
+ by setting `undefined_to_none` to `False`.
+
+ >>> env.compile_expression('var')() is None
+ True
+ >>> env.compile_expression('var', undefined_to_none=False)()
+ Undefined
+
+ .. versionadded:: 2.1
+ """
+ parser = Parser(self, source, state='variable')
+ exc_info = None
+ try:
+ expr = parser.parse_expression()
+ if not parser.stream.eos:
+ raise TemplateSyntaxError('chunk after expression',
+ parser.stream.current.lineno,
+ None, None)
+ expr.set_environment(self)
+ except TemplateSyntaxError:
+ exc_info = sys.exc_info()
+ if exc_info is not None:
+ self.handle_exception(exc_info, source_hint=source)
+ body = [nodes.Assign(nodes.Name('result', 'store'), expr, lineno=1)]
+ template = self.from_string(nodes.Template(body, lineno=1))
+ return TemplateExpression(template, undefined_to_none)
+
+ def compile_templates(self, target, extensions=None, filter_func=None,
+ zip='deflated', log_function=None,
+ ignore_errors=True, py_compile=False):
+ """Finds all the templates the loader can find, compiles them
+ and stores them in `target`. If `zip` is `None`, instead of in a
+ zipfile, the templates will be stored in a directory.
+ By default a deflate zip algorithm is used. To switch to
+ the stored algorithm, `zip` can be set to ``'stored'``.
+
+ `extensions` and `filter_func` are passed to :meth:`list_templates`.
+ Each template returned will be compiled to the target folder or
+ zipfile.
+
+ By default template compilation errors are ignored. In case a
+ log function is provided, errors are logged. If you want template
+ syntax errors to abort the compilation you can set `ignore_errors`
+ to `False` and you will get an exception on syntax errors.
+
+ If `py_compile` is set to `True` .pyc files will be written to the
+ target instead of standard .py files. This flag does not do anything
+ on pypy and Python 3 where pyc files are not picked up by itself and
+ don't give much benefit.
+
+ .. versionadded:: 2.4
+ """
+ from jinja2.loaders import ModuleLoader
+
+ if log_function is None:
+ log_function = lambda x: None
+
+ if py_compile:
+ if not PY2 or PYPY:
+ from warnings import warn
+ warn(Warning('py_compile has no effect on pypy or Python 3'))
+ py_compile = False
+ else:
+ import imp
+ import marshal
+ py_header = imp.get_magic() + \
+ u'\xff\xff\xff\xff'.encode('iso-8859-15')
+
+ # Python 3.3 added a source filesize to the header
+ if sys.version_info >= (3, 3):
+ py_header += u'\x00\x00\x00\x00'.encode('iso-8859-15')
+
+ def write_file(filename, data, mode):
+ if zip:
+ info = ZipInfo(filename)
+ info.external_attr = 0o755 << 16
+ zip_file.writestr(info, data)
+ else:
+ f = open(os.path.join(target, filename), mode)
+ try:
+ f.write(data)
+ finally:
+ f.close()
+
+ if zip is not None:
+ from zipfile import ZipFile, ZipInfo, ZIP_DEFLATED, ZIP_STORED
+ zip_file = ZipFile(target, 'w', dict(deflated=ZIP_DEFLATED,
+ stored=ZIP_STORED)[zip])
+ log_function('Compiling into Zip archive "%s"' % target)
+ else:
+ if not os.path.isdir(target):
+ os.makedirs(target)
+ log_function('Compiling into folder "%s"' % target)
+
+ try:
+ for name in self.list_templates(extensions, filter_func):
+ source, filename, _ = self.loader.get_source(self, name)
+ try:
+ code = self.compile(source, name, filename, True, True)
+ except TemplateSyntaxError as e:
+ if not ignore_errors:
+ raise
+ log_function('Could not compile "%s": %s' % (name, e))
+ continue
+
+ filename = ModuleLoader.get_module_filename(name)
+
+ if py_compile:
+ c = self._compile(code, encode_filename(filename))
+ write_file(filename + 'c', py_header +
+ marshal.dumps(c), 'wb')
+ log_function('Byte-compiled "%s" as %s' %
+ (name, filename + 'c'))
+ else:
+ write_file(filename, code, 'w')
+ log_function('Compiled "%s" as %s' % (name, filename))
+ finally:
+ if zip:
+ zip_file.close()
+
+ log_function('Finished compiling templates')
+
+ def list_templates(self, extensions=None, filter_func=None):
+ """Returns a list of templates for this environment. This requires
+ that the loader supports the loader's
+ :meth:`~BaseLoader.list_templates` method.
+
+ If there are other files in the template folder besides the
+ actual templates, the returned list can be filtered. There are two
+ ways: either `extensions` is set to a list of file extensions for
+ templates, or a `filter_func` can be provided which is a callable that
+ is passed a template name and should return `True` if it should end up
+ in the result list.
+
+ If the loader does not support that, a :exc:`TypeError` is raised.
+
+ .. versionadded:: 2.4
+ """
+ x = self.loader.list_templates()
+ if extensions is not None:
+ if filter_func is not None:
+ raise TypeError('either extensions or filter_func '
+ 'can be passed, but not both')
+ filter_func = lambda x: '.' in x and \
+ x.rsplit('.', 1)[1] in extensions
+ if filter_func is not None:
+ x = list(ifilter(filter_func, x))
+ return x
+
+ def handle_exception(self, exc_info=None, rendered=False, source_hint=None):
+ """Exception handling helper. This is used internally to either raise
+ rewritten exceptions or return a rendered traceback for the template.
+ """
+ global _make_traceback
+ if exc_info is None:
+ exc_info = sys.exc_info()
+
+ # the debugging module is imported when it's used for the first time.
+ # we're doing a lot of stuff there and for applications that do not
+ # get any exceptions in template rendering there is no need to load
+ # all of that.
+ if _make_traceback is None:
+ from jinja2.debug import make_traceback as _make_traceback
+ traceback = _make_traceback(exc_info, source_hint)
+ if rendered and self.exception_formatter is not None:
+ return self.exception_formatter(traceback)
+ if self.exception_handler is not None:
+ self.exception_handler(traceback)
+ exc_type, exc_value, tb = traceback.standard_exc_info
+ reraise(exc_type, exc_value, tb)
+
+ def join_path(self, template, parent):
+ """Join a template with the parent. By default all the lookups are
+ relative to the loader root so this method returns the `template`
+ parameter unchanged, but if the paths should be relative to the
+ parent template, this function can be used to calculate the real
+ template name.
+
+ Subclasses may override this method and implement template path
+ joining here.
+ """
+ return template
+
+ @internalcode
+ def _load_template(self, name, globals):
+ if self.loader is None:
+ raise TypeError('no loader for this environment specified')
+ try:
+ # use abs path for cache key
+ cache_key = self.loader.get_source(self, name)[1]
+ except RuntimeError:
+ # if loader does not implement get_source()
+ cache_key = None
+ # if template is not file, use name for cache key
+ if cache_key is None:
+ cache_key = name
+ if self.cache is not None:
+ template = self.cache.get(cache_key)
+ if template is not None and (not self.auto_reload or
+ template.is_up_to_date):
+ return template
+ template = self.loader.load(self, name, globals)
+ if self.cache is not None:
+ self.cache[cache_key] = template
+ return template
+
+ @internalcode
+ def get_template(self, name, parent=None, globals=None):
+ """Load a template from the loader. If a loader is configured this
+ method ask the loader for the template and returns a :class:`Template`.
+ If the `parent` parameter is not `None`, :meth:`join_path` is called
+ to get the real template name before loading.
+
+ The `globals` parameter can be used to provide template wide globals.
+ These variables are available in the context at render time.
+
+ If the template does not exist a :exc:`TemplateNotFound` exception is
+ raised.
+
+ .. versionchanged:: 2.4
+ If `name` is a :class:`Template` object it is returned from the
+ function unchanged.
+ """
+ if isinstance(name, Template):
+ return name
+ if parent is not None:
+ name = self.join_path(name, parent)
+ return self._load_template(name, self.make_globals(globals))
+
+ @internalcode
+ def select_template(self, names, parent=None, globals=None):
+ """Works like :meth:`get_template` but tries a number of templates
+ before it fails. If it cannot find any of the templates, it will
+ raise a :exc:`TemplatesNotFound` exception.
+
+ .. versionadded:: 2.3
+
+ .. versionchanged:: 2.4
+ If `names` contains a :class:`Template` object it is returned
+ from the function unchanged.
+ """
+ if not names:
+ raise TemplatesNotFound(message=u'Tried to select from an empty list '
+ u'of templates.')
+ globals = self.make_globals(globals)
+ for name in names:
+ if isinstance(name, Template):
+ return name
+ if parent is not None:
+ name = self.join_path(name, parent)
+ try:
+ return self._load_template(name, globals)
+ except TemplateNotFound:
+ pass
+ raise TemplatesNotFound(names)
+
+ @internalcode
+ def get_or_select_template(self, template_name_or_list,
+ parent=None, globals=None):
+ """Does a typecheck and dispatches to :meth:`select_template`
+ if an iterable of template names is given, otherwise to
+ :meth:`get_template`.
+
+ .. versionadded:: 2.3
+ """
+ if isinstance(template_name_or_list, string_types):
+ return self.get_template(template_name_or_list, parent, globals)
+ elif isinstance(template_name_or_list, Template):
+ return template_name_or_list
+ return self.select_template(template_name_or_list, parent, globals)
+
+ def from_string(self, source, globals=None, template_class=None):
+ """Load a template from a string. This parses the source given and
+ returns a :class:`Template` object.
+ """
+ globals = self.make_globals(globals)
+ cls = template_class or self.template_class
+ return cls.from_code(self, self.compile(source), globals, None)
+
+ def make_globals(self, d):
+ """Return a dict for the globals."""
+ if not d:
+ return self.globals
+ return dict(self.globals, **d)
+
+
+class Template(object):
+ """The central template object. This class represents a compiled template
+ and is used to evaluate it.
+
+ Normally the template object is generated from an :class:`Environment` but
+ it also has a constructor that makes it possible to create a template
+ instance directly using the constructor. It takes the same arguments as
+ the environment constructor but it's not possible to specify a loader.
+
+ Every template object has a few methods and members that are guaranteed
+ to exist. However it's important that a template object should be
+ considered immutable. Modifications on the object are not supported.
+
+ Template objects created from the constructor rather than an environment
+ do have an `environment` attribute that points to a temporary environment
+ that is probably shared with other templates created with the constructor
+ and compatible settings.
+
+ >>> template = Template('Hello {{ name }}!')
+ >>> template.render(name='John Doe') == u'Hello John Doe!'
+ True
+ >>> stream = template.stream(name='John Doe')
+ >>> next(stream) == u'Hello John Doe!'
+ True
+ >>> next(stream)
+ Traceback (most recent call last):
+ ...
+ StopIteration
+ """
+
+ def __new__(cls, source,
+ block_start_string=BLOCK_START_STRING,
+ block_end_string=BLOCK_END_STRING,
+ variable_start_string=VARIABLE_START_STRING,
+ variable_end_string=VARIABLE_END_STRING,
+ comment_start_string=COMMENT_START_STRING,
+ comment_end_string=COMMENT_END_STRING,
+ line_statement_prefix=LINE_STATEMENT_PREFIX,
+ line_comment_prefix=LINE_COMMENT_PREFIX,
+ trim_blocks=TRIM_BLOCKS,
+ lstrip_blocks=LSTRIP_BLOCKS,
+ newline_sequence=NEWLINE_SEQUENCE,
+ keep_trailing_newline=KEEP_TRAILING_NEWLINE,
+ extensions=(),
+ optimized=True,
+ undefined=Undefined,
+ finalize=None,
+ autoescape=False):
+ env = get_spontaneous_environment(
+ block_start_string, block_end_string, variable_start_string,
+ variable_end_string, comment_start_string, comment_end_string,
+ line_statement_prefix, line_comment_prefix, trim_blocks,
+ lstrip_blocks, newline_sequence, keep_trailing_newline,
+ frozenset(extensions), optimized, undefined, finalize, autoescape,
+ None, 0, False, None)
+ return env.from_string(source, template_class=cls)
+
+ @classmethod
+ def from_code(cls, environment, code, globals, uptodate=None):
+ """Creates a template object from compiled code and the globals. This
+ is used by the loaders and environment to create a template object.
+ """
+ namespace = {
+ 'environment': environment,
+ '__file__': code.co_filename
+ }
+ exec(code, namespace)
+ rv = cls._from_namespace(environment, namespace, globals)
+ rv._uptodate = uptodate
+ return rv
+
+ @classmethod
+ def from_module_dict(cls, environment, module_dict, globals):
+ """Creates a template object from a module. This is used by the
+ module loader to create a template object.
+
+ .. versionadded:: 2.4
+ """
+ return cls._from_namespace(environment, module_dict, globals)
+
+ @classmethod
+ def _from_namespace(cls, environment, namespace, globals):
+ t = object.__new__(cls)
+ t.environment = environment
+ t.globals = globals
+ t.name = namespace['name']
+ t.filename = namespace['__file__']
+ t.blocks = namespace['blocks']
+
+ # render function and module
+ t.root_render_func = namespace['root']
+ t._module = None
+
+ # debug and loader helpers
+ t._debug_info = namespace['debug_info']
+ t._uptodate = None
+
+ # store the reference
+ namespace['environment'] = environment
+ namespace['__jinja_template__'] = t
+
+ return t
+
+ def render(self, *args, **kwargs):
+ """This method accepts the same arguments as the `dict` constructor:
+ A dict, a dict subclass or some keyword arguments. If no arguments
+ are given the context will be empty. These two calls do the same::
+
+ template.render(knights='that say nih')
+ template.render({'knights': 'that say nih'})
+
+ This will return the rendered template as unicode string.
+ """
+ vars = dict(*args, **kwargs)
+ try:
+ return concat(self.root_render_func(self.new_context(vars)))
+ except Exception:
+ exc_info = sys.exc_info()
+ return self.environment.handle_exception(exc_info, True)
+
+ def stream(self, *args, **kwargs):
+ """Works exactly like :meth:`generate` but returns a
+ :class:`TemplateStream`.
+ """
+ return TemplateStream(self.generate(*args, **kwargs))
+
+ def generate(self, *args, **kwargs):
+ """For very large templates it can be useful to not render the whole
+ template at once but evaluate each statement after another and yield
+ piece for piece. This method basically does exactly that and returns
+ a generator that yields one item after another as unicode strings.
+
+ It accepts the same arguments as :meth:`render`.
+ """
+ vars = dict(*args, **kwargs)
+ try:
+ for event in self.root_render_func(self.new_context(vars)):
+ yield event
+ except Exception:
+ exc_info = sys.exc_info()
+ else:
+ return
+ yield self.environment.handle_exception(exc_info, True)
+
+ def new_context(self, vars=None, shared=False, locals=None):
+ """Create a new :class:`Context` for this template. The vars
+ provided will be passed to the template. Per default the globals
+ are added to the context. If shared is set to `True` the data
+ is passed as it to the context without adding the globals.
+
+ `locals` can be a dict of local variables for internal usage.
+ """
+ return new_context(self.environment, self.name, self.blocks,
+ vars, shared, self.globals, locals)
+
+ def make_module(self, vars=None, shared=False, locals=None):
+ """This method works like the :attr:`module` attribute when called
+ without arguments but it will evaluate the template on every call
+ rather than caching it. It's also possible to provide
+ a dict which is then used as context. The arguments are the same
+ as for the :meth:`new_context` method.
+ """
+ return TemplateModule(self, self.new_context(vars, shared, locals))
+
+ @property
+ def module(self):
+ """The template as module. This is used for imports in the
+ template runtime but is also useful if one wants to access
+ exported template variables from the Python layer:
+
+ >>> t = Template('{% macro foo() %}42{% endmacro %}23')
+ >>> str(t.module)
+ '23'
+ >>> t.module.foo() == u'42'
+ True
+ """
+ if self._module is not None:
+ return self._module
+ self._module = rv = self.make_module()
+ return rv
+
+ def get_corresponding_lineno(self, lineno):
+ """Return the source line number of a line number in the
+ generated bytecode as they are not in sync.
+ """
+ for template_line, code_line in reversed(self.debug_info):
+ if code_line <= lineno:
+ return template_line
+ return 1
+
+ @property
+ def is_up_to_date(self):
+ """If this variable is `False` there is a newer version available."""
+ if self._uptodate is None:
+ return True
+ return self._uptodate()
+
+ @property
+ def debug_info(self):
+ """The debug info mapping."""
+ return [tuple(imap(int, x.split('='))) for x in
+ self._debug_info.split('&')]
+
+ def __repr__(self):
+ if self.name is None:
+ name = 'memory:%x' % id(self)
+ else:
+ name = repr(self.name)
+ return '<%s %s>' % (self.__class__.__name__, name)
+
+
+@implements_to_string
+class TemplateModule(object):
+ """Represents an imported template. All the exported names of the
+ template are available as attributes on this object. Additionally
+ converting it into an unicode- or bytestrings renders the contents.
+ """
+
+ def __init__(self, template, context):
+ self._body_stream = list(template.root_render_func(context))
+ self.__dict__.update(context.get_exported())
+ self.__name__ = template.name
+
+ def __html__(self):
+ return Markup(concat(self._body_stream))
+
+ def __str__(self):
+ return concat(self._body_stream)
+
+ def __repr__(self):
+ if self.__name__ is None:
+ name = 'memory:%x' % id(self)
+ else:
+ name = repr(self.__name__)
+ return '<%s %s>' % (self.__class__.__name__, name)
+
+
+class TemplateExpression(object):
+ """The :meth:`jinja2.Environment.compile_expression` method returns an
+ instance of this object. It encapsulates the expression-like access
+ to the template with an expression it wraps.
+ """
+
+ def __init__(self, template, undefined_to_none):
+ self._template = template
+ self._undefined_to_none = undefined_to_none
+
+ def __call__(self, *args, **kwargs):
+ context = self._template.new_context(dict(*args, **kwargs))
+ consume(self._template.root_render_func(context))
+ rv = context.vars['result']
+ if self._undefined_to_none and isinstance(rv, Undefined):
+ rv = None
+ return rv
+
+
+@implements_iterator
+class TemplateStream(object):
+ """A template stream works pretty much like an ordinary python generator
+ but it can buffer multiple items to reduce the number of total iterations.
+ Per default the output is unbuffered which means that for every unbuffered
+ instruction in the template one unicode string is yielded.
+
+ If buffering is enabled with a buffer size of 5, five items are combined
+ into a new unicode string. This is mainly useful if you are streaming
+ big templates to a client via WSGI which flushes after each iteration.
+ """
+
+ def __init__(self, gen):
+ self._gen = gen
+ self.disable_buffering()
+
+ def dump(self, fp, encoding=None, errors='strict'):
+ """Dump the complete stream into a file or file-like object.
+ Per default unicode strings are written, if you want to encode
+ before writing specify an `encoding`.
+
+ Example usage::
+
+ Template('Hello {{ name }}!').stream(name='foo').dump('hello.html')
+ """
+ close = False
+ if isinstance(fp, string_types):
+ if encoding is None:
+ encoding = 'utf-8'
+ fp = open(fp, 'wb')
+ close = True
+ try:
+ if encoding is not None:
+ iterable = (x.encode(encoding, errors) for x in self)
+ else:
+ iterable = self
+ if hasattr(fp, 'writelines'):
+ fp.writelines(iterable)
+ else:
+ for item in iterable:
+ fp.write(item)
+ finally:
+ if close:
+ fp.close()
+
+ def disable_buffering(self):
+ """Disable the output buffering."""
+ self._next = get_next(self._gen)
+ self.buffered = False
+
+ def enable_buffering(self, size=5):
+ """Enable buffering. Buffer `size` items before yielding them."""
+ if size <= 1:
+ raise ValueError('buffer size too small')
+
+ def generator(next):
+ buf = []
+ c_size = 0
+ push = buf.append
+
+ while 1:
+ try:
+ while c_size < size:
+ c = next()
+ push(c)
+ if c:
+ c_size += 1
+ except StopIteration:
+ if not c_size:
+ return
+ yield concat(buf)
+ del buf[:]
+ c_size = 0
+
+ self.buffered = True
+ self._next = get_next(generator(get_next(self._gen)))
+
+ def __iter__(self):
+ return self
+
+ def __next__(self):
+ return self._next()
+
+
+# hook in default template class. if anyone reads this comment: ignore that
+# it's possible to use custom templates ;-)
+Environment.template_class = Template
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/jinja2/environment.pyc b/Assignments/microblog/flask/lib/python2.7/site-packages/jinja2/environment.pyc
new file mode 100644
index 0000000..e2b6ea8
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/jinja2/environment.pyc differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/jinja2/exceptions.py b/Assignments/microblog/flask/lib/python2.7/site-packages/jinja2/exceptions.py
new file mode 100644
index 0000000..c9df6dc
--- /dev/null
+++ b/Assignments/microblog/flask/lib/python2.7/site-packages/jinja2/exceptions.py
@@ -0,0 +1,146 @@
+# -*- coding: utf-8 -*-
+"""
+ jinja2.exceptions
+ ~~~~~~~~~~~~~~~~~
+
+ Jinja exceptions.
+
+ :copyright: (c) 2010 by the Jinja Team.
+ :license: BSD, see LICENSE for more details.
+"""
+from jinja2._compat import imap, text_type, PY2, implements_to_string
+
+
+class TemplateError(Exception):
+ """Baseclass for all template errors."""
+
+ if PY2:
+ def __init__(self, message=None):
+ if message is not None:
+ message = text_type(message).encode('utf-8')
+ Exception.__init__(self, message)
+
+ @property
+ def message(self):
+ if self.args:
+ message = self.args[0]
+ if message is not None:
+ return message.decode('utf-8', 'replace')
+
+ def __unicode__(self):
+ return self.message or u''
+ else:
+ def __init__(self, message=None):
+ Exception.__init__(self, message)
+
+ @property
+ def message(self):
+ if self.args:
+ message = self.args[0]
+ if message is not None:
+ return message
+
+
+@implements_to_string
+class TemplateNotFound(IOError, LookupError, TemplateError):
+ """Raised if a template does not exist."""
+
+ # looks weird, but removes the warning descriptor that just
+ # bogusly warns us about message being deprecated
+ message = None
+
+ def __init__(self, name, message=None):
+ IOError.__init__(self)
+ if message is None:
+ message = name
+ self.message = message
+ self.name = name
+ self.templates = [name]
+
+ def __str__(self):
+ return self.message
+
+
+class TemplatesNotFound(TemplateNotFound):
+ """Like :class:`TemplateNotFound` but raised if multiple templates
+ are selected. This is a subclass of :class:`TemplateNotFound`
+ exception, so just catching the base exception will catch both.
+
+ .. versionadded:: 2.2
+ """
+
+ def __init__(self, names=(), message=None):
+ if message is None:
+ message = u'none of the templates given were found: ' + \
+ u', '.join(imap(text_type, names))
+ TemplateNotFound.__init__(self, names and names[-1] or None, message)
+ self.templates = list(names)
+
+
+@implements_to_string
+class TemplateSyntaxError(TemplateError):
+ """Raised to tell the user that there is a problem with the template."""
+
+ def __init__(self, message, lineno, name=None, filename=None):
+ TemplateError.__init__(self, message)
+ self.lineno = lineno
+ self.name = name
+ self.filename = filename
+ self.source = None
+
+ # this is set to True if the debug.translate_syntax_error
+ # function translated the syntax error into a new traceback
+ self.translated = False
+
+ def __str__(self):
+ # for translated errors we only return the message
+ if self.translated:
+ return self.message
+
+ # otherwise attach some stuff
+ location = 'line %d' % self.lineno
+ name = self.filename or self.name
+ if name:
+ location = 'File "%s", %s' % (name, location)
+ lines = [self.message, ' ' + location]
+
+ # if the source is set, add the line to the output
+ if self.source is not None:
+ try:
+ line = self.source.splitlines()[self.lineno - 1]
+ except IndexError:
+ line = None
+ if line:
+ lines.append(' ' + line.strip())
+
+ return u'\n'.join(lines)
+
+
+class TemplateAssertionError(TemplateSyntaxError):
+ """Like a template syntax error, but covers cases where something in the
+ template caused an error at compile time that wasn't necessarily caused
+ by a syntax error. However it's a direct subclass of
+ :exc:`TemplateSyntaxError` and has the same attributes.
+ """
+
+
+class TemplateRuntimeError(TemplateError):
+ """A generic runtime error in the template engine. Under some situations
+ Jinja may raise this exception.
+ """
+
+
+class UndefinedError(TemplateRuntimeError):
+ """Raised if a template tries to operate on :class:`Undefined`."""
+
+
+class SecurityError(TemplateRuntimeError):
+ """Raised if a template tries to do something insecure if the
+ sandbox is enabled.
+ """
+
+
+class FilterArgumentError(TemplateRuntimeError):
+ """This error is raised if a filter was called with inappropriate
+ arguments
+ """
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/jinja2/exceptions.pyc b/Assignments/microblog/flask/lib/python2.7/site-packages/jinja2/exceptions.pyc
new file mode 100644
index 0000000..e4fbcf6
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/jinja2/exceptions.pyc differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/jinja2/ext.py b/Assignments/microblog/flask/lib/python2.7/site-packages/jinja2/ext.py
new file mode 100644
index 0000000..562ab50
--- /dev/null
+++ b/Assignments/microblog/flask/lib/python2.7/site-packages/jinja2/ext.py
@@ -0,0 +1,636 @@
+# -*- coding: utf-8 -*-
+"""
+ jinja2.ext
+ ~~~~~~~~~~
+
+ Jinja extensions allow to add custom tags similar to the way django custom
+ tags work. By default two example extensions exist: an i18n and a cache
+ extension.
+
+ :copyright: (c) 2010 by the Jinja Team.
+ :license: BSD.
+"""
+from jinja2 import nodes
+from jinja2.defaults import BLOCK_START_STRING, \
+ BLOCK_END_STRING, VARIABLE_START_STRING, VARIABLE_END_STRING, \
+ COMMENT_START_STRING, COMMENT_END_STRING, LINE_STATEMENT_PREFIX, \
+ LINE_COMMENT_PREFIX, TRIM_BLOCKS, NEWLINE_SEQUENCE, \
+ KEEP_TRAILING_NEWLINE, LSTRIP_BLOCKS
+from jinja2.environment import Environment
+from jinja2.runtime import concat
+from jinja2.exceptions import TemplateAssertionError, TemplateSyntaxError
+from jinja2.utils import contextfunction, import_string, Markup
+from jinja2._compat import with_metaclass, string_types, iteritems
+
+
+# the only real useful gettext functions for a Jinja template. Note
+# that ugettext must be assigned to gettext as Jinja doesn't support
+# non unicode strings.
+GETTEXT_FUNCTIONS = ('_', 'gettext', 'ngettext')
+
+
+class ExtensionRegistry(type):
+ """Gives the extension an unique identifier."""
+
+ def __new__(cls, name, bases, d):
+ rv = type.__new__(cls, name, bases, d)
+ rv.identifier = rv.__module__ + '.' + rv.__name__
+ return rv
+
+
+class Extension(with_metaclass(ExtensionRegistry, object)):
+ """Extensions can be used to add extra functionality to the Jinja template
+ system at the parser level. Custom extensions are bound to an environment
+ but may not store environment specific data on `self`. The reason for
+ this is that an extension can be bound to another environment (for
+ overlays) by creating a copy and reassigning the `environment` attribute.
+
+ As extensions are created by the environment they cannot accept any
+ arguments for configuration. One may want to work around that by using
+ a factory function, but that is not possible as extensions are identified
+ by their import name. The correct way to configure the extension is
+ storing the configuration values on the environment. Because this way the
+ environment ends up acting as central configuration storage the
+ attributes may clash which is why extensions have to ensure that the names
+ they choose for configuration are not too generic. ``prefix`` for example
+ is a terrible name, ``fragment_cache_prefix`` on the other hand is a good
+ name as includes the name of the extension (fragment cache).
+ """
+
+ #: if this extension parses this is the list of tags it's listening to.
+ tags = set()
+
+ #: the priority of that extension. This is especially useful for
+ #: extensions that preprocess values. A lower value means higher
+ #: priority.
+ #:
+ #: .. versionadded:: 2.4
+ priority = 100
+
+ def __init__(self, environment):
+ self.environment = environment
+
+ def bind(self, environment):
+ """Create a copy of this extension bound to another environment."""
+ rv = object.__new__(self.__class__)
+ rv.__dict__.update(self.__dict__)
+ rv.environment = environment
+ return rv
+
+ def preprocess(self, source, name, filename=None):
+ """This method is called before the actual lexing and can be used to
+ preprocess the source. The `filename` is optional. The return value
+ must be the preprocessed source.
+ """
+ return source
+
+ def filter_stream(self, stream):
+ """It's passed a :class:`~jinja2.lexer.TokenStream` that can be used
+ to filter tokens returned. This method has to return an iterable of
+ :class:`~jinja2.lexer.Token`\s, but it doesn't have to return a
+ :class:`~jinja2.lexer.TokenStream`.
+
+ In the `ext` folder of the Jinja2 source distribution there is a file
+ called `inlinegettext.py` which implements a filter that utilizes this
+ method.
+ """
+ return stream
+
+ def parse(self, parser):
+ """If any of the :attr:`tags` matched this method is called with the
+ parser as first argument. The token the parser stream is pointing at
+ is the name token that matched. This method has to return one or a
+ list of multiple nodes.
+ """
+ raise NotImplementedError()
+
+ def attr(self, name, lineno=None):
+ """Return an attribute node for the current extension. This is useful
+ to pass constants on extensions to generated template code.
+
+ ::
+
+ self.attr('_my_attribute', lineno=lineno)
+ """
+ return nodes.ExtensionAttribute(self.identifier, name, lineno=lineno)
+
+ def call_method(self, name, args=None, kwargs=None, dyn_args=None,
+ dyn_kwargs=None, lineno=None):
+ """Call a method of the extension. This is a shortcut for
+ :meth:`attr` + :class:`jinja2.nodes.Call`.
+ """
+ if args is None:
+ args = []
+ if kwargs is None:
+ kwargs = []
+ return nodes.Call(self.attr(name, lineno=lineno), args, kwargs,
+ dyn_args, dyn_kwargs, lineno=lineno)
+
+
+@contextfunction
+def _gettext_alias(__context, *args, **kwargs):
+ return __context.call(__context.resolve('gettext'), *args, **kwargs)
+
+
+def _make_new_gettext(func):
+ @contextfunction
+ def gettext(__context, __string, **variables):
+ rv = __context.call(func, __string)
+ if __context.eval_ctx.autoescape:
+ rv = Markup(rv)
+ return rv % variables
+ return gettext
+
+
+def _make_new_ngettext(func):
+ @contextfunction
+ def ngettext(__context, __singular, __plural, __num, **variables):
+ variables.setdefault('num', __num)
+ rv = __context.call(func, __singular, __plural, __num)
+ if __context.eval_ctx.autoescape:
+ rv = Markup(rv)
+ return rv % variables
+ return ngettext
+
+
+class InternationalizationExtension(Extension):
+ """This extension adds gettext support to Jinja2."""
+ tags = set(['trans'])
+
+ # TODO: the i18n extension is currently reevaluating values in a few
+ # situations. Take this example:
+ # {% trans count=something() %}{{ count }} foo{% pluralize
+ # %}{{ count }} fooss{% endtrans %}
+ # something is called twice here. One time for the gettext value and
+ # the other time for the n-parameter of the ngettext function.
+
+ def __init__(self, environment):
+ Extension.__init__(self, environment)
+ environment.globals['_'] = _gettext_alias
+ environment.extend(
+ install_gettext_translations=self._install,
+ install_null_translations=self._install_null,
+ install_gettext_callables=self._install_callables,
+ uninstall_gettext_translations=self._uninstall,
+ extract_translations=self._extract,
+ newstyle_gettext=False
+ )
+
+ def _install(self, translations, newstyle=None):
+ gettext = getattr(translations, 'ugettext', None)
+ if gettext is None:
+ gettext = translations.gettext
+ ngettext = getattr(translations, 'ungettext', None)
+ if ngettext is None:
+ ngettext = translations.ngettext
+ self._install_callables(gettext, ngettext, newstyle)
+
+ def _install_null(self, newstyle=None):
+ self._install_callables(
+ lambda x: x,
+ lambda s, p, n: (n != 1 and (p,) or (s,))[0],
+ newstyle
+ )
+
+ def _install_callables(self, gettext, ngettext, newstyle=None):
+ if newstyle is not None:
+ self.environment.newstyle_gettext = newstyle
+ if self.environment.newstyle_gettext:
+ gettext = _make_new_gettext(gettext)
+ ngettext = _make_new_ngettext(ngettext)
+ self.environment.globals.update(
+ gettext=gettext,
+ ngettext=ngettext
+ )
+
+ def _uninstall(self, translations):
+ for key in 'gettext', 'ngettext':
+ self.environment.globals.pop(key, None)
+
+ def _extract(self, source, gettext_functions=GETTEXT_FUNCTIONS):
+ if isinstance(source, string_types):
+ source = self.environment.parse(source)
+ return extract_from_ast(source, gettext_functions)
+
+ def parse(self, parser):
+ """Parse a translatable tag."""
+ lineno = next(parser.stream).lineno
+ num_called_num = False
+
+ # find all the variables referenced. Additionally a variable can be
+ # defined in the body of the trans block too, but this is checked at
+ # a later state.
+ plural_expr = None
+ plural_expr_assignment = None
+ variables = {}
+ while parser.stream.current.type != 'block_end':
+ if variables:
+ parser.stream.expect('comma')
+
+ # skip colon for python compatibility
+ if parser.stream.skip_if('colon'):
+ break
+
+ name = parser.stream.expect('name')
+ if name.value in variables:
+ parser.fail('translatable variable %r defined twice.' %
+ name.value, name.lineno,
+ exc=TemplateAssertionError)
+
+ # expressions
+ if parser.stream.current.type == 'assign':
+ next(parser.stream)
+ variables[name.value] = var = parser.parse_expression()
+ else:
+ variables[name.value] = var = nodes.Name(name.value, 'load')
+
+ if plural_expr is None:
+ if isinstance(var, nodes.Call):
+ plural_expr = nodes.Name('_trans', 'load')
+ variables[name.value] = plural_expr
+ plural_expr_assignment = nodes.Assign(
+ nodes.Name('_trans', 'store'), var)
+ else:
+ plural_expr = var
+ num_called_num = name.value == 'num'
+
+ parser.stream.expect('block_end')
+
+ plural = plural_names = None
+ have_plural = False
+ referenced = set()
+
+ # now parse until endtrans or pluralize
+ singular_names, singular = self._parse_block(parser, True)
+ if singular_names:
+ referenced.update(singular_names)
+ if plural_expr is None:
+ plural_expr = nodes.Name(singular_names[0], 'load')
+ num_called_num = singular_names[0] == 'num'
+
+ # if we have a pluralize block, we parse that too
+ if parser.stream.current.test('name:pluralize'):
+ have_plural = True
+ next(parser.stream)
+ if parser.stream.current.type != 'block_end':
+ name = parser.stream.expect('name')
+ if name.value not in variables:
+ parser.fail('unknown variable %r for pluralization' %
+ name.value, name.lineno,
+ exc=TemplateAssertionError)
+ plural_expr = variables[name.value]
+ num_called_num = name.value == 'num'
+ parser.stream.expect('block_end')
+ plural_names, plural = self._parse_block(parser, False)
+ next(parser.stream)
+ referenced.update(plural_names)
+ else:
+ next(parser.stream)
+
+ # register free names as simple name expressions
+ for var in referenced:
+ if var not in variables:
+ variables[var] = nodes.Name(var, 'load')
+
+ if not have_plural:
+ plural_expr = None
+ elif plural_expr is None:
+ parser.fail('pluralize without variables', lineno)
+
+ node = self._make_node(singular, plural, variables, plural_expr,
+ bool(referenced),
+ num_called_num and have_plural)
+ node.set_lineno(lineno)
+ if plural_expr_assignment is not None:
+ return [plural_expr_assignment, node]
+ else:
+ return node
+
+ def _parse_block(self, parser, allow_pluralize):
+ """Parse until the next block tag with a given name."""
+ referenced = []
+ buf = []
+ while 1:
+ if parser.stream.current.type == 'data':
+ buf.append(parser.stream.current.value.replace('%', '%%'))
+ next(parser.stream)
+ elif parser.stream.current.type == 'variable_begin':
+ next(parser.stream)
+ name = parser.stream.expect('name').value
+ referenced.append(name)
+ buf.append('%%(%s)s' % name)
+ parser.stream.expect('variable_end')
+ elif parser.stream.current.type == 'block_begin':
+ next(parser.stream)
+ if parser.stream.current.test('name:endtrans'):
+ break
+ elif parser.stream.current.test('name:pluralize'):
+ if allow_pluralize:
+ break
+ parser.fail('a translatable section can have only one '
+ 'pluralize section')
+ parser.fail('control structures in translatable sections are '
+ 'not allowed')
+ elif parser.stream.eos:
+ parser.fail('unclosed translation block')
+ else:
+ assert False, 'internal parser error'
+
+ return referenced, concat(buf)
+
+ def _make_node(self, singular, plural, variables, plural_expr,
+ vars_referenced, num_called_num):
+ """Generates a useful node from the data provided."""
+ # no variables referenced? no need to escape for old style
+ # gettext invocations only if there are vars.
+ if not vars_referenced and not self.environment.newstyle_gettext:
+ singular = singular.replace('%%', '%')
+ if plural:
+ plural = plural.replace('%%', '%')
+
+ # singular only:
+ if plural_expr is None:
+ gettext = nodes.Name('gettext', 'load')
+ node = nodes.Call(gettext, [nodes.Const(singular)],
+ [], None, None)
+
+ # singular and plural
+ else:
+ ngettext = nodes.Name('ngettext', 'load')
+ node = nodes.Call(ngettext, [
+ nodes.Const(singular),
+ nodes.Const(plural),
+ plural_expr
+ ], [], None, None)
+
+ # in case newstyle gettext is used, the method is powerful
+ # enough to handle the variable expansion and autoescape
+ # handling itself
+ if self.environment.newstyle_gettext:
+ for key, value in iteritems(variables):
+ # the function adds that later anyways in case num was
+ # called num, so just skip it.
+ if num_called_num and key == 'num':
+ continue
+ node.kwargs.append(nodes.Keyword(key, value))
+
+ # otherwise do that here
+ else:
+ # mark the return value as safe if we are in an
+ # environment with autoescaping turned on
+ node = nodes.MarkSafeIfAutoescape(node)
+ if variables:
+ node = nodes.Mod(node, nodes.Dict([
+ nodes.Pair(nodes.Const(key), value)
+ for key, value in variables.items()
+ ]))
+ return nodes.Output([node])
+
+
+class ExprStmtExtension(Extension):
+ """Adds a `do` tag to Jinja2 that works like the print statement just
+ that it doesn't print the return value.
+ """
+ tags = set(['do'])
+
+ def parse(self, parser):
+ node = nodes.ExprStmt(lineno=next(parser.stream).lineno)
+ node.node = parser.parse_tuple()
+ return node
+
+
+class LoopControlExtension(Extension):
+ """Adds break and continue to the template engine."""
+ tags = set(['break', 'continue'])
+
+ def parse(self, parser):
+ token = next(parser.stream)
+ if token.value == 'break':
+ return nodes.Break(lineno=token.lineno)
+ return nodes.Continue(lineno=token.lineno)
+
+
+class WithExtension(Extension):
+ """Adds support for a django-like with block."""
+ tags = set(['with'])
+
+ def parse(self, parser):
+ node = nodes.Scope(lineno=next(parser.stream).lineno)
+ assignments = []
+ while parser.stream.current.type != 'block_end':
+ lineno = parser.stream.current.lineno
+ if assignments:
+ parser.stream.expect('comma')
+ target = parser.parse_assign_target()
+ parser.stream.expect('assign')
+ expr = parser.parse_expression()
+ assignments.append(nodes.Assign(target, expr, lineno=lineno))
+ node.body = assignments + \
+ list(parser.parse_statements(('name:endwith',),
+ drop_needle=True))
+ return node
+
+
+class AutoEscapeExtension(Extension):
+ """Changes auto escape rules for a scope."""
+ tags = set(['autoescape'])
+
+ def parse(self, parser):
+ node = nodes.ScopedEvalContextModifier(lineno=next(parser.stream).lineno)
+ node.options = [
+ nodes.Keyword('autoescape', parser.parse_expression())
+ ]
+ node.body = parser.parse_statements(('name:endautoescape',),
+ drop_needle=True)
+ return nodes.Scope([node])
+
+
+def extract_from_ast(node, gettext_functions=GETTEXT_FUNCTIONS,
+ babel_style=True):
+ """Extract localizable strings from the given template node. Per
+ default this function returns matches in babel style that means non string
+ parameters as well as keyword arguments are returned as `None`. This
+ allows Babel to figure out what you really meant if you are using
+ gettext functions that allow keyword arguments for placeholder expansion.
+ If you don't want that behavior set the `babel_style` parameter to `False`
+ which causes only strings to be returned and parameters are always stored
+ in tuples. As a consequence invalid gettext calls (calls without a single
+ string parameter or string parameters after non-string parameters) are
+ skipped.
+
+ This example explains the behavior:
+
+ >>> from jinja2 import Environment
+ >>> env = Environment()
+ >>> node = env.parse('{{ (_("foo"), _(), ngettext("foo", "bar", 42)) }}')
+ >>> list(extract_from_ast(node))
+ [(1, '_', 'foo'), (1, '_', ()), (1, 'ngettext', ('foo', 'bar', None))]
+ >>> list(extract_from_ast(node, babel_style=False))
+ [(1, '_', ('foo',)), (1, 'ngettext', ('foo', 'bar'))]
+
+ For every string found this function yields a ``(lineno, function,
+ message)`` tuple, where:
+
+ * ``lineno`` is the number of the line on which the string was found,
+ * ``function`` is the name of the ``gettext`` function used (if the
+ string was extracted from embedded Python code), and
+ * ``message`` is the string itself (a ``unicode`` object, or a tuple
+ of ``unicode`` objects for functions with multiple string arguments).
+
+ This extraction function operates on the AST and is because of that unable
+ to extract any comments. For comment support you have to use the babel
+ extraction interface or extract comments yourself.
+ """
+ for node in node.find_all(nodes.Call):
+ if not isinstance(node.node, nodes.Name) or \
+ node.node.name not in gettext_functions:
+ continue
+
+ strings = []
+ for arg in node.args:
+ if isinstance(arg, nodes.Const) and \
+ isinstance(arg.value, string_types):
+ strings.append(arg.value)
+ else:
+ strings.append(None)
+
+ for arg in node.kwargs:
+ strings.append(None)
+ if node.dyn_args is not None:
+ strings.append(None)
+ if node.dyn_kwargs is not None:
+ strings.append(None)
+
+ if not babel_style:
+ strings = tuple(x for x in strings if x is not None)
+ if not strings:
+ continue
+ else:
+ if len(strings) == 1:
+ strings = strings[0]
+ else:
+ strings = tuple(strings)
+ yield node.lineno, node.node.name, strings
+
+
+class _CommentFinder(object):
+ """Helper class to find comments in a token stream. Can only
+ find comments for gettext calls forwards. Once the comment
+ from line 4 is found, a comment for line 1 will not return a
+ usable value.
+ """
+
+ def __init__(self, tokens, comment_tags):
+ self.tokens = tokens
+ self.comment_tags = comment_tags
+ self.offset = 0
+ self.last_lineno = 0
+
+ def find_backwards(self, offset):
+ try:
+ for _, token_type, token_value in \
+ reversed(self.tokens[self.offset:offset]):
+ if token_type in ('comment', 'linecomment'):
+ try:
+ prefix, comment = token_value.split(None, 1)
+ except ValueError:
+ continue
+ if prefix in self.comment_tags:
+ return [comment.rstrip()]
+ return []
+ finally:
+ self.offset = offset
+
+ def find_comments(self, lineno):
+ if not self.comment_tags or self.last_lineno > lineno:
+ return []
+ for idx, (token_lineno, _, _) in enumerate(self.tokens[self.offset:]):
+ if token_lineno > lineno:
+ return self.find_backwards(self.offset + idx)
+ return self.find_backwards(len(self.tokens))
+
+
+def babel_extract(fileobj, keywords, comment_tags, options):
+ """Babel extraction method for Jinja templates.
+
+ .. versionchanged:: 2.3
+ Basic support for translation comments was added. If `comment_tags`
+ is now set to a list of keywords for extraction, the extractor will
+ try to find the best preceeding comment that begins with one of the
+ keywords. For best results, make sure to not have more than one
+ gettext call in one line of code and the matching comment in the
+ same line or the line before.
+
+ .. versionchanged:: 2.5.1
+ The `newstyle_gettext` flag can be set to `True` to enable newstyle
+ gettext calls.
+
+ .. versionchanged:: 2.7
+ A `silent` option can now be provided. If set to `False` template
+ syntax errors are propagated instead of being ignored.
+
+ :param fileobj: the file-like object the messages should be extracted from
+ :param keywords: a list of keywords (i.e. function names) that should be
+ recognized as translation functions
+ :param comment_tags: a list of translator tags to search for and include
+ in the results.
+ :param options: a dictionary of additional options (optional)
+ :return: an iterator over ``(lineno, funcname, message, comments)`` tuples.
+ (comments will be empty currently)
+ """
+ extensions = set()
+ for extension in options.get('extensions', '').split(','):
+ extension = extension.strip()
+ if not extension:
+ continue
+ extensions.add(import_string(extension))
+ if InternationalizationExtension not in extensions:
+ extensions.add(InternationalizationExtension)
+
+ def getbool(options, key, default=False):
+ return options.get(key, str(default)).lower() in \
+ ('1', 'on', 'yes', 'true')
+
+ silent = getbool(options, 'silent', True)
+ environment = Environment(
+ options.get('block_start_string', BLOCK_START_STRING),
+ options.get('block_end_string', BLOCK_END_STRING),
+ options.get('variable_start_string', VARIABLE_START_STRING),
+ options.get('variable_end_string', VARIABLE_END_STRING),
+ options.get('comment_start_string', COMMENT_START_STRING),
+ options.get('comment_end_string', COMMENT_END_STRING),
+ options.get('line_statement_prefix') or LINE_STATEMENT_PREFIX,
+ options.get('line_comment_prefix') or LINE_COMMENT_PREFIX,
+ getbool(options, 'trim_blocks', TRIM_BLOCKS),
+ getbool(options, 'lstrip_blocks', LSTRIP_BLOCKS),
+ NEWLINE_SEQUENCE,
+ getbool(options, 'keep_trailing_newline', KEEP_TRAILING_NEWLINE),
+ frozenset(extensions),
+ cache_size=0,
+ auto_reload=False
+ )
+
+ if getbool(options, 'newstyle_gettext'):
+ environment.newstyle_gettext = True
+
+ source = fileobj.read().decode(options.get('encoding', 'utf-8'))
+ try:
+ node = environment.parse(source)
+ tokens = list(environment.lex(environment.preprocess(source)))
+ except TemplateSyntaxError as e:
+ if not silent:
+ raise
+ # skip templates with syntax errors
+ return
+
+ finder = _CommentFinder(tokens, comment_tags)
+ for lineno, func, message in extract_from_ast(node, keywords):
+ yield lineno, func, message, finder.find_comments(lineno)
+
+
+#: nicer import names
+i18n = InternationalizationExtension
+do = ExprStmtExtension
+loopcontrols = LoopControlExtension
+with_ = WithExtension
+autoescape = AutoEscapeExtension
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/jinja2/ext.pyc b/Assignments/microblog/flask/lib/python2.7/site-packages/jinja2/ext.pyc
new file mode 100644
index 0000000..b81fed6
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/jinja2/ext.pyc differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/jinja2/filters.py b/Assignments/microblog/flask/lib/python2.7/site-packages/jinja2/filters.py
new file mode 100644
index 0000000..e5c7a1a
--- /dev/null
+++ b/Assignments/microblog/flask/lib/python2.7/site-packages/jinja2/filters.py
@@ -0,0 +1,996 @@
+# -*- coding: utf-8 -*-
+"""
+ jinja2.filters
+ ~~~~~~~~~~~~~~
+
+ Bundled jinja filters.
+
+ :copyright: (c) 2010 by the Jinja Team.
+ :license: BSD, see LICENSE for more details.
+"""
+import re
+import math
+
+from random import choice
+from operator import itemgetter
+from itertools import groupby
+from jinja2.utils import Markup, escape, pformat, urlize, soft_unicode, \
+ unicode_urlencode
+from jinja2.runtime import Undefined
+from jinja2.exceptions import FilterArgumentError
+from jinja2._compat import imap, string_types, text_type, iteritems
+
+
+_word_re = re.compile(r'\w+(?u)')
+
+
+def contextfilter(f):
+ """Decorator for marking context dependent filters. The current
+ :class:`Context` will be passed as first argument.
+ """
+ f.contextfilter = True
+ return f
+
+
+def evalcontextfilter(f):
+ """Decorator for marking eval-context dependent filters. An eval
+ context object is passed as first argument. For more information
+ about the eval context, see :ref:`eval-context`.
+
+ .. versionadded:: 2.4
+ """
+ f.evalcontextfilter = True
+ return f
+
+
+def environmentfilter(f):
+ """Decorator for marking evironment dependent filters. The current
+ :class:`Environment` is passed to the filter as first argument.
+ """
+ f.environmentfilter = True
+ return f
+
+
+def make_attrgetter(environment, attribute):
+ """Returns a callable that looks up the given attribute from a
+ passed object with the rules of the environment. Dots are allowed
+ to access attributes of attributes. Integer parts in paths are
+ looked up as integers.
+ """
+ if not isinstance(attribute, string_types) \
+ or ('.' not in attribute and not attribute.isdigit()):
+ return lambda x: environment.getitem(x, attribute)
+ attribute = attribute.split('.')
+ def attrgetter(item):
+ for part in attribute:
+ if part.isdigit():
+ part = int(part)
+ item = environment.getitem(item, part)
+ return item
+ return attrgetter
+
+
+def do_forceescape(value):
+ """Enforce HTML escaping. This will probably double escape variables."""
+ if hasattr(value, '__html__'):
+ value = value.__html__()
+ return escape(text_type(value))
+
+
+def do_urlencode(value):
+ """Escape strings for use in URLs (uses UTF-8 encoding). It accepts both
+ dictionaries and regular strings as well as pairwise iterables.
+
+ .. versionadded:: 2.7
+ """
+ itemiter = None
+ if isinstance(value, dict):
+ itemiter = iteritems(value)
+ elif not isinstance(value, string_types):
+ try:
+ itemiter = iter(value)
+ except TypeError:
+ pass
+ if itemiter is None:
+ return unicode_urlencode(value)
+ return u'&'.join(unicode_urlencode(k) + '=' +
+ unicode_urlencode(v, for_qs=True)
+ for k, v in itemiter)
+
+
+@evalcontextfilter
+def do_replace(eval_ctx, s, old, new, count=None):
+ """Return a copy of the value with all occurrences of a substring
+ replaced with a new one. The first argument is the substring
+ that should be replaced, the second is the replacement string.
+ If the optional third argument ``count`` is given, only the first
+ ``count`` occurrences are replaced:
+
+ .. sourcecode:: jinja
+
+ {{ "Hello World"|replace("Hello", "Goodbye") }}
+ -> Goodbye World
+
+ {{ "aaaaargh"|replace("a", "d'oh, ", 2) }}
+ -> d'oh, d'oh, aaargh
+ """
+ if count is None:
+ count = -1
+ if not eval_ctx.autoescape:
+ return text_type(s).replace(text_type(old), text_type(new), count)
+ if hasattr(old, '__html__') or hasattr(new, '__html__') and \
+ not hasattr(s, '__html__'):
+ s = escape(s)
+ else:
+ s = soft_unicode(s)
+ return s.replace(soft_unicode(old), soft_unicode(new), count)
+
+
+def do_upper(s):
+ """Convert a value to uppercase."""
+ return soft_unicode(s).upper()
+
+
+def do_lower(s):
+ """Convert a value to lowercase."""
+ return soft_unicode(s).lower()
+
+
+@evalcontextfilter
+def do_xmlattr(_eval_ctx, d, autospace=True):
+ """Create an SGML/XML attribute string based on the items in a dict.
+ All values that are neither `none` nor `undefined` are automatically
+ escaped:
+
+ .. sourcecode:: html+jinja
+
+
+
+ Results in something like this:
+
+ .. sourcecode:: html
+
+
+
+ As you can see it automatically prepends a space in front of the item
+ if the filter returned something unless the second parameter is false.
+ """
+ rv = u' '.join(
+ u'%s="%s"' % (escape(key), escape(value))
+ for key, value in iteritems(d)
+ if value is not None and not isinstance(value, Undefined)
+ )
+ if autospace and rv:
+ rv = u' ' + rv
+ if _eval_ctx.autoescape:
+ rv = Markup(rv)
+ return rv
+
+
+def do_capitalize(s):
+ """Capitalize a value. The first character will be uppercase, all others
+ lowercase.
+ """
+ return soft_unicode(s).capitalize()
+
+
+def do_title(s):
+ """Return a titlecased version of the value. I.e. words will start with
+ uppercase letters, all remaining characters are lowercase.
+ """
+ rv = []
+ for item in re.compile(r'([-\s]+)(?u)').split(soft_unicode(s)):
+ if not item:
+ continue
+ rv.append(item[0].upper() + item[1:].lower())
+ return ''.join(rv)
+
+
+def do_dictsort(value, case_sensitive=False, by='key'):
+ """Sort a dict and yield (key, value) pairs. Because python dicts are
+ unsorted you may want to use this function to order them by either
+ key or value:
+
+ .. sourcecode:: jinja
+
+ {% for item in mydict|dictsort %}
+ sort the dict by key, case insensitive
+
+ {% for item in mydict|dictsort(true) %}
+ sort the dict by key, case sensitive
+
+ {% for item in mydict|dictsort(false, 'value') %}
+ sort the dict by value, case insensitive
+ """
+ if by == 'key':
+ pos = 0
+ elif by == 'value':
+ pos = 1
+ else:
+ raise FilterArgumentError('You can only sort by either '
+ '"key" or "value"')
+ def sort_func(item):
+ value = item[pos]
+ if isinstance(value, string_types) and not case_sensitive:
+ value = value.lower()
+ return value
+
+ return sorted(value.items(), key=sort_func)
+
+
+@environmentfilter
+def do_sort(environment, value, reverse=False, case_sensitive=False,
+ attribute=None):
+ """Sort an iterable. Per default it sorts ascending, if you pass it
+ true as first argument it will reverse the sorting.
+
+ If the iterable is made of strings the third parameter can be used to
+ control the case sensitiveness of the comparison which is disabled by
+ default.
+
+ .. sourcecode:: jinja
+
+ {% for item in iterable|sort %}
+ ...
+ {% endfor %}
+
+ It is also possible to sort by an attribute (for example to sort
+ by the date of an object) by specifying the `attribute` parameter:
+
+ .. sourcecode:: jinja
+
+ {% for item in iterable|sort(attribute='date') %}
+ ...
+ {% endfor %}
+
+ .. versionchanged:: 2.6
+ The `attribute` parameter was added.
+ """
+ if not case_sensitive:
+ def sort_func(item):
+ if isinstance(item, string_types):
+ item = item.lower()
+ return item
+ else:
+ sort_func = None
+ if attribute is not None:
+ getter = make_attrgetter(environment, attribute)
+ def sort_func(item, processor=sort_func or (lambda x: x)):
+ return processor(getter(item))
+ return sorted(value, key=sort_func, reverse=reverse)
+
+
+def do_default(value, default_value=u'', boolean=False):
+ """If the value is undefined it will return the passed default value,
+ otherwise the value of the variable:
+
+ .. sourcecode:: jinja
+
+ {{ my_variable|default('my_variable is not defined') }}
+
+ This will output the value of ``my_variable`` if the variable was
+ defined, otherwise ``'my_variable is not defined'``. If you want
+ to use default with variables that evaluate to false you have to
+ set the second parameter to `true`:
+
+ .. sourcecode:: jinja
+
+ {{ ''|default('the string was empty', true) }}
+ """
+ if isinstance(value, Undefined) or (boolean and not value):
+ return default_value
+ return value
+
+
+@evalcontextfilter
+def do_join(eval_ctx, value, d=u'', attribute=None):
+ """Return a string which is the concatenation of the strings in the
+ sequence. The separator between elements is an empty string per
+ default, you can define it with the optional parameter:
+
+ .. sourcecode:: jinja
+
+ {{ [1, 2, 3]|join('|') }}
+ -> 1|2|3
+
+ {{ [1, 2, 3]|join }}
+ -> 123
+
+ It is also possible to join certain attributes of an object:
+
+ .. sourcecode:: jinja
+
+ {{ users|join(', ', attribute='username') }}
+
+ .. versionadded:: 2.6
+ The `attribute` parameter was added.
+ """
+ if attribute is not None:
+ value = imap(make_attrgetter(eval_ctx.environment, attribute), value)
+
+ # no automatic escaping? joining is a lot eaiser then
+ if not eval_ctx.autoescape:
+ return text_type(d).join(imap(text_type, value))
+
+ # if the delimiter doesn't have an html representation we check
+ # if any of the items has. If yes we do a coercion to Markup
+ if not hasattr(d, '__html__'):
+ value = list(value)
+ do_escape = False
+ for idx, item in enumerate(value):
+ if hasattr(item, '__html__'):
+ do_escape = True
+ else:
+ value[idx] = text_type(item)
+ if do_escape:
+ d = escape(d)
+ else:
+ d = text_type(d)
+ return d.join(value)
+
+ # no html involved, to normal joining
+ return soft_unicode(d).join(imap(soft_unicode, value))
+
+
+def do_center(value, width=80):
+ """Centers the value in a field of a given width."""
+ return text_type(value).center(width)
+
+
+@environmentfilter
+def do_first(environment, seq):
+ """Return the first item of a sequence."""
+ try:
+ return next(iter(seq))
+ except StopIteration:
+ return environment.undefined('No first item, sequence was empty.')
+
+
+@environmentfilter
+def do_last(environment, seq):
+ """Return the last item of a sequence."""
+ try:
+ return next(iter(reversed(seq)))
+ except StopIteration:
+ return environment.undefined('No last item, sequence was empty.')
+
+
+@environmentfilter
+def do_random(environment, seq):
+ """Return a random item from the sequence."""
+ try:
+ return choice(seq)
+ except IndexError:
+ return environment.undefined('No random item, sequence was empty.')
+
+
+def do_filesizeformat(value, binary=False):
+ """Format the value like a 'human-readable' file size (i.e. 13 kB,
+ 4.1 MB, 102 Bytes, etc). Per default decimal prefixes are used (Mega,
+ Giga, etc.), if the second parameter is set to `True` the binary
+ prefixes are used (Mebi, Gibi).
+ """
+ bytes = float(value)
+ base = binary and 1024 or 1000
+ prefixes = [
+ (binary and 'KiB' or 'kB'),
+ (binary and 'MiB' or 'MB'),
+ (binary and 'GiB' or 'GB'),
+ (binary and 'TiB' or 'TB'),
+ (binary and 'PiB' or 'PB'),
+ (binary and 'EiB' or 'EB'),
+ (binary and 'ZiB' or 'ZB'),
+ (binary and 'YiB' or 'YB')
+ ]
+ if bytes == 1:
+ return '1 Byte'
+ elif bytes < base:
+ return '%d Bytes' % bytes
+ else:
+ for i, prefix in enumerate(prefixes):
+ unit = base ** (i + 2)
+ if bytes < unit:
+ return '%.1f %s' % ((base * bytes / unit), prefix)
+ return '%.1f %s' % ((base * bytes / unit), prefix)
+
+
+def do_pprint(value, verbose=False):
+ """Pretty print a variable. Useful for debugging.
+
+ With Jinja 1.2 onwards you can pass it a parameter. If this parameter
+ is truthy the output will be more verbose (this requires `pretty`)
+ """
+ return pformat(value, verbose=verbose)
+
+
+@evalcontextfilter
+def do_urlize(eval_ctx, value, trim_url_limit=None, nofollow=False,
+ target=None):
+ """Converts URLs in plain text into clickable links.
+
+ If you pass the filter an additional integer it will shorten the urls
+ to that number. Also a third argument exists that makes the urls
+ "nofollow":
+
+ .. sourcecode:: jinja
+
+ {{ mytext|urlize(40, true) }}
+ links are shortened to 40 chars and defined with rel="nofollow"
+
+ If *target* is specified, the ``target`` attribute will be added to the
+ ```` tag:
+
+ .. sourcecode:: jinja
+
+ {{ mytext|urlize(40, target='_blank') }}
+
+ .. versionchanged:: 2.8+
+ The *target* parameter was added.
+ """
+ rv = urlize(value, trim_url_limit, nofollow, target)
+ if eval_ctx.autoescape:
+ rv = Markup(rv)
+ return rv
+
+
+def do_indent(s, width=4, indentfirst=False):
+ """Return a copy of the passed string, each line indented by
+ 4 spaces. The first line is not indented. If you want to
+ change the number of spaces or indent the first line too
+ you can pass additional parameters to the filter:
+
+ .. sourcecode:: jinja
+
+ {{ mytext|indent(2, true) }}
+ indent by two spaces and indent the first line too.
+ """
+ indention = u' ' * width
+ rv = (u'\n' + indention).join(s.splitlines())
+ if indentfirst:
+ rv = indention + rv
+ return rv
+
+
+def do_truncate(s, length=255, killwords=False, end='...'):
+ """Return a truncated copy of the string. The length is specified
+ with the first parameter which defaults to ``255``. If the second
+ parameter is ``true`` the filter will cut the text at length. Otherwise
+ it will discard the last word. If the text was in fact
+ truncated it will append an ellipsis sign (``"..."``). If you want a
+ different ellipsis sign than ``"..."`` you can specify it using the
+ third parameter.
+
+ .. sourcecode:: jinja
+
+ {{ "foo bar baz"|truncate(9) }}
+ -> "foo ..."
+ {{ "foo bar baz"|truncate(9, True) }}
+ -> "foo ba..."
+
+ """
+ if len(s) <= length:
+ return s
+ elif killwords:
+ return s[:length - len(end)] + end
+
+ result = s[:length - len(end)].rsplit(' ', 1)[0]
+ if len(result) < length:
+ result += ' '
+ return result + end
+
+
+@environmentfilter
+def do_wordwrap(environment, s, width=79, break_long_words=True,
+ wrapstring=None):
+ """
+ Return a copy of the string passed to the filter wrapped after
+ ``79`` characters. You can override this default using the first
+ parameter. If you set the second parameter to `false` Jinja will not
+ split words apart if they are longer than `width`. By default, the newlines
+ will be the default newlines for the environment, but this can be changed
+ using the wrapstring keyword argument.
+
+ .. versionadded:: 2.7
+ Added support for the `wrapstring` parameter.
+ """
+ if not wrapstring:
+ wrapstring = environment.newline_sequence
+ import textwrap
+ return wrapstring.join(textwrap.wrap(s, width=width, expand_tabs=False,
+ replace_whitespace=False,
+ break_long_words=break_long_words))
+
+
+def do_wordcount(s):
+ """Count the words in that string."""
+ return len(_word_re.findall(s))
+
+
+def do_int(value, default=0, base=10):
+ """Convert the value into an integer. If the
+ conversion doesn't work it will return ``0``. You can
+ override this default using the first parameter. You
+ can also override the default base (10) in the second
+ parameter, which handles input with prefixes such as
+ 0b, 0o and 0x for bases 2, 8 and 16 respectively.
+ """
+ try:
+ return int(value, base)
+ except (TypeError, ValueError):
+ # this quirk is necessary so that "42.23"|int gives 42.
+ try:
+ return int(float(value))
+ except (TypeError, ValueError):
+ return default
+
+
+def do_float(value, default=0.0):
+ """Convert the value into a floating point number. If the
+ conversion doesn't work it will return ``0.0``. You can
+ override this default using the first parameter.
+ """
+ try:
+ return float(value)
+ except (TypeError, ValueError):
+ return default
+
+
+def do_format(value, *args, **kwargs):
+ """
+ Apply python string formatting on an object:
+
+ .. sourcecode:: jinja
+
+ {{ "%s - %s"|format("Hello?", "Foo!") }}
+ -> Hello? - Foo!
+ """
+ if args and kwargs:
+ raise FilterArgumentError('can\'t handle positional and keyword '
+ 'arguments at the same time')
+ return soft_unicode(value) % (kwargs or args)
+
+
+def do_trim(value):
+ """Strip leading and trailing whitespace."""
+ return soft_unicode(value).strip()
+
+
+def do_striptags(value):
+ """Strip SGML/XML tags and replace adjacent whitespace by one space.
+ """
+ if hasattr(value, '__html__'):
+ value = value.__html__()
+ return Markup(text_type(value)).striptags()
+
+
+def do_slice(value, slices, fill_with=None):
+ """Slice an iterator and return a list of lists containing
+ those items. Useful if you want to create a div containing
+ three ul tags that represent columns:
+
+ .. sourcecode:: html+jinja
+
+
+ {%- for column in items|slice(3) %}
+
+ {%- for item in column %}
+ - {{ item }}
+ {%- endfor %}
+
+ {%- endfor %}
+
+
+ If you pass it a second argument it's used to fill missing
+ values on the last iteration.
+ """
+ seq = list(value)
+ length = len(seq)
+ items_per_slice = length // slices
+ slices_with_extra = length % slices
+ offset = 0
+ for slice_number in range(slices):
+ start = offset + slice_number * items_per_slice
+ if slice_number < slices_with_extra:
+ offset += 1
+ end = offset + (slice_number + 1) * items_per_slice
+ tmp = seq[start:end]
+ if fill_with is not None and slice_number >= slices_with_extra:
+ tmp.append(fill_with)
+ yield tmp
+
+
+def do_batch(value, linecount, fill_with=None):
+ """
+ A filter that batches items. It works pretty much like `slice`
+ just the other way round. It returns a list of lists with the
+ given number of items. If you provide a second parameter this
+ is used to fill up missing items. See this example:
+
+ .. sourcecode:: html+jinja
+
+
+ {%- for row in items|batch(3, ' ') %}
+
+ {%- for column in row %}
+ | {{ column }} |
+ {%- endfor %}
+
+ {%- endfor %}
+
+ """
+ tmp = []
+ for item in value:
+ if len(tmp) == linecount:
+ yield tmp
+ tmp = []
+ tmp.append(item)
+ if tmp:
+ if fill_with is not None and len(tmp) < linecount:
+ tmp += [fill_with] * (linecount - len(tmp))
+ yield tmp
+
+
+def do_round(value, precision=0, method='common'):
+ """Round the number to a given precision. The first
+ parameter specifies the precision (default is ``0``), the
+ second the rounding method:
+
+ - ``'common'`` rounds either up or down
+ - ``'ceil'`` always rounds up
+ - ``'floor'`` always rounds down
+
+ If you don't specify a method ``'common'`` is used.
+
+ .. sourcecode:: jinja
+
+ {{ 42.55|round }}
+ -> 43.0
+ {{ 42.55|round(1, 'floor') }}
+ -> 42.5
+
+ Note that even if rounded to 0 precision, a float is returned. If
+ you need a real integer, pipe it through `int`:
+
+ .. sourcecode:: jinja
+
+ {{ 42.55|round|int }}
+ -> 43
+ """
+ if not method in ('common', 'ceil', 'floor'):
+ raise FilterArgumentError('method must be common, ceil or floor')
+ if method == 'common':
+ return round(value, precision)
+ func = getattr(math, method)
+ return func(value * (10 ** precision)) / (10 ** precision)
+
+
+@environmentfilter
+def do_groupby(environment, value, attribute):
+ """Group a sequence of objects by a common attribute.
+
+ If you for example have a list of dicts or objects that represent persons
+ with `gender`, `first_name` and `last_name` attributes and you want to
+ group all users by genders you can do something like the following
+ snippet:
+
+ .. sourcecode:: html+jinja
+
+
+ {% for group in persons|groupby('gender') %}
+ - {{ group.grouper }}
+ {% for person in group.list %}
+ - {{ person.first_name }} {{ person.last_name }}
+ {% endfor %}
+ {% endfor %}
+
+
+ Additionally it's possible to use tuple unpacking for the grouper and
+ list:
+
+ .. sourcecode:: html+jinja
+
+
+ {% for grouper, list in persons|groupby('gender') %}
+ ...
+ {% endfor %}
+
+
+ As you can see the item we're grouping by is stored in the `grouper`
+ attribute and the `list` contains all the objects that have this grouper
+ in common.
+
+ .. versionchanged:: 2.6
+ It's now possible to use dotted notation to group by the child
+ attribute of another attribute.
+ """
+ expr = make_attrgetter(environment, attribute)
+ return sorted(map(_GroupTuple, groupby(sorted(value, key=expr), expr)))
+
+
+class _GroupTuple(tuple):
+ __slots__ = ()
+ grouper = property(itemgetter(0))
+ list = property(itemgetter(1))
+
+ def __new__(cls, xxx_todo_changeme):
+ (key, value) = xxx_todo_changeme
+ return tuple.__new__(cls, (key, list(value)))
+
+
+@environmentfilter
+def do_sum(environment, iterable, attribute=None, start=0):
+ """Returns the sum of a sequence of numbers plus the value of parameter
+ 'start' (which defaults to 0). When the sequence is empty it returns
+ start.
+
+ It is also possible to sum up only certain attributes:
+
+ .. sourcecode:: jinja
+
+ Total: {{ items|sum(attribute='price') }}
+
+ .. versionchanged:: 2.6
+ The `attribute` parameter was added to allow suming up over
+ attributes. Also the `start` parameter was moved on to the right.
+ """
+ if attribute is not None:
+ iterable = imap(make_attrgetter(environment, attribute), iterable)
+ return sum(iterable, start)
+
+
+def do_list(value):
+ """Convert the value into a list. If it was a string the returned list
+ will be a list of characters.
+ """
+ return list(value)
+
+
+def do_mark_safe(value):
+ """Mark the value as safe which means that in an environment with automatic
+ escaping enabled this variable will not be escaped.
+ """
+ return Markup(value)
+
+
+def do_mark_unsafe(value):
+ """Mark a value as unsafe. This is the reverse operation for :func:`safe`."""
+ return text_type(value)
+
+
+def do_reverse(value):
+ """Reverse the object or return an iterator that iterates over it the other
+ way round.
+ """
+ if isinstance(value, string_types):
+ return value[::-1]
+ try:
+ return reversed(value)
+ except TypeError:
+ try:
+ rv = list(value)
+ rv.reverse()
+ return rv
+ except TypeError:
+ raise FilterArgumentError('argument must be iterable')
+
+
+@environmentfilter
+def do_attr(environment, obj, name):
+ """Get an attribute of an object. ``foo|attr("bar")`` works like
+ ``foo.bar`` just that always an attribute is returned and items are not
+ looked up.
+
+ See :ref:`Notes on subscriptions ` for more details.
+ """
+ try:
+ name = str(name)
+ except UnicodeError:
+ pass
+ else:
+ try:
+ value = getattr(obj, name)
+ except AttributeError:
+ pass
+ else:
+ if environment.sandboxed and not \
+ environment.is_safe_attribute(obj, name, value):
+ return environment.unsafe_undefined(obj, name)
+ return value
+ return environment.undefined(obj=obj, name=name)
+
+
+@contextfilter
+def do_map(*args, **kwargs):
+ """Applies a filter on a sequence of objects or looks up an attribute.
+ This is useful when dealing with lists of objects but you are really
+ only interested in a certain value of it.
+
+ The basic usage is mapping on an attribute. Imagine you have a list
+ of users but you are only interested in a list of usernames:
+
+ .. sourcecode:: jinja
+
+ Users on this page: {{ users|map(attribute='username')|join(', ') }}
+
+ Alternatively you can let it invoke a filter by passing the name of the
+ filter and the arguments afterwards. A good example would be applying a
+ text conversion filter on a sequence:
+
+ .. sourcecode:: jinja
+
+ Users on this page: {{ titles|map('lower')|join(', ') }}
+
+ .. versionadded:: 2.7
+ """
+ context = args[0]
+ seq = args[1]
+
+ if len(args) == 2 and 'attribute' in kwargs:
+ attribute = kwargs.pop('attribute')
+ if kwargs:
+ raise FilterArgumentError('Unexpected keyword argument %r' %
+ next(iter(kwargs)))
+ func = make_attrgetter(context.environment, attribute)
+ else:
+ try:
+ name = args[2]
+ args = args[3:]
+ except LookupError:
+ raise FilterArgumentError('map requires a filter argument')
+ func = lambda item: context.environment.call_filter(
+ name, item, args, kwargs, context=context)
+
+ if seq:
+ for item in seq:
+ yield func(item)
+
+
+@contextfilter
+def do_select(*args, **kwargs):
+ """Filters a sequence of objects by applying a test to the object and only
+ selecting the ones with the test succeeding.
+
+ Example usage:
+
+ .. sourcecode:: jinja
+
+ {{ numbers|select("odd") }}
+ {{ numbers|select("odd") }}
+
+ .. versionadded:: 2.7
+ """
+ return _select_or_reject(args, kwargs, lambda x: x, False)
+
+
+@contextfilter
+def do_reject(*args, **kwargs):
+ """Filters a sequence of objects by applying a test to the object and
+ rejecting the ones with the test succeeding.
+
+ Example usage:
+
+ .. sourcecode:: jinja
+
+ {{ numbers|reject("odd") }}
+
+ .. versionadded:: 2.7
+ """
+ return _select_or_reject(args, kwargs, lambda x: not x, False)
+
+
+@contextfilter
+def do_selectattr(*args, **kwargs):
+ """Filters a sequence of objects by applying a test to an attribute of an
+ object and only selecting the ones with the test succeeding.
+
+ Example usage:
+
+ .. sourcecode:: jinja
+
+ {{ users|selectattr("is_active") }}
+ {{ users|selectattr("email", "none") }}
+
+ .. versionadded:: 2.7
+ """
+ return _select_or_reject(args, kwargs, lambda x: x, True)
+
+
+@contextfilter
+def do_rejectattr(*args, **kwargs):
+ """Filters a sequence of objects by applying a test to an attribute of an
+ object or the attribute and rejecting the ones with the test succeeding.
+
+ .. sourcecode:: jinja
+
+ {{ users|rejectattr("is_active") }}
+ {{ users|rejectattr("email", "none") }}
+
+ .. versionadded:: 2.7
+ """
+ return _select_or_reject(args, kwargs, lambda x: not x, True)
+
+
+def _select_or_reject(args, kwargs, modfunc, lookup_attr):
+ context = args[0]
+ seq = args[1]
+ if lookup_attr:
+ try:
+ attr = args[2]
+ except LookupError:
+ raise FilterArgumentError('Missing parameter for attribute name')
+ transfunc = make_attrgetter(context.environment, attr)
+ off = 1
+ else:
+ off = 0
+ transfunc = lambda x: x
+
+ try:
+ name = args[2 + off]
+ args = args[3 + off:]
+ func = lambda item: context.environment.call_test(
+ name, item, args, kwargs)
+ except LookupError:
+ func = bool
+
+ if seq:
+ for item in seq:
+ if modfunc(func(transfunc(item))):
+ yield item
+
+
+FILTERS = {
+ 'abs': abs,
+ 'attr': do_attr,
+ 'batch': do_batch,
+ 'capitalize': do_capitalize,
+ 'center': do_center,
+ 'count': len,
+ 'd': do_default,
+ 'default': do_default,
+ 'dictsort': do_dictsort,
+ 'e': escape,
+ 'escape': escape,
+ 'filesizeformat': do_filesizeformat,
+ 'first': do_first,
+ 'float': do_float,
+ 'forceescape': do_forceescape,
+ 'format': do_format,
+ 'groupby': do_groupby,
+ 'indent': do_indent,
+ 'int': do_int,
+ 'join': do_join,
+ 'last': do_last,
+ 'length': len,
+ 'list': do_list,
+ 'lower': do_lower,
+ 'map': do_map,
+ 'pprint': do_pprint,
+ 'random': do_random,
+ 'reject': do_reject,
+ 'rejectattr': do_rejectattr,
+ 'replace': do_replace,
+ 'reverse': do_reverse,
+ 'round': do_round,
+ 'safe': do_mark_safe,
+ 'select': do_select,
+ 'selectattr': do_selectattr,
+ 'slice': do_slice,
+ 'sort': do_sort,
+ 'string': soft_unicode,
+ 'striptags': do_striptags,
+ 'sum': do_sum,
+ 'title': do_title,
+ 'trim': do_trim,
+ 'truncate': do_truncate,
+ 'upper': do_upper,
+ 'urlencode': do_urlencode,
+ 'urlize': do_urlize,
+ 'wordcount': do_wordcount,
+ 'wordwrap': do_wordwrap,
+ 'xmlattr': do_xmlattr,
+}
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/jinja2/filters.pyc b/Assignments/microblog/flask/lib/python2.7/site-packages/jinja2/filters.pyc
new file mode 100644
index 0000000..7079d9d
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/jinja2/filters.pyc differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/jinja2/lexer.py b/Assignments/microblog/flask/lib/python2.7/site-packages/jinja2/lexer.py
new file mode 100644
index 0000000..c8dac21
--- /dev/null
+++ b/Assignments/microblog/flask/lib/python2.7/site-packages/jinja2/lexer.py
@@ -0,0 +1,734 @@
+# -*- coding: utf-8 -*-
+"""
+ jinja2.lexer
+ ~~~~~~~~~~~~
+
+ This module implements a Jinja / Python combination lexer. The
+ `Lexer` class provided by this module is used to do some preprocessing
+ for Jinja.
+
+ On the one hand it filters out invalid operators like the bitshift
+ operators we don't allow in templates. On the other hand it separates
+ template code and python code in expressions.
+
+ :copyright: (c) 2010 by the Jinja Team.
+ :license: BSD, see LICENSE for more details.
+"""
+import re
+
+from operator import itemgetter
+from collections import deque
+from jinja2.exceptions import TemplateSyntaxError
+from jinja2.utils import LRUCache
+from jinja2._compat import iteritems, implements_iterator, text_type, \
+ intern, PY2
+
+
+# cache for the lexers. Exists in order to be able to have multiple
+# environments with the same lexer
+_lexer_cache = LRUCache(50)
+
+# static regular expressions
+whitespace_re = re.compile(r'\s+', re.U)
+string_re = re.compile(r"('([^'\\]*(?:\\.[^'\\]*)*)'"
+ r'|"([^"\\]*(?:\\.[^"\\]*)*)")', re.S)
+integer_re = re.compile(r'\d+')
+
+# we use the unicode identifier rule if this python version is able
+# to handle unicode identifiers, otherwise the standard ASCII one.
+try:
+ compile('föö', '', 'eval')
+except SyntaxError:
+ name_re = re.compile(r'\b[a-zA-Z_][a-zA-Z0-9_]*\b')
+else:
+ from jinja2 import _stringdefs
+ name_re = re.compile(r'[%s][%s]*' % (_stringdefs.xid_start,
+ _stringdefs.xid_continue))
+
+float_re = re.compile(r'(?': TOKEN_GT,
+ '>=': TOKEN_GTEQ,
+ '<': TOKEN_LT,
+ '<=': TOKEN_LTEQ,
+ '=': TOKEN_ASSIGN,
+ '.': TOKEN_DOT,
+ ':': TOKEN_COLON,
+ '|': TOKEN_PIPE,
+ ',': TOKEN_COMMA,
+ ';': TOKEN_SEMICOLON
+}
+
+reverse_operators = dict([(v, k) for k, v in iteritems(operators)])
+assert len(operators) == len(reverse_operators), 'operators dropped'
+operator_re = re.compile('(%s)' % '|'.join(re.escape(x) for x in
+ sorted(operators, key=lambda x: -len(x))))
+
+ignored_tokens = frozenset([TOKEN_COMMENT_BEGIN, TOKEN_COMMENT,
+ TOKEN_COMMENT_END, TOKEN_WHITESPACE,
+ TOKEN_LINECOMMENT_BEGIN, TOKEN_LINECOMMENT_END,
+ TOKEN_LINECOMMENT])
+ignore_if_empty = frozenset([TOKEN_WHITESPACE, TOKEN_DATA,
+ TOKEN_COMMENT, TOKEN_LINECOMMENT])
+
+
+def _describe_token_type(token_type):
+ if token_type in reverse_operators:
+ return reverse_operators[token_type]
+ return {
+ TOKEN_COMMENT_BEGIN: 'begin of comment',
+ TOKEN_COMMENT_END: 'end of comment',
+ TOKEN_COMMENT: 'comment',
+ TOKEN_LINECOMMENT: 'comment',
+ TOKEN_BLOCK_BEGIN: 'begin of statement block',
+ TOKEN_BLOCK_END: 'end of statement block',
+ TOKEN_VARIABLE_BEGIN: 'begin of print statement',
+ TOKEN_VARIABLE_END: 'end of print statement',
+ TOKEN_LINESTATEMENT_BEGIN: 'begin of line statement',
+ TOKEN_LINESTATEMENT_END: 'end of line statement',
+ TOKEN_DATA: 'template data / text',
+ TOKEN_EOF: 'end of template'
+ }.get(token_type, token_type)
+
+
+def describe_token(token):
+ """Returns a description of the token."""
+ if token.type == 'name':
+ return token.value
+ return _describe_token_type(token.type)
+
+
+def describe_token_expr(expr):
+ """Like `describe_token` but for token expressions."""
+ if ':' in expr:
+ type, value = expr.split(':', 1)
+ if type == 'name':
+ return value
+ else:
+ type = expr
+ return _describe_token_type(type)
+
+
+def count_newlines(value):
+ """Count the number of newline characters in the string. This is
+ useful for extensions that filter a stream.
+ """
+ return len(newline_re.findall(value))
+
+
+def compile_rules(environment):
+ """Compiles all the rules from the environment into a list of rules."""
+ e = re.escape
+ rules = [
+ (len(environment.comment_start_string), 'comment',
+ e(environment.comment_start_string)),
+ (len(environment.block_start_string), 'block',
+ e(environment.block_start_string)),
+ (len(environment.variable_start_string), 'variable',
+ e(environment.variable_start_string))
+ ]
+
+ if environment.line_statement_prefix is not None:
+ rules.append((len(environment.line_statement_prefix), 'linestatement',
+ r'^[ \t\v]*' + e(environment.line_statement_prefix)))
+ if environment.line_comment_prefix is not None:
+ rules.append((len(environment.line_comment_prefix), 'linecomment',
+ r'(?:^|(?<=\S))[^\S\r\n]*' +
+ e(environment.line_comment_prefix)))
+
+ return [x[1:] for x in sorted(rules, reverse=True)]
+
+
+class Failure(object):
+ """Class that raises a `TemplateSyntaxError` if called.
+ Used by the `Lexer` to specify known errors.
+ """
+
+ def __init__(self, message, cls=TemplateSyntaxError):
+ self.message = message
+ self.error_class = cls
+
+ def __call__(self, lineno, filename):
+ raise self.error_class(self.message, lineno, filename)
+
+
+class Token(tuple):
+ """Token class."""
+ __slots__ = ()
+ lineno, type, value = (property(itemgetter(x)) for x in range(3))
+
+ def __new__(cls, lineno, type, value):
+ return tuple.__new__(cls, (lineno, intern(str(type)), value))
+
+ def __str__(self):
+ if self.type in reverse_operators:
+ return reverse_operators[self.type]
+ elif self.type == 'name':
+ return self.value
+ return self.type
+
+ def test(self, expr):
+ """Test a token against a token expression. This can either be a
+ token type or ``'token_type:token_value'``. This can only test
+ against string values and types.
+ """
+ # here we do a regular string equality check as test_any is usually
+ # passed an iterable of not interned strings.
+ if self.type == expr:
+ return True
+ elif ':' in expr:
+ return expr.split(':', 1) == [self.type, self.value]
+ return False
+
+ def test_any(self, *iterable):
+ """Test against multiple token expressions."""
+ for expr in iterable:
+ if self.test(expr):
+ return True
+ return False
+
+ def __repr__(self):
+ return 'Token(%r, %r, %r)' % (
+ self.lineno,
+ self.type,
+ self.value
+ )
+
+
+@implements_iterator
+class TokenStreamIterator(object):
+ """The iterator for tokenstreams. Iterate over the stream
+ until the eof token is reached.
+ """
+
+ def __init__(self, stream):
+ self.stream = stream
+
+ def __iter__(self):
+ return self
+
+ def __next__(self):
+ token = self.stream.current
+ if token.type is TOKEN_EOF:
+ self.stream.close()
+ raise StopIteration()
+ next(self.stream)
+ return token
+
+
+@implements_iterator
+class TokenStream(object):
+ """A token stream is an iterable that yields :class:`Token`\s. The
+ parser however does not iterate over it but calls :meth:`next` to go
+ one token ahead. The current active token is stored as :attr:`current`.
+ """
+
+ def __init__(self, generator, name, filename):
+ self._iter = iter(generator)
+ self._pushed = deque()
+ self.name = name
+ self.filename = filename
+ self.closed = False
+ self.current = Token(1, TOKEN_INITIAL, '')
+ next(self)
+
+ def __iter__(self):
+ return TokenStreamIterator(self)
+
+ def __bool__(self):
+ return bool(self._pushed) or self.current.type is not TOKEN_EOF
+ __nonzero__ = __bool__ # py2
+
+ eos = property(lambda x: not x, doc="Are we at the end of the stream?")
+
+ def push(self, token):
+ """Push a token back to the stream."""
+ self._pushed.append(token)
+
+ def look(self):
+ """Look at the next token."""
+ old_token = next(self)
+ result = self.current
+ self.push(result)
+ self.current = old_token
+ return result
+
+ def skip(self, n=1):
+ """Got n tokens ahead."""
+ for x in range(n):
+ next(self)
+
+ def next_if(self, expr):
+ """Perform the token test and return the token if it matched.
+ Otherwise the return value is `None`.
+ """
+ if self.current.test(expr):
+ return next(self)
+
+ def skip_if(self, expr):
+ """Like :meth:`next_if` but only returns `True` or `False`."""
+ return self.next_if(expr) is not None
+
+ def __next__(self):
+ """Go one token ahead and return the old one"""
+ rv = self.current
+ if self._pushed:
+ self.current = self._pushed.popleft()
+ elif self.current.type is not TOKEN_EOF:
+ try:
+ self.current = next(self._iter)
+ except StopIteration:
+ self.close()
+ return rv
+
+ def close(self):
+ """Close the stream."""
+ self.current = Token(self.current.lineno, TOKEN_EOF, '')
+ self._iter = None
+ self.closed = True
+
+ def expect(self, expr):
+ """Expect a given token type and return it. This accepts the same
+ argument as :meth:`jinja2.lexer.Token.test`.
+ """
+ if not self.current.test(expr):
+ expr = describe_token_expr(expr)
+ if self.current.type is TOKEN_EOF:
+ raise TemplateSyntaxError('unexpected end of template, '
+ 'expected %r.' % expr,
+ self.current.lineno,
+ self.name, self.filename)
+ raise TemplateSyntaxError("expected token %r, got %r" %
+ (expr, describe_token(self.current)),
+ self.current.lineno,
+ self.name, self.filename)
+ try:
+ return self.current
+ finally:
+ next(self)
+
+
+def get_lexer(environment):
+ """Return a lexer which is probably cached."""
+ key = (environment.block_start_string,
+ environment.block_end_string,
+ environment.variable_start_string,
+ environment.variable_end_string,
+ environment.comment_start_string,
+ environment.comment_end_string,
+ environment.line_statement_prefix,
+ environment.line_comment_prefix,
+ environment.trim_blocks,
+ environment.lstrip_blocks,
+ environment.newline_sequence,
+ environment.keep_trailing_newline)
+ lexer = _lexer_cache.get(key)
+ if lexer is None:
+ lexer = Lexer(environment)
+ _lexer_cache[key] = lexer
+ return lexer
+
+
+class Lexer(object):
+ """Class that implements a lexer for a given environment. Automatically
+ created by the environment class, usually you don't have to do that.
+
+ Note that the lexer is not automatically bound to an environment.
+ Multiple environments can share the same lexer.
+ """
+
+ def __init__(self, environment):
+ # shortcuts
+ c = lambda x: re.compile(x, re.M | re.S)
+ e = re.escape
+
+ # lexing rules for tags
+ tag_rules = [
+ (whitespace_re, TOKEN_WHITESPACE, None),
+ (float_re, TOKEN_FLOAT, None),
+ (integer_re, TOKEN_INTEGER, None),
+ (name_re, TOKEN_NAME, None),
+ (string_re, TOKEN_STRING, None),
+ (operator_re, TOKEN_OPERATOR, None)
+ ]
+
+ # assemble the root lexing rule. because "|" is ungreedy
+ # we have to sort by length so that the lexer continues working
+ # as expected when we have parsing rules like <% for block and
+ # <%= for variables. (if someone wants asp like syntax)
+ # variables are just part of the rules if variable processing
+ # is required.
+ root_tag_rules = compile_rules(environment)
+
+ # block suffix if trimming is enabled
+ block_suffix_re = environment.trim_blocks and '\\n?' or ''
+
+ # strip leading spaces if lstrip_blocks is enabled
+ prefix_re = {}
+ if environment.lstrip_blocks:
+ # use '{%+' to manually disable lstrip_blocks behavior
+ no_lstrip_re = e('+')
+ # detect overlap between block and variable or comment strings
+ block_diff = c(r'^%s(.*)' % e(environment.block_start_string))
+ # make sure we don't mistake a block for a variable or a comment
+ m = block_diff.match(environment.comment_start_string)
+ no_lstrip_re += m and r'|%s' % e(m.group(1)) or ''
+ m = block_diff.match(environment.variable_start_string)
+ no_lstrip_re += m and r'|%s' % e(m.group(1)) or ''
+
+ # detect overlap between comment and variable strings
+ comment_diff = c(r'^%s(.*)' % e(environment.comment_start_string))
+ m = comment_diff.match(environment.variable_start_string)
+ no_variable_re = m and r'(?!%s)' % e(m.group(1)) or ''
+
+ lstrip_re = r'^[ \t]*'
+ block_prefix_re = r'%s%s(?!%s)|%s\+?' % (
+ lstrip_re,
+ e(environment.block_start_string),
+ no_lstrip_re,
+ e(environment.block_start_string),
+ )
+ comment_prefix_re = r'%s%s%s|%s\+?' % (
+ lstrip_re,
+ e(environment.comment_start_string),
+ no_variable_re,
+ e(environment.comment_start_string),
+ )
+ prefix_re['block'] = block_prefix_re
+ prefix_re['comment'] = comment_prefix_re
+ else:
+ block_prefix_re = '%s' % e(environment.block_start_string)
+
+ self.newline_sequence = environment.newline_sequence
+ self.keep_trailing_newline = environment.keep_trailing_newline
+
+ # global lexing rules
+ self.rules = {
+ 'root': [
+ # directives
+ (c('(.*?)(?:%s)' % '|'.join(
+ [r'(?P(?:\s*%s\-|%s)\s*raw\s*(?:\-%s\s*|%s))' % (
+ e(environment.block_start_string),
+ block_prefix_re,
+ e(environment.block_end_string),
+ e(environment.block_end_string)
+ )] + [
+ r'(?P<%s_begin>\s*%s\-|%s)' % (n, r, prefix_re.get(n,r))
+ for n, r in root_tag_rules
+ ])), (TOKEN_DATA, '#bygroup'), '#bygroup'),
+ # data
+ (c('.+'), TOKEN_DATA, None)
+ ],
+ # comments
+ TOKEN_COMMENT_BEGIN: [
+ (c(r'(.*?)((?:\-%s\s*|%s)%s)' % (
+ e(environment.comment_end_string),
+ e(environment.comment_end_string),
+ block_suffix_re
+ )), (TOKEN_COMMENT, TOKEN_COMMENT_END), '#pop'),
+ (c('(.)'), (Failure('Missing end of comment tag'),), None)
+ ],
+ # blocks
+ TOKEN_BLOCK_BEGIN: [
+ (c('(?:\-%s\s*|%s)%s' % (
+ e(environment.block_end_string),
+ e(environment.block_end_string),
+ block_suffix_re
+ )), TOKEN_BLOCK_END, '#pop'),
+ ] + tag_rules,
+ # variables
+ TOKEN_VARIABLE_BEGIN: [
+ (c('\-%s\s*|%s' % (
+ e(environment.variable_end_string),
+ e(environment.variable_end_string)
+ )), TOKEN_VARIABLE_END, '#pop')
+ ] + tag_rules,
+ # raw block
+ TOKEN_RAW_BEGIN: [
+ (c('(.*?)((?:\s*%s\-|%s)\s*endraw\s*(?:\-%s\s*|%s%s))' % (
+ e(environment.block_start_string),
+ block_prefix_re,
+ e(environment.block_end_string),
+ e(environment.block_end_string),
+ block_suffix_re
+ )), (TOKEN_DATA, TOKEN_RAW_END), '#pop'),
+ (c('(.)'), (Failure('Missing end of raw directive'),), None)
+ ],
+ # line statements
+ TOKEN_LINESTATEMENT_BEGIN: [
+ (c(r'\s*(\n|$)'), TOKEN_LINESTATEMENT_END, '#pop')
+ ] + tag_rules,
+ # line comments
+ TOKEN_LINECOMMENT_BEGIN: [
+ (c(r'(.*?)()(?=\n|$)'), (TOKEN_LINECOMMENT,
+ TOKEN_LINECOMMENT_END), '#pop')
+ ]
+ }
+
+ def _normalize_newlines(self, value):
+ """Called for strings and template data to normalize it to unicode."""
+ return newline_re.sub(self.newline_sequence, value)
+
+ def tokenize(self, source, name=None, filename=None, state=None):
+ """Calls tokeniter + tokenize and wraps it in a token stream.
+ """
+ stream = self.tokeniter(source, name, filename, state)
+ return TokenStream(self.wrap(stream, name, filename), name, filename)
+
+ def wrap(self, stream, name=None, filename=None):
+ """This is called with the stream as returned by `tokenize` and wraps
+ every token in a :class:`Token` and converts the value.
+ """
+ for lineno, token, value in stream:
+ if token in ignored_tokens:
+ continue
+ elif token == 'linestatement_begin':
+ token = 'block_begin'
+ elif token == 'linestatement_end':
+ token = 'block_end'
+ # we are not interested in those tokens in the parser
+ elif token in ('raw_begin', 'raw_end'):
+ continue
+ elif token == 'data':
+ value = self._normalize_newlines(value)
+ elif token == 'keyword':
+ token = value
+ elif token == 'name':
+ value = str(value)
+ elif token == 'string':
+ # try to unescape string
+ try:
+ value = self._normalize_newlines(value[1:-1]) \
+ .encode('ascii', 'backslashreplace') \
+ .decode('unicode-escape')
+ except Exception as e:
+ msg = str(e).split(':')[-1].strip()
+ raise TemplateSyntaxError(msg, lineno, name, filename)
+ # if we can express it as bytestring (ascii only)
+ # we do that for support of semi broken APIs
+ # as datetime.datetime.strftime. On python 3 this
+ # call becomes a noop thanks to 2to3
+ if PY2:
+ try:
+ value = value.encode('ascii')
+ except UnicodeError:
+ pass
+ elif token == 'integer':
+ value = int(value)
+ elif token == 'float':
+ value = float(value)
+ elif token == 'operator':
+ token = operators[value]
+ yield Token(lineno, token, value)
+
+ def tokeniter(self, source, name, filename=None, state=None):
+ """This method tokenizes the text and returns the tokens in a
+ generator. Use this method if you just want to tokenize a template.
+ """
+ source = text_type(source)
+ lines = source.splitlines()
+ if self.keep_trailing_newline and source:
+ for newline in ('\r\n', '\r', '\n'):
+ if source.endswith(newline):
+ lines.append('')
+ break
+ source = '\n'.join(lines)
+ pos = 0
+ lineno = 1
+ stack = ['root']
+ if state is not None and state != 'root':
+ assert state in ('variable', 'block'), 'invalid state'
+ stack.append(state + '_begin')
+ else:
+ state = 'root'
+ statetokens = self.rules[stack[-1]]
+ source_length = len(source)
+
+ balancing_stack = []
+
+ while 1:
+ # tokenizer loop
+ for regex, tokens, new_state in statetokens:
+ m = regex.match(source, pos)
+ # if no match we try again with the next rule
+ if m is None:
+ continue
+
+ # we only match blocks and variables if braces / parentheses
+ # are balanced. continue parsing with the lower rule which
+ # is the operator rule. do this only if the end tags look
+ # like operators
+ if balancing_stack and \
+ tokens in ('variable_end', 'block_end',
+ 'linestatement_end'):
+ continue
+
+ # tuples support more options
+ if isinstance(tokens, tuple):
+ for idx, token in enumerate(tokens):
+ # failure group
+ if token.__class__ is Failure:
+ raise token(lineno, filename)
+ # bygroup is a bit more complex, in that case we
+ # yield for the current token the first named
+ # group that matched
+ elif token == '#bygroup':
+ for key, value in iteritems(m.groupdict()):
+ if value is not None:
+ yield lineno, key, value
+ lineno += value.count('\n')
+ break
+ else:
+ raise RuntimeError('%r wanted to resolve '
+ 'the token dynamically'
+ ' but no group matched'
+ % regex)
+ # normal group
+ else:
+ data = m.group(idx + 1)
+ if data or token not in ignore_if_empty:
+ yield lineno, token, data
+ lineno += data.count('\n')
+
+ # strings as token just are yielded as it.
+ else:
+ data = m.group()
+ # update brace/parentheses balance
+ if tokens == 'operator':
+ if data == '{':
+ balancing_stack.append('}')
+ elif data == '(':
+ balancing_stack.append(')')
+ elif data == '[':
+ balancing_stack.append(']')
+ elif data in ('}', ')', ']'):
+ if not balancing_stack:
+ raise TemplateSyntaxError('unexpected \'%s\'' %
+ data, lineno, name,
+ filename)
+ expected_op = balancing_stack.pop()
+ if expected_op != data:
+ raise TemplateSyntaxError('unexpected \'%s\', '
+ 'expected \'%s\'' %
+ (data, expected_op),
+ lineno, name,
+ filename)
+ # yield items
+ if data or tokens not in ignore_if_empty:
+ yield lineno, tokens, data
+ lineno += data.count('\n')
+
+ # fetch new position into new variable so that we can check
+ # if there is a internal parsing error which would result
+ # in an infinite loop
+ pos2 = m.end()
+
+ # handle state changes
+ if new_state is not None:
+ # remove the uppermost state
+ if new_state == '#pop':
+ stack.pop()
+ # resolve the new state by group checking
+ elif new_state == '#bygroup':
+ for key, value in iteritems(m.groupdict()):
+ if value is not None:
+ stack.append(key)
+ break
+ else:
+ raise RuntimeError('%r wanted to resolve the '
+ 'new state dynamically but'
+ ' no group matched' %
+ regex)
+ # direct state name given
+ else:
+ stack.append(new_state)
+ statetokens = self.rules[stack[-1]]
+ # we are still at the same position and no stack change.
+ # this means a loop without break condition, avoid that and
+ # raise error
+ elif pos2 == pos:
+ raise RuntimeError('%r yielded empty string without '
+ 'stack change' % regex)
+ # publish new function and start again
+ pos = pos2
+ break
+ # if loop terminated without break we haven't found a single match
+ # either we are at the end of the file or we have a problem
+ else:
+ # end of text
+ if pos >= source_length:
+ return
+ # something went wrong
+ raise TemplateSyntaxError('unexpected char %r at %d' %
+ (source[pos], pos), lineno,
+ name, filename)
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/jinja2/lexer.pyc b/Assignments/microblog/flask/lib/python2.7/site-packages/jinja2/lexer.pyc
new file mode 100644
index 0000000..9c639f9
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/jinja2/lexer.pyc differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/jinja2/loaders.py b/Assignments/microblog/flask/lib/python2.7/site-packages/jinja2/loaders.py
new file mode 100644
index 0000000..44aa392
--- /dev/null
+++ b/Assignments/microblog/flask/lib/python2.7/site-packages/jinja2/loaders.py
@@ -0,0 +1,481 @@
+# -*- coding: utf-8 -*-
+"""
+ jinja2.loaders
+ ~~~~~~~~~~~~~~
+
+ Jinja loader classes.
+
+ :copyright: (c) 2010 by the Jinja Team.
+ :license: BSD, see LICENSE for more details.
+"""
+import os
+import sys
+import weakref
+from types import ModuleType
+from os import path
+from hashlib import sha1
+from jinja2.exceptions import TemplateNotFound
+from jinja2.utils import open_if_exists, internalcode
+from jinja2._compat import string_types, iteritems
+
+
+def split_template_path(template):
+ """Split a path into segments and perform a sanity check. If it detects
+ '..' in the path it will raise a `TemplateNotFound` error.
+ """
+ pieces = []
+ for piece in template.split('/'):
+ if path.sep in piece \
+ or (path.altsep and path.altsep in piece) or \
+ piece == path.pardir:
+ raise TemplateNotFound(template)
+ elif piece and piece != '.':
+ pieces.append(piece)
+ return pieces
+
+
+class BaseLoader(object):
+ """Baseclass for all loaders. Subclass this and override `get_source` to
+ implement a custom loading mechanism. The environment provides a
+ `get_template` method that calls the loader's `load` method to get the
+ :class:`Template` object.
+
+ A very basic example for a loader that looks up templates on the file
+ system could look like this::
+
+ from jinja2 import BaseLoader, TemplateNotFound
+ from os.path import join, exists, getmtime
+
+ class MyLoader(BaseLoader):
+
+ def __init__(self, path):
+ self.path = path
+
+ def get_source(self, environment, template):
+ path = join(self.path, template)
+ if not exists(path):
+ raise TemplateNotFound(template)
+ mtime = getmtime(path)
+ with file(path) as f:
+ source = f.read().decode('utf-8')
+ return source, path, lambda: mtime == getmtime(path)
+ """
+
+ #: if set to `False` it indicates that the loader cannot provide access
+ #: to the source of templates.
+ #:
+ #: .. versionadded:: 2.4
+ has_source_access = True
+
+ def get_source(self, environment, template):
+ """Get the template source, filename and reload helper for a template.
+ It's passed the environment and template name and has to return a
+ tuple in the form ``(source, filename, uptodate)`` or raise a
+ `TemplateNotFound` error if it can't locate the template.
+
+ The source part of the returned tuple must be the source of the
+ template as unicode string or a ASCII bytestring. The filename should
+ be the name of the file on the filesystem if it was loaded from there,
+ otherwise `None`. The filename is used by python for the tracebacks
+ if no loader extension is used.
+
+ The last item in the tuple is the `uptodate` function. If auto
+ reloading is enabled it's always called to check if the template
+ changed. No arguments are passed so the function must store the
+ old state somewhere (for example in a closure). If it returns `False`
+ the template will be reloaded.
+ """
+ if not self.has_source_access:
+ raise RuntimeError('%s cannot provide access to the source' %
+ self.__class__.__name__)
+ raise TemplateNotFound(template)
+
+ def list_templates(self):
+ """Iterates over all templates. If the loader does not support that
+ it should raise a :exc:`TypeError` which is the default behavior.
+ """
+ raise TypeError('this loader cannot iterate over all templates')
+
+ @internalcode
+ def load(self, environment, name, globals=None):
+ """Loads a template. This method looks up the template in the cache
+ or loads one by calling :meth:`get_source`. Subclasses should not
+ override this method as loaders working on collections of other
+ loaders (such as :class:`PrefixLoader` or :class:`ChoiceLoader`)
+ will not call this method but `get_source` directly.
+ """
+ code = None
+ if globals is None:
+ globals = {}
+
+ # first we try to get the source for this template together
+ # with the filename and the uptodate function.
+ source, filename, uptodate = self.get_source(environment, name)
+
+ # try to load the code from the bytecode cache if there is a
+ # bytecode cache configured.
+ bcc = environment.bytecode_cache
+ if bcc is not None:
+ bucket = bcc.get_bucket(environment, name, filename, source)
+ code = bucket.code
+
+ # if we don't have code so far (not cached, no longer up to
+ # date) etc. we compile the template
+ if code is None:
+ code = environment.compile(source, name, filename)
+
+ # if the bytecode cache is available and the bucket doesn't
+ # have a code so far, we give the bucket the new code and put
+ # it back to the bytecode cache.
+ if bcc is not None and bucket.code is None:
+ bucket.code = code
+ bcc.set_bucket(bucket)
+
+ return environment.template_class.from_code(environment, code,
+ globals, uptodate)
+
+
+class FileSystemLoader(BaseLoader):
+ """Loads templates from the file system. This loader can find templates
+ in folders on the file system and is the preferred way to load them.
+
+ The loader takes the path to the templates as string, or if multiple
+ locations are wanted a list of them which is then looked up in the
+ given order::
+
+ >>> loader = FileSystemLoader('/path/to/templates')
+ >>> loader = FileSystemLoader(['/path/to/templates', '/other/path'])
+
+ Per default the template encoding is ``'utf-8'`` which can be changed
+ by setting the `encoding` parameter to something else.
+
+ To follow symbolic links, set the *followlinks* parameter to ``True``::
+
+ >>> loader = FileSystemLoader('/path/to/templates', followlinks=True)
+
+ .. versionchanged:: 2.8+
+ The *followlinks* parameter was added.
+ """
+
+ def __init__(self, searchpath, encoding='utf-8', followlinks=False):
+ if isinstance(searchpath, string_types):
+ searchpath = [searchpath]
+ self.searchpath = list(searchpath)
+ self.encoding = encoding
+ self.followlinks = followlinks
+
+ def get_source(self, environment, template):
+ pieces = split_template_path(template)
+ for searchpath in self.searchpath:
+ filename = path.join(searchpath, *pieces)
+ f = open_if_exists(filename)
+ if f is None:
+ continue
+ try:
+ contents = f.read().decode(self.encoding)
+ finally:
+ f.close()
+
+ mtime = path.getmtime(filename)
+
+ def uptodate():
+ try:
+ return path.getmtime(filename) == mtime
+ except OSError:
+ return False
+ return contents, filename, uptodate
+ raise TemplateNotFound(template)
+
+ def list_templates(self):
+ found = set()
+ for searchpath in self.searchpath:
+ walk_dir = os.walk(searchpath, followlinks=self.followlinks)
+ for dirpath, dirnames, filenames in walk_dir:
+ for filename in filenames:
+ template = os.path.join(dirpath, filename) \
+ [len(searchpath):].strip(os.path.sep) \
+ .replace(os.path.sep, '/')
+ if template[:2] == './':
+ template = template[2:]
+ if template not in found:
+ found.add(template)
+ return sorted(found)
+
+
+class PackageLoader(BaseLoader):
+ """Load templates from python eggs or packages. It is constructed with
+ the name of the python package and the path to the templates in that
+ package::
+
+ loader = PackageLoader('mypackage', 'views')
+
+ If the package path is not given, ``'templates'`` is assumed.
+
+ Per default the template encoding is ``'utf-8'`` which can be changed
+ by setting the `encoding` parameter to something else. Due to the nature
+ of eggs it's only possible to reload templates if the package was loaded
+ from the file system and not a zip file.
+ """
+
+ def __init__(self, package_name, package_path='templates',
+ encoding='utf-8'):
+ from pkg_resources import DefaultProvider, ResourceManager, \
+ get_provider
+ provider = get_provider(package_name)
+ self.encoding = encoding
+ self.manager = ResourceManager()
+ self.filesystem_bound = isinstance(provider, DefaultProvider)
+ self.provider = provider
+ self.package_path = package_path
+
+ def get_source(self, environment, template):
+ pieces = split_template_path(template)
+ p = '/'.join((self.package_path,) + tuple(pieces))
+ if not self.provider.has_resource(p):
+ raise TemplateNotFound(template)
+
+ filename = uptodate = None
+ if self.filesystem_bound:
+ filename = self.provider.get_resource_filename(self.manager, p)
+ mtime = path.getmtime(filename)
+ def uptodate():
+ try:
+ return path.getmtime(filename) == mtime
+ except OSError:
+ return False
+
+ source = self.provider.get_resource_string(self.manager, p)
+ return source.decode(self.encoding), filename, uptodate
+
+ def list_templates(self):
+ path = self.package_path
+ if path[:2] == './':
+ path = path[2:]
+ elif path == '.':
+ path = ''
+ offset = len(path)
+ results = []
+ def _walk(path):
+ for filename in self.provider.resource_listdir(path):
+ fullname = path + '/' + filename
+ if self.provider.resource_isdir(fullname):
+ _walk(fullname)
+ else:
+ results.append(fullname[offset:].lstrip('/'))
+ _walk(path)
+ results.sort()
+ return results
+
+
+class DictLoader(BaseLoader):
+ """Loads a template from a python dict. It's passed a dict of unicode
+ strings bound to template names. This loader is useful for unittesting:
+
+ >>> loader = DictLoader({'index.html': 'source here'})
+
+ Because auto reloading is rarely useful this is disabled per default.
+ """
+
+ def __init__(self, mapping):
+ self.mapping = mapping
+
+ def get_source(self, environment, template):
+ if template in self.mapping:
+ source = self.mapping[template]
+ return source, None, lambda: source == self.mapping.get(template)
+ raise TemplateNotFound(template)
+
+ def list_templates(self):
+ return sorted(self.mapping)
+
+
+class FunctionLoader(BaseLoader):
+ """A loader that is passed a function which does the loading. The
+ function receives the name of the template and has to return either
+ an unicode string with the template source, a tuple in the form ``(source,
+ filename, uptodatefunc)`` or `None` if the template does not exist.
+
+ >>> def load_template(name):
+ ... if name == 'index.html':
+ ... return '...'
+ ...
+ >>> loader = FunctionLoader(load_template)
+
+ The `uptodatefunc` is a function that is called if autoreload is enabled
+ and has to return `True` if the template is still up to date. For more
+ details have a look at :meth:`BaseLoader.get_source` which has the same
+ return value.
+ """
+
+ def __init__(self, load_func):
+ self.load_func = load_func
+
+ def get_source(self, environment, template):
+ rv = self.load_func(template)
+ if rv is None:
+ raise TemplateNotFound(template)
+ elif isinstance(rv, string_types):
+ return rv, None, None
+ return rv
+
+
+class PrefixLoader(BaseLoader):
+ """A loader that is passed a dict of loaders where each loader is bound
+ to a prefix. The prefix is delimited from the template by a slash per
+ default, which can be changed by setting the `delimiter` argument to
+ something else::
+
+ loader = PrefixLoader({
+ 'app1': PackageLoader('mypackage.app1'),
+ 'app2': PackageLoader('mypackage.app2')
+ })
+
+ By loading ``'app1/index.html'`` the file from the app1 package is loaded,
+ by loading ``'app2/index.html'`` the file from the second.
+ """
+
+ def __init__(self, mapping, delimiter='/'):
+ self.mapping = mapping
+ self.delimiter = delimiter
+
+ def get_loader(self, template):
+ try:
+ prefix, name = template.split(self.delimiter, 1)
+ loader = self.mapping[prefix]
+ except (ValueError, KeyError):
+ raise TemplateNotFound(template)
+ return loader, name
+
+ def get_source(self, environment, template):
+ loader, name = self.get_loader(template)
+ try:
+ return loader.get_source(environment, name)
+ except TemplateNotFound:
+ # re-raise the exception with the correct fileame here.
+ # (the one that includes the prefix)
+ raise TemplateNotFound(template)
+
+ @internalcode
+ def load(self, environment, name, globals=None):
+ loader, local_name = self.get_loader(name)
+ try:
+ return loader.load(environment, local_name, globals)
+ except TemplateNotFound:
+ # re-raise the exception with the correct fileame here.
+ # (the one that includes the prefix)
+ raise TemplateNotFound(name)
+
+ def list_templates(self):
+ result = []
+ for prefix, loader in iteritems(self.mapping):
+ for template in loader.list_templates():
+ result.append(prefix + self.delimiter + template)
+ return result
+
+
+class ChoiceLoader(BaseLoader):
+ """This loader works like the `PrefixLoader` just that no prefix is
+ specified. If a template could not be found by one loader the next one
+ is tried.
+
+ >>> loader = ChoiceLoader([
+ ... FileSystemLoader('/path/to/user/templates'),
+ ... FileSystemLoader('/path/to/system/templates')
+ ... ])
+
+ This is useful if you want to allow users to override builtin templates
+ from a different location.
+ """
+
+ def __init__(self, loaders):
+ self.loaders = loaders
+
+ def get_source(self, environment, template):
+ for loader in self.loaders:
+ try:
+ return loader.get_source(environment, template)
+ except TemplateNotFound:
+ pass
+ raise TemplateNotFound(template)
+
+ @internalcode
+ def load(self, environment, name, globals=None):
+ for loader in self.loaders:
+ try:
+ return loader.load(environment, name, globals)
+ except TemplateNotFound:
+ pass
+ raise TemplateNotFound(name)
+
+ def list_templates(self):
+ found = set()
+ for loader in self.loaders:
+ found.update(loader.list_templates())
+ return sorted(found)
+
+
+class _TemplateModule(ModuleType):
+ """Like a normal module but with support for weak references"""
+
+
+class ModuleLoader(BaseLoader):
+ """This loader loads templates from precompiled templates.
+
+ Example usage:
+
+ >>> loader = ChoiceLoader([
+ ... ModuleLoader('/path/to/compiled/templates'),
+ ... FileSystemLoader('/path/to/templates')
+ ... ])
+
+ Templates can be precompiled with :meth:`Environment.compile_templates`.
+ """
+
+ has_source_access = False
+
+ def __init__(self, path):
+ package_name = '_jinja2_module_templates_%x' % id(self)
+
+ # create a fake module that looks for the templates in the
+ # path given.
+ mod = _TemplateModule(package_name)
+ if isinstance(path, string_types):
+ path = [path]
+ else:
+ path = list(path)
+ mod.__path__ = path
+
+ sys.modules[package_name] = weakref.proxy(mod,
+ lambda x: sys.modules.pop(package_name, None))
+
+ # the only strong reference, the sys.modules entry is weak
+ # so that the garbage collector can remove it once the
+ # loader that created it goes out of business.
+ self.module = mod
+ self.package_name = package_name
+
+ @staticmethod
+ def get_template_key(name):
+ return 'tmpl_' + sha1(name.encode('utf-8')).hexdigest()
+
+ @staticmethod
+ def get_module_filename(name):
+ return ModuleLoader.get_template_key(name) + '.py'
+
+ @internalcode
+ def load(self, environment, name, globals=None):
+ key = self.get_template_key(name)
+ module = '%s.%s' % (self.package_name, key)
+ mod = getattr(self.module, module, None)
+ if mod is None:
+ try:
+ mod = __import__(module, None, None, ['root'])
+ except ImportError:
+ raise TemplateNotFound(name)
+
+ # remove the entry from sys.modules, we only want the attribute
+ # on the module object we have stored on the loader.
+ sys.modules.pop(module, None)
+
+ return environment.template_class.from_module_dict(
+ environment, mod.__dict__, globals)
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/jinja2/loaders.pyc b/Assignments/microblog/flask/lib/python2.7/site-packages/jinja2/loaders.pyc
new file mode 100644
index 0000000..e91fd06
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/jinja2/loaders.pyc differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/jinja2/meta.py b/Assignments/microblog/flask/lib/python2.7/site-packages/jinja2/meta.py
new file mode 100644
index 0000000..3dbab7c
--- /dev/null
+++ b/Assignments/microblog/flask/lib/python2.7/site-packages/jinja2/meta.py
@@ -0,0 +1,103 @@
+# -*- coding: utf-8 -*-
+"""
+ jinja2.meta
+ ~~~~~~~~~~~
+
+ This module implements various functions that exposes information about
+ templates that might be interesting for various kinds of applications.
+
+ :copyright: (c) 2010 by the Jinja Team, see AUTHORS for more details.
+ :license: BSD, see LICENSE for more details.
+"""
+from jinja2 import nodes
+from jinja2.compiler import CodeGenerator
+from jinja2._compat import string_types
+
+
+class TrackingCodeGenerator(CodeGenerator):
+ """We abuse the code generator for introspection."""
+
+ def __init__(self, environment):
+ CodeGenerator.__init__(self, environment, '',
+ '')
+ self.undeclared_identifiers = set()
+
+ def write(self, x):
+ """Don't write."""
+
+ def pull_locals(self, frame):
+ """Remember all undeclared identifiers."""
+ self.undeclared_identifiers.update(frame.identifiers.undeclared)
+
+
+def find_undeclared_variables(ast):
+ """Returns a set of all variables in the AST that will be looked up from
+ the context at runtime. Because at compile time it's not known which
+ variables will be used depending on the path the execution takes at
+ runtime, all variables are returned.
+
+ >>> from jinja2 import Environment, meta
+ >>> env = Environment()
+ >>> ast = env.parse('{% set foo = 42 %}{{ bar + foo }}')
+ >>> meta.find_undeclared_variables(ast) == set(['bar'])
+ True
+
+ .. admonition:: Implementation
+
+ Internally the code generator is used for finding undeclared variables.
+ This is good to know because the code generator might raise a
+ :exc:`TemplateAssertionError` during compilation and as a matter of
+ fact this function can currently raise that exception as well.
+ """
+ codegen = TrackingCodeGenerator(ast.environment)
+ codegen.visit(ast)
+ return codegen.undeclared_identifiers
+
+
+def find_referenced_templates(ast):
+ """Finds all the referenced templates from the AST. This will return an
+ iterator over all the hardcoded template extensions, inclusions and
+ imports. If dynamic inheritance or inclusion is used, `None` will be
+ yielded.
+
+ >>> from jinja2 import Environment, meta
+ >>> env = Environment()
+ >>> ast = env.parse('{% extends "layout.html" %}{% include helper %}')
+ >>> list(meta.find_referenced_templates(ast))
+ ['layout.html', None]
+
+ This function is useful for dependency tracking. For example if you want
+ to rebuild parts of the website after a layout template has changed.
+ """
+ for node in ast.find_all((nodes.Extends, nodes.FromImport, nodes.Import,
+ nodes.Include)):
+ if not isinstance(node.template, nodes.Const):
+ # a tuple with some non consts in there
+ if isinstance(node.template, (nodes.Tuple, nodes.List)):
+ for template_name in node.template.items:
+ # something const, only yield the strings and ignore
+ # non-string consts that really just make no sense
+ if isinstance(template_name, nodes.Const):
+ if isinstance(template_name.value, string_types):
+ yield template_name.value
+ # something dynamic in there
+ else:
+ yield None
+ # something dynamic we don't know about here
+ else:
+ yield None
+ continue
+ # constant is a basestring, direct template name
+ if isinstance(node.template.value, string_types):
+ yield node.template.value
+ # a tuple or list (latter *should* not happen) made of consts,
+ # yield the consts that are strings. We could warn here for
+ # non string values
+ elif isinstance(node, nodes.Include) and \
+ isinstance(node.template.value, (tuple, list)):
+ for template_name in node.template.value:
+ if isinstance(template_name, string_types):
+ yield template_name
+ # something else we don't care about, we could warn here
+ else:
+ yield None
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/jinja2/meta.pyc b/Assignments/microblog/flask/lib/python2.7/site-packages/jinja2/meta.pyc
new file mode 100644
index 0000000..f27b64c
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/jinja2/meta.pyc differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/jinja2/nodes.py b/Assignments/microblog/flask/lib/python2.7/site-packages/jinja2/nodes.py
new file mode 100644
index 0000000..d32046c
--- /dev/null
+++ b/Assignments/microblog/flask/lib/python2.7/site-packages/jinja2/nodes.py
@@ -0,0 +1,919 @@
+# -*- coding: utf-8 -*-
+"""
+ jinja2.nodes
+ ~~~~~~~~~~~~
+
+ This module implements additional nodes derived from the ast base node.
+
+ It also provides some node tree helper functions like `in_lineno` and
+ `get_nodes` used by the parser and translator in order to normalize
+ python and jinja nodes.
+
+ :copyright: (c) 2010 by the Jinja Team.
+ :license: BSD, see LICENSE for more details.
+"""
+import types
+import operator
+
+from collections import deque
+from jinja2.utils import Markup
+from jinja2._compat import izip, with_metaclass, text_type
+
+
+#: the types we support for context functions
+_context_function_types = (types.FunctionType, types.MethodType)
+
+
+_binop_to_func = {
+ '*': operator.mul,
+ '/': operator.truediv,
+ '//': operator.floordiv,
+ '**': operator.pow,
+ '%': operator.mod,
+ '+': operator.add,
+ '-': operator.sub
+}
+
+_uaop_to_func = {
+ 'not': operator.not_,
+ '+': operator.pos,
+ '-': operator.neg
+}
+
+_cmpop_to_func = {
+ 'eq': operator.eq,
+ 'ne': operator.ne,
+ 'gt': operator.gt,
+ 'gteq': operator.ge,
+ 'lt': operator.lt,
+ 'lteq': operator.le,
+ 'in': lambda a, b: a in b,
+ 'notin': lambda a, b: a not in b
+}
+
+
+class Impossible(Exception):
+ """Raised if the node could not perform a requested action."""
+
+
+class NodeType(type):
+ """A metaclass for nodes that handles the field and attribute
+ inheritance. fields and attributes from the parent class are
+ automatically forwarded to the child."""
+
+ def __new__(cls, name, bases, d):
+ for attr in 'fields', 'attributes':
+ storage = []
+ storage.extend(getattr(bases[0], attr, ()))
+ storage.extend(d.get(attr, ()))
+ assert len(bases) == 1, 'multiple inheritance not allowed'
+ assert len(storage) == len(set(storage)), 'layout conflict'
+ d[attr] = tuple(storage)
+ d.setdefault('abstract', False)
+ return type.__new__(cls, name, bases, d)
+
+
+class EvalContext(object):
+ """Holds evaluation time information. Custom attributes can be attached
+ to it in extensions.
+ """
+
+ def __init__(self, environment, template_name=None):
+ self.environment = environment
+ if callable(environment.autoescape):
+ self.autoescape = environment.autoescape(template_name)
+ else:
+ self.autoescape = environment.autoescape
+ self.volatile = False
+
+ def save(self):
+ return self.__dict__.copy()
+
+ def revert(self, old):
+ self.__dict__.clear()
+ self.__dict__.update(old)
+
+
+def get_eval_context(node, ctx):
+ if ctx is None:
+ if node.environment is None:
+ raise RuntimeError('if no eval context is passed, the '
+ 'node must have an attached '
+ 'environment.')
+ return EvalContext(node.environment)
+ return ctx
+
+
+class Node(with_metaclass(NodeType, object)):
+ """Baseclass for all Jinja2 nodes. There are a number of nodes available
+ of different types. There are four major types:
+
+ - :class:`Stmt`: statements
+ - :class:`Expr`: expressions
+ - :class:`Helper`: helper nodes
+ - :class:`Template`: the outermost wrapper node
+
+ All nodes have fields and attributes. Fields may be other nodes, lists,
+ or arbitrary values. Fields are passed to the constructor as regular
+ positional arguments, attributes as keyword arguments. Each node has
+ two attributes: `lineno` (the line number of the node) and `environment`.
+ The `environment` attribute is set at the end of the parsing process for
+ all nodes automatically.
+ """
+ fields = ()
+ attributes = ('lineno', 'environment')
+ abstract = True
+
+ def __init__(self, *fields, **attributes):
+ if self.abstract:
+ raise TypeError('abstract nodes are not instanciable')
+ if fields:
+ if len(fields) != len(self.fields):
+ if not self.fields:
+ raise TypeError('%r takes 0 arguments' %
+ self.__class__.__name__)
+ raise TypeError('%r takes 0 or %d argument%s' % (
+ self.__class__.__name__,
+ len(self.fields),
+ len(self.fields) != 1 and 's' or ''
+ ))
+ for name, arg in izip(self.fields, fields):
+ setattr(self, name, arg)
+ for attr in self.attributes:
+ setattr(self, attr, attributes.pop(attr, None))
+ if attributes:
+ raise TypeError('unknown attribute %r' %
+ next(iter(attributes)))
+
+ def iter_fields(self, exclude=None, only=None):
+ """This method iterates over all fields that are defined and yields
+ ``(key, value)`` tuples. Per default all fields are returned, but
+ it's possible to limit that to some fields by providing the `only`
+ parameter or to exclude some using the `exclude` parameter. Both
+ should be sets or tuples of field names.
+ """
+ for name in self.fields:
+ if (exclude is only is None) or \
+ (exclude is not None and name not in exclude) or \
+ (only is not None and name in only):
+ try:
+ yield name, getattr(self, name)
+ except AttributeError:
+ pass
+
+ def iter_child_nodes(self, exclude=None, only=None):
+ """Iterates over all direct child nodes of the node. This iterates
+ over all fields and yields the values of they are nodes. If the value
+ of a field is a list all the nodes in that list are returned.
+ """
+ for field, item in self.iter_fields(exclude, only):
+ if isinstance(item, list):
+ for n in item:
+ if isinstance(n, Node):
+ yield n
+ elif isinstance(item, Node):
+ yield item
+
+ def find(self, node_type):
+ """Find the first node of a given type. If no such node exists the
+ return value is `None`.
+ """
+ for result in self.find_all(node_type):
+ return result
+
+ def find_all(self, node_type):
+ """Find all the nodes of a given type. If the type is a tuple,
+ the check is performed for any of the tuple items.
+ """
+ for child in self.iter_child_nodes():
+ if isinstance(child, node_type):
+ yield child
+ for result in child.find_all(node_type):
+ yield result
+
+ def set_ctx(self, ctx):
+ """Reset the context of a node and all child nodes. Per default the
+ parser will all generate nodes that have a 'load' context as it's the
+ most common one. This method is used in the parser to set assignment
+ targets and other nodes to a store context.
+ """
+ todo = deque([self])
+ while todo:
+ node = todo.popleft()
+ if 'ctx' in node.fields:
+ node.ctx = ctx
+ todo.extend(node.iter_child_nodes())
+ return self
+
+ def set_lineno(self, lineno, override=False):
+ """Set the line numbers of the node and children."""
+ todo = deque([self])
+ while todo:
+ node = todo.popleft()
+ if 'lineno' in node.attributes:
+ if node.lineno is None or override:
+ node.lineno = lineno
+ todo.extend(node.iter_child_nodes())
+ return self
+
+ def set_environment(self, environment):
+ """Set the environment for all nodes."""
+ todo = deque([self])
+ while todo:
+ node = todo.popleft()
+ node.environment = environment
+ todo.extend(node.iter_child_nodes())
+ return self
+
+ def __eq__(self, other):
+ return type(self) is type(other) and \
+ tuple(self.iter_fields()) == tuple(other.iter_fields())
+
+ def __ne__(self, other):
+ return not self.__eq__(other)
+
+ # Restore Python 2 hashing behavior on Python 3
+ __hash__ = object.__hash__
+
+ def __repr__(self):
+ return '%s(%s)' % (
+ self.__class__.__name__,
+ ', '.join('%s=%r' % (arg, getattr(self, arg, None)) for
+ arg in self.fields)
+ )
+
+
+class Stmt(Node):
+ """Base node for all statements."""
+ abstract = True
+
+
+class Helper(Node):
+ """Nodes that exist in a specific context only."""
+ abstract = True
+
+
+class Template(Node):
+ """Node that represents a template. This must be the outermost node that
+ is passed to the compiler.
+ """
+ fields = ('body',)
+
+
+class Output(Stmt):
+ """A node that holds multiple expressions which are then printed out.
+ This is used both for the `print` statement and the regular template data.
+ """
+ fields = ('nodes',)
+
+
+class Extends(Stmt):
+ """Represents an extends statement."""
+ fields = ('template',)
+
+
+class For(Stmt):
+ """The for loop. `target` is the target for the iteration (usually a
+ :class:`Name` or :class:`Tuple`), `iter` the iterable. `body` is a list
+ of nodes that are used as loop-body, and `else_` a list of nodes for the
+ `else` block. If no else node exists it has to be an empty list.
+
+ For filtered nodes an expression can be stored as `test`, otherwise `None`.
+ """
+ fields = ('target', 'iter', 'body', 'else_', 'test', 'recursive')
+
+
+class If(Stmt):
+ """If `test` is true, `body` is rendered, else `else_`."""
+ fields = ('test', 'body', 'else_')
+
+
+class Macro(Stmt):
+ """A macro definition. `name` is the name of the macro, `args` a list of
+ arguments and `defaults` a list of defaults if there are any. `body` is
+ a list of nodes for the macro body.
+ """
+ fields = ('name', 'args', 'defaults', 'body')
+
+
+class CallBlock(Stmt):
+ """Like a macro without a name but a call instead. `call` is called with
+ the unnamed macro as `caller` argument this node holds.
+ """
+ fields = ('call', 'args', 'defaults', 'body')
+
+
+class FilterBlock(Stmt):
+ """Node for filter sections."""
+ fields = ('body', 'filter')
+
+
+class Block(Stmt):
+ """A node that represents a block."""
+ fields = ('name', 'body', 'scoped')
+
+
+class Include(Stmt):
+ """A node that represents the include tag."""
+ fields = ('template', 'with_context', 'ignore_missing')
+
+
+class Import(Stmt):
+ """A node that represents the import tag."""
+ fields = ('template', 'target', 'with_context')
+
+
+class FromImport(Stmt):
+ """A node that represents the from import tag. It's important to not
+ pass unsafe names to the name attribute. The compiler translates the
+ attribute lookups directly into getattr calls and does *not* use the
+ subscript callback of the interface. As exported variables may not
+ start with double underscores (which the parser asserts) this is not a
+ problem for regular Jinja code, but if this node is used in an extension
+ extra care must be taken.
+
+ The list of names may contain tuples if aliases are wanted.
+ """
+ fields = ('template', 'names', 'with_context')
+
+
+class ExprStmt(Stmt):
+ """A statement that evaluates an expression and discards the result."""
+ fields = ('node',)
+
+
+class Assign(Stmt):
+ """Assigns an expression to a target."""
+ fields = ('target', 'node')
+
+
+class AssignBlock(Stmt):
+ """Assigns a block to a target."""
+ fields = ('target', 'body')
+
+
+class Expr(Node):
+ """Baseclass for all expressions."""
+ abstract = True
+
+ def as_const(self, eval_ctx=None):
+ """Return the value of the expression as constant or raise
+ :exc:`Impossible` if this was not possible.
+
+ An :class:`EvalContext` can be provided, if none is given
+ a default context is created which requires the nodes to have
+ an attached environment.
+
+ .. versionchanged:: 2.4
+ the `eval_ctx` parameter was added.
+ """
+ raise Impossible()
+
+ def can_assign(self):
+ """Check if it's possible to assign something to this node."""
+ return False
+
+
+class BinExpr(Expr):
+ """Baseclass for all binary expressions."""
+ fields = ('left', 'right')
+ operator = None
+ abstract = True
+
+ def as_const(self, eval_ctx=None):
+ eval_ctx = get_eval_context(self, eval_ctx)
+ # intercepted operators cannot be folded at compile time
+ if self.environment.sandboxed and \
+ self.operator in self.environment.intercepted_binops:
+ raise Impossible()
+ f = _binop_to_func[self.operator]
+ try:
+ return f(self.left.as_const(eval_ctx), self.right.as_const(eval_ctx))
+ except Exception:
+ raise Impossible()
+
+
+class UnaryExpr(Expr):
+ """Baseclass for all unary expressions."""
+ fields = ('node',)
+ operator = None
+ abstract = True
+
+ def as_const(self, eval_ctx=None):
+ eval_ctx = get_eval_context(self, eval_ctx)
+ # intercepted operators cannot be folded at compile time
+ if self.environment.sandboxed and \
+ self.operator in self.environment.intercepted_unops:
+ raise Impossible()
+ f = _uaop_to_func[self.operator]
+ try:
+ return f(self.node.as_const(eval_ctx))
+ except Exception:
+ raise Impossible()
+
+
+class Name(Expr):
+ """Looks up a name or stores a value in a name.
+ The `ctx` of the node can be one of the following values:
+
+ - `store`: store a value in the name
+ - `load`: load that name
+ - `param`: like `store` but if the name was defined as function parameter.
+ """
+ fields = ('name', 'ctx')
+
+ def can_assign(self):
+ return self.name not in ('true', 'false', 'none',
+ 'True', 'False', 'None')
+
+
+class Literal(Expr):
+ """Baseclass for literals."""
+ abstract = True
+
+
+class Const(Literal):
+ """All constant values. The parser will return this node for simple
+ constants such as ``42`` or ``"foo"`` but it can be used to store more
+ complex values such as lists too. Only constants with a safe
+ representation (objects where ``eval(repr(x)) == x`` is true).
+ """
+ fields = ('value',)
+
+ def as_const(self, eval_ctx=None):
+ return self.value
+
+ @classmethod
+ def from_untrusted(cls, value, lineno=None, environment=None):
+ """Return a const object if the value is representable as
+ constant value in the generated code, otherwise it will raise
+ an `Impossible` exception.
+ """
+ from .compiler import has_safe_repr
+ if not has_safe_repr(value):
+ raise Impossible()
+ return cls(value, lineno=lineno, environment=environment)
+
+
+class TemplateData(Literal):
+ """A constant template string."""
+ fields = ('data',)
+
+ def as_const(self, eval_ctx=None):
+ eval_ctx = get_eval_context(self, eval_ctx)
+ if eval_ctx.volatile:
+ raise Impossible()
+ if eval_ctx.autoescape:
+ return Markup(self.data)
+ return self.data
+
+
+class Tuple(Literal):
+ """For loop unpacking and some other things like multiple arguments
+ for subscripts. Like for :class:`Name` `ctx` specifies if the tuple
+ is used for loading the names or storing.
+ """
+ fields = ('items', 'ctx')
+
+ def as_const(self, eval_ctx=None):
+ eval_ctx = get_eval_context(self, eval_ctx)
+ return tuple(x.as_const(eval_ctx) for x in self.items)
+
+ def can_assign(self):
+ for item in self.items:
+ if not item.can_assign():
+ return False
+ return True
+
+
+class List(Literal):
+ """Any list literal such as ``[1, 2, 3]``"""
+ fields = ('items',)
+
+ def as_const(self, eval_ctx=None):
+ eval_ctx = get_eval_context(self, eval_ctx)
+ return [x.as_const(eval_ctx) for x in self.items]
+
+
+class Dict(Literal):
+ """Any dict literal such as ``{1: 2, 3: 4}``. The items must be a list of
+ :class:`Pair` nodes.
+ """
+ fields = ('items',)
+
+ def as_const(self, eval_ctx=None):
+ eval_ctx = get_eval_context(self, eval_ctx)
+ return dict(x.as_const(eval_ctx) for x in self.items)
+
+
+class Pair(Helper):
+ """A key, value pair for dicts."""
+ fields = ('key', 'value')
+
+ def as_const(self, eval_ctx=None):
+ eval_ctx = get_eval_context(self, eval_ctx)
+ return self.key.as_const(eval_ctx), self.value.as_const(eval_ctx)
+
+
+class Keyword(Helper):
+ """A key, value pair for keyword arguments where key is a string."""
+ fields = ('key', 'value')
+
+ def as_const(self, eval_ctx=None):
+ eval_ctx = get_eval_context(self, eval_ctx)
+ return self.key, self.value.as_const(eval_ctx)
+
+
+class CondExpr(Expr):
+ """A conditional expression (inline if expression). (``{{
+ foo if bar else baz }}``)
+ """
+ fields = ('test', 'expr1', 'expr2')
+
+ def as_const(self, eval_ctx=None):
+ eval_ctx = get_eval_context(self, eval_ctx)
+ if self.test.as_const(eval_ctx):
+ return self.expr1.as_const(eval_ctx)
+
+ # if we evaluate to an undefined object, we better do that at runtime
+ if self.expr2 is None:
+ raise Impossible()
+
+ return self.expr2.as_const(eval_ctx)
+
+
+class Filter(Expr):
+ """This node applies a filter on an expression. `name` is the name of
+ the filter, the rest of the fields are the same as for :class:`Call`.
+
+ If the `node` of a filter is `None` the contents of the last buffer are
+ filtered. Buffers are created by macros and filter blocks.
+ """
+ fields = ('node', 'name', 'args', 'kwargs', 'dyn_args', 'dyn_kwargs')
+
+ def as_const(self, eval_ctx=None):
+ eval_ctx = get_eval_context(self, eval_ctx)
+ if eval_ctx.volatile or self.node is None:
+ raise Impossible()
+ # we have to be careful here because we call filter_ below.
+ # if this variable would be called filter, 2to3 would wrap the
+ # call in a list beause it is assuming we are talking about the
+ # builtin filter function here which no longer returns a list in
+ # python 3. because of that, do not rename filter_ to filter!
+ filter_ = self.environment.filters.get(self.name)
+ if filter_ is None or getattr(filter_, 'contextfilter', False):
+ raise Impossible()
+ obj = self.node.as_const(eval_ctx)
+ args = [x.as_const(eval_ctx) for x in self.args]
+ if getattr(filter_, 'evalcontextfilter', False):
+ args.insert(0, eval_ctx)
+ elif getattr(filter_, 'environmentfilter', False):
+ args.insert(0, self.environment)
+ kwargs = dict(x.as_const(eval_ctx) for x in self.kwargs)
+ if self.dyn_args is not None:
+ try:
+ args.extend(self.dyn_args.as_const(eval_ctx))
+ except Exception:
+ raise Impossible()
+ if self.dyn_kwargs is not None:
+ try:
+ kwargs.update(self.dyn_kwargs.as_const(eval_ctx))
+ except Exception:
+ raise Impossible()
+ try:
+ return filter_(obj, *args, **kwargs)
+ except Exception:
+ raise Impossible()
+
+
+class Test(Expr):
+ """Applies a test on an expression. `name` is the name of the test, the
+ rest of the fields are the same as for :class:`Call`.
+ """
+ fields = ('node', 'name', 'args', 'kwargs', 'dyn_args', 'dyn_kwargs')
+
+
+class Call(Expr):
+ """Calls an expression. `args` is a list of arguments, `kwargs` a list
+ of keyword arguments (list of :class:`Keyword` nodes), and `dyn_args`
+ and `dyn_kwargs` has to be either `None` or a node that is used as
+ node for dynamic positional (``*args``) or keyword (``**kwargs``)
+ arguments.
+ """
+ fields = ('node', 'args', 'kwargs', 'dyn_args', 'dyn_kwargs')
+
+ def as_const(self, eval_ctx=None):
+ eval_ctx = get_eval_context(self, eval_ctx)
+ if eval_ctx.volatile:
+ raise Impossible()
+ obj = self.node.as_const(eval_ctx)
+
+ # don't evaluate context functions
+ args = [x.as_const(eval_ctx) for x in self.args]
+ if isinstance(obj, _context_function_types):
+ if getattr(obj, 'contextfunction', False):
+ raise Impossible()
+ elif getattr(obj, 'evalcontextfunction', False):
+ args.insert(0, eval_ctx)
+ elif getattr(obj, 'environmentfunction', False):
+ args.insert(0, self.environment)
+
+ kwargs = dict(x.as_const(eval_ctx) for x in self.kwargs)
+ if self.dyn_args is not None:
+ try:
+ args.extend(self.dyn_args.as_const(eval_ctx))
+ except Exception:
+ raise Impossible()
+ if self.dyn_kwargs is not None:
+ try:
+ kwargs.update(self.dyn_kwargs.as_const(eval_ctx))
+ except Exception:
+ raise Impossible()
+ try:
+ return obj(*args, **kwargs)
+ except Exception:
+ raise Impossible()
+
+
+class Getitem(Expr):
+ """Get an attribute or item from an expression and prefer the item."""
+ fields = ('node', 'arg', 'ctx')
+
+ def as_const(self, eval_ctx=None):
+ eval_ctx = get_eval_context(self, eval_ctx)
+ if self.ctx != 'load':
+ raise Impossible()
+ try:
+ return self.environment.getitem(self.node.as_const(eval_ctx),
+ self.arg.as_const(eval_ctx))
+ except Exception:
+ raise Impossible()
+
+ def can_assign(self):
+ return False
+
+
+class Getattr(Expr):
+ """Get an attribute or item from an expression that is a ascii-only
+ bytestring and prefer the attribute.
+ """
+ fields = ('node', 'attr', 'ctx')
+
+ def as_const(self, eval_ctx=None):
+ if self.ctx != 'load':
+ raise Impossible()
+ try:
+ eval_ctx = get_eval_context(self, eval_ctx)
+ return self.environment.getattr(self.node.as_const(eval_ctx),
+ self.attr)
+ except Exception:
+ raise Impossible()
+
+ def can_assign(self):
+ return False
+
+
+class Slice(Expr):
+ """Represents a slice object. This must only be used as argument for
+ :class:`Subscript`.
+ """
+ fields = ('start', 'stop', 'step')
+
+ def as_const(self, eval_ctx=None):
+ eval_ctx = get_eval_context(self, eval_ctx)
+ def const(obj):
+ if obj is None:
+ return None
+ return obj.as_const(eval_ctx)
+ return slice(const(self.start), const(self.stop), const(self.step))
+
+
+class Concat(Expr):
+ """Concatenates the list of expressions provided after converting them to
+ unicode.
+ """
+ fields = ('nodes',)
+
+ def as_const(self, eval_ctx=None):
+ eval_ctx = get_eval_context(self, eval_ctx)
+ return ''.join(text_type(x.as_const(eval_ctx)) for x in self.nodes)
+
+
+class Compare(Expr):
+ """Compares an expression with some other expressions. `ops` must be a
+ list of :class:`Operand`\s.
+ """
+ fields = ('expr', 'ops')
+
+ def as_const(self, eval_ctx=None):
+ eval_ctx = get_eval_context(self, eval_ctx)
+ result = value = self.expr.as_const(eval_ctx)
+ try:
+ for op in self.ops:
+ new_value = op.expr.as_const(eval_ctx)
+ result = _cmpop_to_func[op.op](value, new_value)
+ value = new_value
+ except Exception:
+ raise Impossible()
+ return result
+
+
+class Operand(Helper):
+ """Holds an operator and an expression."""
+ fields = ('op', 'expr')
+
+if __debug__:
+ Operand.__doc__ += '\nThe following operators are available: ' + \
+ ', '.join(sorted('``%s``' % x for x in set(_binop_to_func) |
+ set(_uaop_to_func) | set(_cmpop_to_func)))
+
+
+class Mul(BinExpr):
+ """Multiplies the left with the right node."""
+ operator = '*'
+
+
+class Div(BinExpr):
+ """Divides the left by the right node."""
+ operator = '/'
+
+
+class FloorDiv(BinExpr):
+ """Divides the left by the right node and truncates conver the
+ result into an integer by truncating.
+ """
+ operator = '//'
+
+
+class Add(BinExpr):
+ """Add the left to the right node."""
+ operator = '+'
+
+
+class Sub(BinExpr):
+ """Subtract the right from the left node."""
+ operator = '-'
+
+
+class Mod(BinExpr):
+ """Left modulo right."""
+ operator = '%'
+
+
+class Pow(BinExpr):
+ """Left to the power of right."""
+ operator = '**'
+
+
+class And(BinExpr):
+ """Short circuited AND."""
+ operator = 'and'
+
+ def as_const(self, eval_ctx=None):
+ eval_ctx = get_eval_context(self, eval_ctx)
+ return self.left.as_const(eval_ctx) and self.right.as_const(eval_ctx)
+
+
+class Or(BinExpr):
+ """Short circuited OR."""
+ operator = 'or'
+
+ def as_const(self, eval_ctx=None):
+ eval_ctx = get_eval_context(self, eval_ctx)
+ return self.left.as_const(eval_ctx) or self.right.as_const(eval_ctx)
+
+
+class Not(UnaryExpr):
+ """Negate the expression."""
+ operator = 'not'
+
+
+class Neg(UnaryExpr):
+ """Make the expression negative."""
+ operator = '-'
+
+
+class Pos(UnaryExpr):
+ """Make the expression positive (noop for most expressions)"""
+ operator = '+'
+
+
+# Helpers for extensions
+
+
+class EnvironmentAttribute(Expr):
+ """Loads an attribute from the environment object. This is useful for
+ extensions that want to call a callback stored on the environment.
+ """
+ fields = ('name',)
+
+
+class ExtensionAttribute(Expr):
+ """Returns the attribute of an extension bound to the environment.
+ The identifier is the identifier of the :class:`Extension`.
+
+ This node is usually constructed by calling the
+ :meth:`~jinja2.ext.Extension.attr` method on an extension.
+ """
+ fields = ('identifier', 'name')
+
+
+class ImportedName(Expr):
+ """If created with an import name the import name is returned on node
+ access. For example ``ImportedName('cgi.escape')`` returns the `escape`
+ function from the cgi module on evaluation. Imports are optimized by the
+ compiler so there is no need to assign them to local variables.
+ """
+ fields = ('importname',)
+
+
+class InternalName(Expr):
+ """An internal name in the compiler. You cannot create these nodes
+ yourself but the parser provides a
+ :meth:`~jinja2.parser.Parser.free_identifier` method that creates
+ a new identifier for you. This identifier is not available from the
+ template and is not threated specially by the compiler.
+ """
+ fields = ('name',)
+
+ def __init__(self):
+ raise TypeError('Can\'t create internal names. Use the '
+ '`free_identifier` method on a parser.')
+
+
+class MarkSafe(Expr):
+ """Mark the wrapped expression as safe (wrap it as `Markup`)."""
+ fields = ('expr',)
+
+ def as_const(self, eval_ctx=None):
+ eval_ctx = get_eval_context(self, eval_ctx)
+ return Markup(self.expr.as_const(eval_ctx))
+
+
+class MarkSafeIfAutoescape(Expr):
+ """Mark the wrapped expression as safe (wrap it as `Markup`) but
+ only if autoescaping is active.
+
+ .. versionadded:: 2.5
+ """
+ fields = ('expr',)
+
+ def as_const(self, eval_ctx=None):
+ eval_ctx = get_eval_context(self, eval_ctx)
+ if eval_ctx.volatile:
+ raise Impossible()
+ expr = self.expr.as_const(eval_ctx)
+ if eval_ctx.autoescape:
+ return Markup(expr)
+ return expr
+
+
+class ContextReference(Expr):
+ """Returns the current template context. It can be used like a
+ :class:`Name` node, with a ``'load'`` ctx and will return the
+ current :class:`~jinja2.runtime.Context` object.
+
+ Here an example that assigns the current template name to a
+ variable named `foo`::
+
+ Assign(Name('foo', ctx='store'),
+ Getattr(ContextReference(), 'name'))
+ """
+
+
+class Continue(Stmt):
+ """Continue a loop."""
+
+
+class Break(Stmt):
+ """Break a loop."""
+
+
+class Scope(Stmt):
+ """An artificial scope."""
+ fields = ('body',)
+
+
+class EvalContextModifier(Stmt):
+ """Modifies the eval context. For each option that should be modified,
+ a :class:`Keyword` has to be added to the :attr:`options` list.
+
+ Example to change the `autoescape` setting::
+
+ EvalContextModifier(options=[Keyword('autoescape', Const(True))])
+ """
+ fields = ('options',)
+
+
+class ScopedEvalContextModifier(EvalContextModifier):
+ """Modifies the eval context and reverts it later. Works exactly like
+ :class:`EvalContextModifier` but will only modify the
+ :class:`~jinja2.nodes.EvalContext` for nodes in the :attr:`body`.
+ """
+ fields = ('body',)
+
+
+# make sure nobody creates custom nodes
+def _failing_new(*args, **kwargs):
+ raise TypeError('can\'t create custom node types')
+NodeType.__new__ = staticmethod(_failing_new); del _failing_new
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/jinja2/nodes.pyc b/Assignments/microblog/flask/lib/python2.7/site-packages/jinja2/nodes.pyc
new file mode 100644
index 0000000..2953190
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/jinja2/nodes.pyc differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/jinja2/optimizer.py b/Assignments/microblog/flask/lib/python2.7/site-packages/jinja2/optimizer.py
new file mode 100644
index 0000000..00eab11
--- /dev/null
+++ b/Assignments/microblog/flask/lib/python2.7/site-packages/jinja2/optimizer.py
@@ -0,0 +1,68 @@
+# -*- coding: utf-8 -*-
+"""
+ jinja2.optimizer
+ ~~~~~~~~~~~~~~~~
+
+ The jinja optimizer is currently trying to constant fold a few expressions
+ and modify the AST in place so that it should be easier to evaluate it.
+
+ Because the AST does not contain all the scoping information and the
+ compiler has to find that out, we cannot do all the optimizations we
+ want. For example loop unrolling doesn't work because unrolled loops would
+ have a different scoping.
+
+ The solution would be a second syntax tree that has the scoping rules stored.
+
+ :copyright: (c) 2010 by the Jinja Team.
+ :license: BSD.
+"""
+from jinja2 import nodes
+from jinja2.visitor import NodeTransformer
+
+
+def optimize(node, environment):
+ """The context hint can be used to perform an static optimization
+ based on the context given."""
+ optimizer = Optimizer(environment)
+ return optimizer.visit(node)
+
+
+class Optimizer(NodeTransformer):
+
+ def __init__(self, environment):
+ self.environment = environment
+
+ def visit_If(self, node):
+ """Eliminate dead code."""
+ # do not optimize ifs that have a block inside so that it doesn't
+ # break super().
+ if node.find(nodes.Block) is not None:
+ return self.generic_visit(node)
+ try:
+ val = self.visit(node.test).as_const()
+ except nodes.Impossible:
+ return self.generic_visit(node)
+ if val:
+ body = node.body
+ else:
+ body = node.else_
+ result = []
+ for node in body:
+ result.extend(self.visit_list(node))
+ return result
+
+ def fold(self, node):
+ """Do constant folding."""
+ node = self.generic_visit(node)
+ try:
+ return nodes.Const.from_untrusted(node.as_const(),
+ lineno=node.lineno,
+ environment=self.environment)
+ except nodes.Impossible:
+ return node
+
+ visit_Add = visit_Sub = visit_Mul = visit_Div = visit_FloorDiv = \
+ visit_Pow = visit_Mod = visit_And = visit_Or = visit_Pos = visit_Neg = \
+ visit_Not = visit_Compare = visit_Getitem = visit_Getattr = visit_Call = \
+ visit_Filter = visit_Test = visit_CondExpr = fold
+ del fold
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/jinja2/optimizer.pyc b/Assignments/microblog/flask/lib/python2.7/site-packages/jinja2/optimizer.pyc
new file mode 100644
index 0000000..dc4f2a4
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/jinja2/optimizer.pyc differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/jinja2/parser.py b/Assignments/microblog/flask/lib/python2.7/site-packages/jinja2/parser.py
new file mode 100644
index 0000000..d24da18
--- /dev/null
+++ b/Assignments/microblog/flask/lib/python2.7/site-packages/jinja2/parser.py
@@ -0,0 +1,899 @@
+# -*- coding: utf-8 -*-
+"""
+ jinja2.parser
+ ~~~~~~~~~~~~~
+
+ Implements the template parser.
+
+ :copyright: (c) 2010 by the Jinja Team.
+ :license: BSD, see LICENSE for more details.
+"""
+from jinja2 import nodes
+from jinja2.exceptions import TemplateSyntaxError, TemplateAssertionError
+from jinja2.lexer import describe_token, describe_token_expr
+from jinja2._compat import imap
+
+
+_statement_keywords = frozenset(['for', 'if', 'block', 'extends', 'print',
+ 'macro', 'include', 'from', 'import',
+ 'set'])
+_compare_operators = frozenset(['eq', 'ne', 'lt', 'lteq', 'gt', 'gteq'])
+
+
+class Parser(object):
+ """This is the central parsing class Jinja2 uses. It's passed to
+ extensions and can be used to parse expressions or statements.
+ """
+
+ def __init__(self, environment, source, name=None, filename=None,
+ state=None):
+ self.environment = environment
+ self.stream = environment._tokenize(source, name, filename, state)
+ self.name = name
+ self.filename = filename
+ self.closed = False
+ self.extensions = {}
+ for extension in environment.iter_extensions():
+ for tag in extension.tags:
+ self.extensions[tag] = extension.parse
+ self._last_identifier = 0
+ self._tag_stack = []
+ self._end_token_stack = []
+
+ def fail(self, msg, lineno=None, exc=TemplateSyntaxError):
+ """Convenience method that raises `exc` with the message, passed
+ line number or last line number as well as the current name and
+ filename.
+ """
+ if lineno is None:
+ lineno = self.stream.current.lineno
+ raise exc(msg, lineno, self.name, self.filename)
+
+ def _fail_ut_eof(self, name, end_token_stack, lineno):
+ expected = []
+ for exprs in end_token_stack:
+ expected.extend(imap(describe_token_expr, exprs))
+ if end_token_stack:
+ currently_looking = ' or '.join(
+ "'%s'" % describe_token_expr(expr)
+ for expr in end_token_stack[-1])
+ else:
+ currently_looking = None
+
+ if name is None:
+ message = ['Unexpected end of template.']
+ else:
+ message = ['Encountered unknown tag \'%s\'.' % name]
+
+ if currently_looking:
+ if name is not None and name in expected:
+ message.append('You probably made a nesting mistake. Jinja '
+ 'is expecting this tag, but currently looking '
+ 'for %s.' % currently_looking)
+ else:
+ message.append('Jinja was looking for the following tags: '
+ '%s.' % currently_looking)
+
+ if self._tag_stack:
+ message.append('The innermost block that needs to be '
+ 'closed is \'%s\'.' % self._tag_stack[-1])
+
+ self.fail(' '.join(message), lineno)
+
+ def fail_unknown_tag(self, name, lineno=None):
+ """Called if the parser encounters an unknown tag. Tries to fail
+ with a human readable error message that could help to identify
+ the problem.
+ """
+ return self._fail_ut_eof(name, self._end_token_stack, lineno)
+
+ def fail_eof(self, end_tokens=None, lineno=None):
+ """Like fail_unknown_tag but for end of template situations."""
+ stack = list(self._end_token_stack)
+ if end_tokens is not None:
+ stack.append(end_tokens)
+ return self._fail_ut_eof(None, stack, lineno)
+
+ def is_tuple_end(self, extra_end_rules=None):
+ """Are we at the end of a tuple?"""
+ if self.stream.current.type in ('variable_end', 'block_end', 'rparen'):
+ return True
+ elif extra_end_rules is not None:
+ return self.stream.current.test_any(extra_end_rules)
+ return False
+
+ def free_identifier(self, lineno=None):
+ """Return a new free identifier as :class:`~jinja2.nodes.InternalName`."""
+ self._last_identifier += 1
+ rv = object.__new__(nodes.InternalName)
+ nodes.Node.__init__(rv, 'fi%d' % self._last_identifier, lineno=lineno)
+ return rv
+
+ def parse_statement(self):
+ """Parse a single statement."""
+ token = self.stream.current
+ if token.type != 'name':
+ self.fail('tag name expected', token.lineno)
+ self._tag_stack.append(token.value)
+ pop_tag = True
+ try:
+ if token.value in _statement_keywords:
+ return getattr(self, 'parse_' + self.stream.current.value)()
+ if token.value == 'call':
+ return self.parse_call_block()
+ if token.value == 'filter':
+ return self.parse_filter_block()
+ ext = self.extensions.get(token.value)
+ if ext is not None:
+ return ext(self)
+
+ # did not work out, remove the token we pushed by accident
+ # from the stack so that the unknown tag fail function can
+ # produce a proper error message.
+ self._tag_stack.pop()
+ pop_tag = False
+ self.fail_unknown_tag(token.value, token.lineno)
+ finally:
+ if pop_tag:
+ self._tag_stack.pop()
+
+ def parse_statements(self, end_tokens, drop_needle=False):
+ """Parse multiple statements into a list until one of the end tokens
+ is reached. This is used to parse the body of statements as it also
+ parses template data if appropriate. The parser checks first if the
+ current token is a colon and skips it if there is one. Then it checks
+ for the block end and parses until if one of the `end_tokens` is
+ reached. Per default the active token in the stream at the end of
+ the call is the matched end token. If this is not wanted `drop_needle`
+ can be set to `True` and the end token is removed.
+ """
+ # the first token may be a colon for python compatibility
+ self.stream.skip_if('colon')
+
+ # in the future it would be possible to add whole code sections
+ # by adding some sort of end of statement token and parsing those here.
+ self.stream.expect('block_end')
+ result = self.subparse(end_tokens)
+
+ # we reached the end of the template too early, the subparser
+ # does not check for this, so we do that now
+ if self.stream.current.type == 'eof':
+ self.fail_eof(end_tokens)
+
+ if drop_needle:
+ next(self.stream)
+ return result
+
+ def parse_set(self):
+ """Parse an assign statement."""
+ lineno = next(self.stream).lineno
+ target = self.parse_assign_target()
+ if self.stream.skip_if('assign'):
+ expr = self.parse_tuple()
+ return nodes.Assign(target, expr, lineno=lineno)
+ body = self.parse_statements(('name:endset',),
+ drop_needle=True)
+ return nodes.AssignBlock(target, body, lineno=lineno)
+
+ def parse_for(self):
+ """Parse a for loop."""
+ lineno = self.stream.expect('name:for').lineno
+ target = self.parse_assign_target(extra_end_rules=('name:in',))
+ self.stream.expect('name:in')
+ iter = self.parse_tuple(with_condexpr=False,
+ extra_end_rules=('name:recursive',))
+ test = None
+ if self.stream.skip_if('name:if'):
+ test = self.parse_expression()
+ recursive = self.stream.skip_if('name:recursive')
+ body = self.parse_statements(('name:endfor', 'name:else'))
+ if next(self.stream).value == 'endfor':
+ else_ = []
+ else:
+ else_ = self.parse_statements(('name:endfor',), drop_needle=True)
+ return nodes.For(target, iter, body, else_, test,
+ recursive, lineno=lineno)
+
+ def parse_if(self):
+ """Parse an if construct."""
+ node = result = nodes.If(lineno=self.stream.expect('name:if').lineno)
+ while 1:
+ node.test = self.parse_tuple(with_condexpr=False)
+ node.body = self.parse_statements(('name:elif', 'name:else',
+ 'name:endif'))
+ token = next(self.stream)
+ if token.test('name:elif'):
+ new_node = nodes.If(lineno=self.stream.current.lineno)
+ node.else_ = [new_node]
+ node = new_node
+ continue
+ elif token.test('name:else'):
+ node.else_ = self.parse_statements(('name:endif',),
+ drop_needle=True)
+ else:
+ node.else_ = []
+ break
+ return result
+
+ def parse_block(self):
+ node = nodes.Block(lineno=next(self.stream).lineno)
+ node.name = self.stream.expect('name').value
+ node.scoped = self.stream.skip_if('name:scoped')
+
+ # common problem people encounter when switching from django
+ # to jinja. we do not support hyphens in block names, so let's
+ # raise a nicer error message in that case.
+ if self.stream.current.type == 'sub':
+ self.fail('Block names in Jinja have to be valid Python '
+ 'identifiers and may not contain hyphens, use an '
+ 'underscore instead.')
+
+ node.body = self.parse_statements(('name:endblock',), drop_needle=True)
+ self.stream.skip_if('name:' + node.name)
+ return node
+
+ def parse_extends(self):
+ node = nodes.Extends(lineno=next(self.stream).lineno)
+ node.template = self.parse_expression()
+ return node
+
+ def parse_import_context(self, node, default):
+ if self.stream.current.test_any('name:with', 'name:without') and \
+ self.stream.look().test('name:context'):
+ node.with_context = next(self.stream).value == 'with'
+ self.stream.skip()
+ else:
+ node.with_context = default
+ return node
+
+ def parse_include(self):
+ node = nodes.Include(lineno=next(self.stream).lineno)
+ node.template = self.parse_expression()
+ if self.stream.current.test('name:ignore') and \
+ self.stream.look().test('name:missing'):
+ node.ignore_missing = True
+ self.stream.skip(2)
+ else:
+ node.ignore_missing = False
+ return self.parse_import_context(node, True)
+
+ def parse_import(self):
+ node = nodes.Import(lineno=next(self.stream).lineno)
+ node.template = self.parse_expression()
+ self.stream.expect('name:as')
+ node.target = self.parse_assign_target(name_only=True).name
+ return self.parse_import_context(node, False)
+
+ def parse_from(self):
+ node = nodes.FromImport(lineno=next(self.stream).lineno)
+ node.template = self.parse_expression()
+ self.stream.expect('name:import')
+ node.names = []
+
+ def parse_context():
+ if self.stream.current.value in ('with', 'without') and \
+ self.stream.look().test('name:context'):
+ node.with_context = next(self.stream).value == 'with'
+ self.stream.skip()
+ return True
+ return False
+
+ while 1:
+ if node.names:
+ self.stream.expect('comma')
+ if self.stream.current.type == 'name':
+ if parse_context():
+ break
+ target = self.parse_assign_target(name_only=True)
+ if target.name.startswith('_'):
+ self.fail('names starting with an underline can not '
+ 'be imported', target.lineno,
+ exc=TemplateAssertionError)
+ if self.stream.skip_if('name:as'):
+ alias = self.parse_assign_target(name_only=True)
+ node.names.append((target.name, alias.name))
+ else:
+ node.names.append(target.name)
+ if parse_context() or self.stream.current.type != 'comma':
+ break
+ else:
+ break
+ if not hasattr(node, 'with_context'):
+ node.with_context = False
+ self.stream.skip_if('comma')
+ return node
+
+ def parse_signature(self, node):
+ node.args = args = []
+ node.defaults = defaults = []
+ self.stream.expect('lparen')
+ while self.stream.current.type != 'rparen':
+ if args:
+ self.stream.expect('comma')
+ arg = self.parse_assign_target(name_only=True)
+ arg.set_ctx('param')
+ if self.stream.skip_if('assign'):
+ defaults.append(self.parse_expression())
+ elif defaults:
+ self.fail('non-default argument follows default argument')
+ args.append(arg)
+ self.stream.expect('rparen')
+
+ def parse_call_block(self):
+ node = nodes.CallBlock(lineno=next(self.stream).lineno)
+ if self.stream.current.type == 'lparen':
+ self.parse_signature(node)
+ else:
+ node.args = []
+ node.defaults = []
+
+ node.call = self.parse_expression()
+ if not isinstance(node.call, nodes.Call):
+ self.fail('expected call', node.lineno)
+ node.body = self.parse_statements(('name:endcall',), drop_needle=True)
+ return node
+
+ def parse_filter_block(self):
+ node = nodes.FilterBlock(lineno=next(self.stream).lineno)
+ node.filter = self.parse_filter(None, start_inline=True)
+ node.body = self.parse_statements(('name:endfilter',),
+ drop_needle=True)
+ return node
+
+ def parse_macro(self):
+ node = nodes.Macro(lineno=next(self.stream).lineno)
+ node.name = self.parse_assign_target(name_only=True).name
+ self.parse_signature(node)
+ node.body = self.parse_statements(('name:endmacro',),
+ drop_needle=True)
+ return node
+
+ def parse_print(self):
+ node = nodes.Output(lineno=next(self.stream).lineno)
+ node.nodes = []
+ while self.stream.current.type != 'block_end':
+ if node.nodes:
+ self.stream.expect('comma')
+ node.nodes.append(self.parse_expression())
+ return node
+
+ def parse_assign_target(self, with_tuple=True, name_only=False,
+ extra_end_rules=None):
+ """Parse an assignment target. As Jinja2 allows assignments to
+ tuples, this function can parse all allowed assignment targets. Per
+ default assignments to tuples are parsed, that can be disable however
+ by setting `with_tuple` to `False`. If only assignments to names are
+ wanted `name_only` can be set to `True`. The `extra_end_rules`
+ parameter is forwarded to the tuple parsing function.
+ """
+ if name_only:
+ token = self.stream.expect('name')
+ target = nodes.Name(token.value, 'store', lineno=token.lineno)
+ else:
+ if with_tuple:
+ target = self.parse_tuple(simplified=True,
+ extra_end_rules=extra_end_rules)
+ else:
+ target = self.parse_primary()
+ target.set_ctx('store')
+ if not target.can_assign():
+ self.fail('can\'t assign to %r' % target.__class__.
+ __name__.lower(), target.lineno)
+ return target
+
+ def parse_expression(self, with_condexpr=True):
+ """Parse an expression. Per default all expressions are parsed, if
+ the optional `with_condexpr` parameter is set to `False` conditional
+ expressions are not parsed.
+ """
+ if with_condexpr:
+ return self.parse_condexpr()
+ return self.parse_or()
+
+ def parse_condexpr(self):
+ lineno = self.stream.current.lineno
+ expr1 = self.parse_or()
+ while self.stream.skip_if('name:if'):
+ expr2 = self.parse_or()
+ if self.stream.skip_if('name:else'):
+ expr3 = self.parse_condexpr()
+ else:
+ expr3 = None
+ expr1 = nodes.CondExpr(expr2, expr1, expr3, lineno=lineno)
+ lineno = self.stream.current.lineno
+ return expr1
+
+ def parse_or(self):
+ lineno = self.stream.current.lineno
+ left = self.parse_and()
+ while self.stream.skip_if('name:or'):
+ right = self.parse_and()
+ left = nodes.Or(left, right, lineno=lineno)
+ lineno = self.stream.current.lineno
+ return left
+
+ def parse_and(self):
+ lineno = self.stream.current.lineno
+ left = self.parse_not()
+ while self.stream.skip_if('name:and'):
+ right = self.parse_not()
+ left = nodes.And(left, right, lineno=lineno)
+ lineno = self.stream.current.lineno
+ return left
+
+ def parse_not(self):
+ if self.stream.current.test('name:not'):
+ lineno = next(self.stream).lineno
+ return nodes.Not(self.parse_not(), lineno=lineno)
+ return self.parse_compare()
+
+ def parse_compare(self):
+ lineno = self.stream.current.lineno
+ expr = self.parse_add()
+ ops = []
+ while 1:
+ token_type = self.stream.current.type
+ if token_type in _compare_operators:
+ next(self.stream)
+ ops.append(nodes.Operand(token_type, self.parse_add()))
+ elif self.stream.skip_if('name:in'):
+ ops.append(nodes.Operand('in', self.parse_add()))
+ elif (self.stream.current.test('name:not') and
+ self.stream.look().test('name:in')):
+ self.stream.skip(2)
+ ops.append(nodes.Operand('notin', self.parse_add()))
+ else:
+ break
+ lineno = self.stream.current.lineno
+ if not ops:
+ return expr
+ return nodes.Compare(expr, ops, lineno=lineno)
+
+ def parse_add(self):
+ lineno = self.stream.current.lineno
+ left = self.parse_sub()
+ while self.stream.current.type == 'add':
+ next(self.stream)
+ right = self.parse_sub()
+ left = nodes.Add(left, right, lineno=lineno)
+ lineno = self.stream.current.lineno
+ return left
+
+ def parse_sub(self):
+ lineno = self.stream.current.lineno
+ left = self.parse_concat()
+ while self.stream.current.type == 'sub':
+ next(self.stream)
+ right = self.parse_concat()
+ left = nodes.Sub(left, right, lineno=lineno)
+ lineno = self.stream.current.lineno
+ return left
+
+ def parse_concat(self):
+ lineno = self.stream.current.lineno
+ args = [self.parse_mul()]
+ while self.stream.current.type == 'tilde':
+ next(self.stream)
+ args.append(self.parse_mul())
+ if len(args) == 1:
+ return args[0]
+ return nodes.Concat(args, lineno=lineno)
+
+ def parse_mul(self):
+ lineno = self.stream.current.lineno
+ left = self.parse_div()
+ while self.stream.current.type == 'mul':
+ next(self.stream)
+ right = self.parse_div()
+ left = nodes.Mul(left, right, lineno=lineno)
+ lineno = self.stream.current.lineno
+ return left
+
+ def parse_div(self):
+ lineno = self.stream.current.lineno
+ left = self.parse_floordiv()
+ while self.stream.current.type == 'div':
+ next(self.stream)
+ right = self.parse_floordiv()
+ left = nodes.Div(left, right, lineno=lineno)
+ lineno = self.stream.current.lineno
+ return left
+
+ def parse_floordiv(self):
+ lineno = self.stream.current.lineno
+ left = self.parse_mod()
+ while self.stream.current.type == 'floordiv':
+ next(self.stream)
+ right = self.parse_mod()
+ left = nodes.FloorDiv(left, right, lineno=lineno)
+ lineno = self.stream.current.lineno
+ return left
+
+ def parse_mod(self):
+ lineno = self.stream.current.lineno
+ left = self.parse_pow()
+ while self.stream.current.type == 'mod':
+ next(self.stream)
+ right = self.parse_pow()
+ left = nodes.Mod(left, right, lineno=lineno)
+ lineno = self.stream.current.lineno
+ return left
+
+ def parse_pow(self):
+ lineno = self.stream.current.lineno
+ left = self.parse_unary()
+ while self.stream.current.type == 'pow':
+ next(self.stream)
+ right = self.parse_unary()
+ left = nodes.Pow(left, right, lineno=lineno)
+ lineno = self.stream.current.lineno
+ return left
+
+ def parse_unary(self, with_filter=True):
+ token_type = self.stream.current.type
+ lineno = self.stream.current.lineno
+ if token_type == 'sub':
+ next(self.stream)
+ node = nodes.Neg(self.parse_unary(False), lineno=lineno)
+ elif token_type == 'add':
+ next(self.stream)
+ node = nodes.Pos(self.parse_unary(False), lineno=lineno)
+ else:
+ node = self.parse_primary()
+ node = self.parse_postfix(node)
+ if with_filter:
+ node = self.parse_filter_expr(node)
+ return node
+
+ def parse_primary(self):
+ token = self.stream.current
+ if token.type == 'name':
+ if token.value in ('true', 'false', 'True', 'False'):
+ node = nodes.Const(token.value in ('true', 'True'),
+ lineno=token.lineno)
+ elif token.value in ('none', 'None'):
+ node = nodes.Const(None, lineno=token.lineno)
+ else:
+ node = nodes.Name(token.value, 'load', lineno=token.lineno)
+ next(self.stream)
+ elif token.type == 'string':
+ next(self.stream)
+ buf = [token.value]
+ lineno = token.lineno
+ while self.stream.current.type == 'string':
+ buf.append(self.stream.current.value)
+ next(self.stream)
+ node = nodes.Const(''.join(buf), lineno=lineno)
+ elif token.type in ('integer', 'float'):
+ next(self.stream)
+ node = nodes.Const(token.value, lineno=token.lineno)
+ elif token.type == 'lparen':
+ next(self.stream)
+ node = self.parse_tuple(explicit_parentheses=True)
+ self.stream.expect('rparen')
+ elif token.type == 'lbracket':
+ node = self.parse_list()
+ elif token.type == 'lbrace':
+ node = self.parse_dict()
+ else:
+ self.fail("unexpected '%s'" % describe_token(token), token.lineno)
+ return node
+
+ def parse_tuple(self, simplified=False, with_condexpr=True,
+ extra_end_rules=None, explicit_parentheses=False):
+ """Works like `parse_expression` but if multiple expressions are
+ delimited by a comma a :class:`~jinja2.nodes.Tuple` node is created.
+ This method could also return a regular expression instead of a tuple
+ if no commas where found.
+
+ The default parsing mode is a full tuple. If `simplified` is `True`
+ only names and literals are parsed. The `no_condexpr` parameter is
+ forwarded to :meth:`parse_expression`.
+
+ Because tuples do not require delimiters and may end in a bogus comma
+ an extra hint is needed that marks the end of a tuple. For example
+ for loops support tuples between `for` and `in`. In that case the
+ `extra_end_rules` is set to ``['name:in']``.
+
+ `explicit_parentheses` is true if the parsing was triggered by an
+ expression in parentheses. This is used to figure out if an empty
+ tuple is a valid expression or not.
+ """
+ lineno = self.stream.current.lineno
+ if simplified:
+ parse = self.parse_primary
+ elif with_condexpr:
+ parse = self.parse_expression
+ else:
+ parse = lambda: self.parse_expression(with_condexpr=False)
+ args = []
+ is_tuple = False
+ while 1:
+ if args:
+ self.stream.expect('comma')
+ if self.is_tuple_end(extra_end_rules):
+ break
+ args.append(parse())
+ if self.stream.current.type == 'comma':
+ is_tuple = True
+ else:
+ break
+ lineno = self.stream.current.lineno
+
+ if not is_tuple:
+ if args:
+ return args[0]
+
+ # if we don't have explicit parentheses, an empty tuple is
+ # not a valid expression. This would mean nothing (literally
+ # nothing) in the spot of an expression would be an empty
+ # tuple.
+ if not explicit_parentheses:
+ self.fail('Expected an expression, got \'%s\'' %
+ describe_token(self.stream.current))
+
+ return nodes.Tuple(args, 'load', lineno=lineno)
+
+ def parse_list(self):
+ token = self.stream.expect('lbracket')
+ items = []
+ while self.stream.current.type != 'rbracket':
+ if items:
+ self.stream.expect('comma')
+ if self.stream.current.type == 'rbracket':
+ break
+ items.append(self.parse_expression())
+ self.stream.expect('rbracket')
+ return nodes.List(items, lineno=token.lineno)
+
+ def parse_dict(self):
+ token = self.stream.expect('lbrace')
+ items = []
+ while self.stream.current.type != 'rbrace':
+ if items:
+ self.stream.expect('comma')
+ if self.stream.current.type == 'rbrace':
+ break
+ key = self.parse_expression()
+ self.stream.expect('colon')
+ value = self.parse_expression()
+ items.append(nodes.Pair(key, value, lineno=key.lineno))
+ self.stream.expect('rbrace')
+ return nodes.Dict(items, lineno=token.lineno)
+
+ def parse_postfix(self, node):
+ while 1:
+ token_type = self.stream.current.type
+ if token_type == 'dot' or token_type == 'lbracket':
+ node = self.parse_subscript(node)
+ # calls are valid both after postfix expressions (getattr
+ # and getitem) as well as filters and tests
+ elif token_type == 'lparen':
+ node = self.parse_call(node)
+ else:
+ break
+ return node
+
+ def parse_filter_expr(self, node):
+ while 1:
+ token_type = self.stream.current.type
+ if token_type == 'pipe':
+ node = self.parse_filter(node)
+ elif token_type == 'name' and self.stream.current.value == 'is':
+ node = self.parse_test(node)
+ # calls are valid both after postfix expressions (getattr
+ # and getitem) as well as filters and tests
+ elif token_type == 'lparen':
+ node = self.parse_call(node)
+ else:
+ break
+ return node
+
+ def parse_subscript(self, node):
+ token = next(self.stream)
+ if token.type == 'dot':
+ attr_token = self.stream.current
+ next(self.stream)
+ if attr_token.type == 'name':
+ return nodes.Getattr(node, attr_token.value, 'load',
+ lineno=token.lineno)
+ elif attr_token.type != 'integer':
+ self.fail('expected name or number', attr_token.lineno)
+ arg = nodes.Const(attr_token.value, lineno=attr_token.lineno)
+ return nodes.Getitem(node, arg, 'load', lineno=token.lineno)
+ if token.type == 'lbracket':
+ args = []
+ while self.stream.current.type != 'rbracket':
+ if args:
+ self.stream.expect('comma')
+ args.append(self.parse_subscribed())
+ self.stream.expect('rbracket')
+ if len(args) == 1:
+ arg = args[0]
+ else:
+ arg = nodes.Tuple(args, 'load', lineno=token.lineno)
+ return nodes.Getitem(node, arg, 'load', lineno=token.lineno)
+ self.fail('expected subscript expression', self.lineno)
+
+ def parse_subscribed(self):
+ lineno = self.stream.current.lineno
+
+ if self.stream.current.type == 'colon':
+ next(self.stream)
+ args = [None]
+ else:
+ node = self.parse_expression()
+ if self.stream.current.type != 'colon':
+ return node
+ next(self.stream)
+ args = [node]
+
+ if self.stream.current.type == 'colon':
+ args.append(None)
+ elif self.stream.current.type not in ('rbracket', 'comma'):
+ args.append(self.parse_expression())
+ else:
+ args.append(None)
+
+ if self.stream.current.type == 'colon':
+ next(self.stream)
+ if self.stream.current.type not in ('rbracket', 'comma'):
+ args.append(self.parse_expression())
+ else:
+ args.append(None)
+ else:
+ args.append(None)
+
+ return nodes.Slice(lineno=lineno, *args)
+
+ def parse_call(self, node):
+ token = self.stream.expect('lparen')
+ args = []
+ kwargs = []
+ dyn_args = dyn_kwargs = None
+ require_comma = False
+
+ def ensure(expr):
+ if not expr:
+ self.fail('invalid syntax for function call expression',
+ token.lineno)
+
+ while self.stream.current.type != 'rparen':
+ if require_comma:
+ self.stream.expect('comma')
+ # support for trailing comma
+ if self.stream.current.type == 'rparen':
+ break
+ if self.stream.current.type == 'mul':
+ ensure(dyn_args is None and dyn_kwargs is None)
+ next(self.stream)
+ dyn_args = self.parse_expression()
+ elif self.stream.current.type == 'pow':
+ ensure(dyn_kwargs is None)
+ next(self.stream)
+ dyn_kwargs = self.parse_expression()
+ else:
+ ensure(dyn_args is None and dyn_kwargs is None)
+ if self.stream.current.type == 'name' and \
+ self.stream.look().type == 'assign':
+ key = self.stream.current.value
+ self.stream.skip(2)
+ value = self.parse_expression()
+ kwargs.append(nodes.Keyword(key, value,
+ lineno=value.lineno))
+ else:
+ ensure(not kwargs)
+ args.append(self.parse_expression())
+
+ require_comma = True
+ self.stream.expect('rparen')
+
+ if node is None:
+ return args, kwargs, dyn_args, dyn_kwargs
+ return nodes.Call(node, args, kwargs, dyn_args, dyn_kwargs,
+ lineno=token.lineno)
+
+ def parse_filter(self, node, start_inline=False):
+ while self.stream.current.type == 'pipe' or start_inline:
+ if not start_inline:
+ next(self.stream)
+ token = self.stream.expect('name')
+ name = token.value
+ while self.stream.current.type == 'dot':
+ next(self.stream)
+ name += '.' + self.stream.expect('name').value
+ if self.stream.current.type == 'lparen':
+ args, kwargs, dyn_args, dyn_kwargs = self.parse_call(None)
+ else:
+ args = []
+ kwargs = []
+ dyn_args = dyn_kwargs = None
+ node = nodes.Filter(node, name, args, kwargs, dyn_args,
+ dyn_kwargs, lineno=token.lineno)
+ start_inline = False
+ return node
+
+ def parse_test(self, node):
+ token = next(self.stream)
+ if self.stream.current.test('name:not'):
+ next(self.stream)
+ negated = True
+ else:
+ negated = False
+ name = self.stream.expect('name').value
+ while self.stream.current.type == 'dot':
+ next(self.stream)
+ name += '.' + self.stream.expect('name').value
+ dyn_args = dyn_kwargs = None
+ kwargs = []
+ if self.stream.current.type == 'lparen':
+ args, kwargs, dyn_args, dyn_kwargs = self.parse_call(None)
+ elif (self.stream.current.type in ('name', 'string', 'integer',
+ 'float', 'lparen', 'lbracket',
+ 'lbrace') and not
+ self.stream.current.test_any('name:else', 'name:or',
+ 'name:and')):
+ if self.stream.current.test('name:is'):
+ self.fail('You cannot chain multiple tests with is')
+ args = [self.parse_expression()]
+ else:
+ args = []
+ node = nodes.Test(node, name, args, kwargs, dyn_args,
+ dyn_kwargs, lineno=token.lineno)
+ if negated:
+ node = nodes.Not(node, lineno=token.lineno)
+ return node
+
+ def subparse(self, end_tokens=None):
+ body = []
+ data_buffer = []
+ add_data = data_buffer.append
+
+ if end_tokens is not None:
+ self._end_token_stack.append(end_tokens)
+
+ def flush_data():
+ if data_buffer:
+ lineno = data_buffer[0].lineno
+ body.append(nodes.Output(data_buffer[:], lineno=lineno))
+ del data_buffer[:]
+
+ try:
+ while self.stream:
+ token = self.stream.current
+ if token.type == 'data':
+ if token.value:
+ add_data(nodes.TemplateData(token.value,
+ lineno=token.lineno))
+ next(self.stream)
+ elif token.type == 'variable_begin':
+ next(self.stream)
+ add_data(self.parse_tuple(with_condexpr=True))
+ self.stream.expect('variable_end')
+ elif token.type == 'block_begin':
+ flush_data()
+ next(self.stream)
+ if end_tokens is not None and \
+ self.stream.current.test_any(*end_tokens):
+ return body
+ rv = self.parse_statement()
+ if isinstance(rv, list):
+ body.extend(rv)
+ else:
+ body.append(rv)
+ self.stream.expect('block_end')
+ else:
+ raise AssertionError('internal parsing error')
+
+ flush_data()
+ finally:
+ if end_tokens is not None:
+ self._end_token_stack.pop()
+
+ return body
+
+ def parse(self):
+ """Parse the whole template into a `Template` node."""
+ result = nodes.Template(self.subparse(), lineno=1)
+ result.set_environment(self.environment)
+ return result
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/jinja2/parser.pyc b/Assignments/microblog/flask/lib/python2.7/site-packages/jinja2/parser.pyc
new file mode 100644
index 0000000..5b3d5e1
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/jinja2/parser.pyc differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/jinja2/runtime.py b/Assignments/microblog/flask/lib/python2.7/site-packages/jinja2/runtime.py
new file mode 100644
index 0000000..685a12d
--- /dev/null
+++ b/Assignments/microblog/flask/lib/python2.7/site-packages/jinja2/runtime.py
@@ -0,0 +1,667 @@
+# -*- coding: utf-8 -*-
+"""
+ jinja2.runtime
+ ~~~~~~~~~~~~~~
+
+ Runtime helpers.
+
+ :copyright: (c) 2010 by the Jinja Team.
+ :license: BSD.
+"""
+import sys
+
+from itertools import chain
+from jinja2.nodes import EvalContext, _context_function_types
+from jinja2.utils import Markup, soft_unicode, escape, missing, concat, \
+ internalcode, object_type_repr
+from jinja2.exceptions import UndefinedError, TemplateRuntimeError, \
+ TemplateNotFound
+from jinja2._compat import imap, text_type, iteritems, \
+ implements_iterator, implements_to_string, string_types, PY2
+
+
+# these variables are exported to the template runtime
+__all__ = ['LoopContext', 'TemplateReference', 'Macro', 'Markup',
+ 'TemplateRuntimeError', 'missing', 'concat', 'escape',
+ 'markup_join', 'unicode_join', 'to_string', 'identity',
+ 'TemplateNotFound', 'make_logging_undefined']
+
+#: the name of the function that is used to convert something into
+#: a string. We can just use the text type here.
+to_string = text_type
+
+#: the identity function. Useful for certain things in the environment
+identity = lambda x: x
+
+_last_iteration = object()
+
+
+def markup_join(seq):
+ """Concatenation that escapes if necessary and converts to unicode."""
+ buf = []
+ iterator = imap(soft_unicode, seq)
+ for arg in iterator:
+ buf.append(arg)
+ if hasattr(arg, '__html__'):
+ return Markup(u'').join(chain(buf, iterator))
+ return concat(buf)
+
+
+def unicode_join(seq):
+ """Simple args to unicode conversion and concatenation."""
+ return concat(imap(text_type, seq))
+
+
+def new_context(environment, template_name, blocks, vars=None,
+ shared=None, globals=None, locals=None):
+ """Internal helper to for context creation."""
+ if vars is None:
+ vars = {}
+ if shared:
+ parent = vars
+ else:
+ parent = dict(globals or (), **vars)
+ if locals:
+ # if the parent is shared a copy should be created because
+ # we don't want to modify the dict passed
+ if shared:
+ parent = dict(parent)
+ for key, value in iteritems(locals):
+ if key[:2] == 'l_' and value is not missing:
+ parent[key[2:]] = value
+ return environment.context_class(environment, parent, template_name,
+ blocks)
+
+
+class TemplateReference(object):
+ """The `self` in templates."""
+
+ def __init__(self, context):
+ self.__context = context
+
+ def __getitem__(self, name):
+ blocks = self.__context.blocks[name]
+ return BlockReference(name, self.__context, blocks, 0)
+
+ def __repr__(self):
+ return '<%s %r>' % (
+ self.__class__.__name__,
+ self.__context.name
+ )
+
+
+class Context(object):
+ """The template context holds the variables of a template. It stores the
+ values passed to the template and also the names the template exports.
+ Creating instances is neither supported nor useful as it's created
+ automatically at various stages of the template evaluation and should not
+ be created by hand.
+
+ The context is immutable. Modifications on :attr:`parent` **must not**
+ happen and modifications on :attr:`vars` are allowed from generated
+ template code only. Template filters and global functions marked as
+ :func:`contextfunction`\s get the active context passed as first argument
+ and are allowed to access the context read-only.
+
+ The template context supports read only dict operations (`get`,
+ `keys`, `values`, `items`, `iterkeys`, `itervalues`, `iteritems`,
+ `__getitem__`, `__contains__`). Additionally there is a :meth:`resolve`
+ method that doesn't fail with a `KeyError` but returns an
+ :class:`Undefined` object for missing variables.
+ """
+ __slots__ = ('parent', 'vars', 'environment', 'eval_ctx', 'exported_vars',
+ 'name', 'blocks', '__weakref__')
+
+ def __init__(self, environment, parent, name, blocks):
+ self.parent = parent
+ self.vars = {}
+ self.environment = environment
+ self.eval_ctx = EvalContext(self.environment, name)
+ self.exported_vars = set()
+ self.name = name
+
+ # create the initial mapping of blocks. Whenever template inheritance
+ # takes place the runtime will update this mapping with the new blocks
+ # from the template.
+ self.blocks = dict((k, [v]) for k, v in iteritems(blocks))
+
+ def super(self, name, current):
+ """Render a parent block."""
+ try:
+ blocks = self.blocks[name]
+ index = blocks.index(current) + 1
+ blocks[index]
+ except LookupError:
+ return self.environment.undefined('there is no parent block '
+ 'called %r.' % name,
+ name='super')
+ return BlockReference(name, self, blocks, index)
+
+ def get(self, key, default=None):
+ """Returns an item from the template context, if it doesn't exist
+ `default` is returned.
+ """
+ try:
+ return self[key]
+ except KeyError:
+ return default
+
+ def resolve(self, key):
+ """Looks up a variable like `__getitem__` or `get` but returns an
+ :class:`Undefined` object with the name of the name looked up.
+ """
+ if key in self.vars:
+ return self.vars[key]
+ if key in self.parent:
+ return self.parent[key]
+ return self.environment.undefined(name=key)
+
+ def get_exported(self):
+ """Get a new dict with the exported variables."""
+ return dict((k, self.vars[k]) for k in self.exported_vars)
+
+ def get_all(self):
+ """Return a copy of the complete context as dict including the
+ exported variables.
+ """
+ return dict(self.parent, **self.vars)
+
+ @internalcode
+ def call(__self, __obj, *args, **kwargs):
+ """Call the callable with the arguments and keyword arguments
+ provided but inject the active context or environment as first
+ argument if the callable is a :func:`contextfunction` or
+ :func:`environmentfunction`.
+ """
+ if __debug__:
+ __traceback_hide__ = True # noqa
+
+ # Allow callable classes to take a context
+ fn = __obj.__call__
+ for fn_type in ('contextfunction',
+ 'evalcontextfunction',
+ 'environmentfunction'):
+ if hasattr(fn, fn_type):
+ __obj = fn
+ break
+
+ if isinstance(__obj, _context_function_types):
+ if getattr(__obj, 'contextfunction', 0):
+ args = (__self,) + args
+ elif getattr(__obj, 'evalcontextfunction', 0):
+ args = (__self.eval_ctx,) + args
+ elif getattr(__obj, 'environmentfunction', 0):
+ args = (__self.environment,) + args
+ try:
+ return __obj(*args, **kwargs)
+ except StopIteration:
+ return __self.environment.undefined('value was undefined because '
+ 'a callable raised a '
+ 'StopIteration exception')
+
+ def derived(self, locals=None):
+ """Internal helper function to create a derived context."""
+ context = new_context(self.environment, self.name, {},
+ self.parent, True, None, locals)
+ context.vars.update(self.vars)
+ context.eval_ctx = self.eval_ctx
+ context.blocks.update((k, list(v)) for k, v in iteritems(self.blocks))
+ return context
+
+ def _all(meth):
+ proxy = lambda self: getattr(self.get_all(), meth)()
+ proxy.__doc__ = getattr(dict, meth).__doc__
+ proxy.__name__ = meth
+ return proxy
+
+ keys = _all('keys')
+ values = _all('values')
+ items = _all('items')
+
+ # not available on python 3
+ if PY2:
+ iterkeys = _all('iterkeys')
+ itervalues = _all('itervalues')
+ iteritems = _all('iteritems')
+ del _all
+
+ def __contains__(self, name):
+ return name in self.vars or name in self.parent
+
+ def __getitem__(self, key):
+ """Lookup a variable or raise `KeyError` if the variable is
+ undefined.
+ """
+ item = self.resolve(key)
+ if isinstance(item, Undefined):
+ raise KeyError(key)
+ return item
+
+ def __repr__(self):
+ return '<%s %s of %r>' % (
+ self.__class__.__name__,
+ repr(self.get_all()),
+ self.name
+ )
+
+
+# register the context as mapping if possible
+try:
+ from collections import Mapping
+ Mapping.register(Context)
+except ImportError:
+ pass
+
+
+class BlockReference(object):
+ """One block on a template reference."""
+
+ def __init__(self, name, context, stack, depth):
+ self.name = name
+ self._context = context
+ self._stack = stack
+ self._depth = depth
+
+ @property
+ def super(self):
+ """Super the block."""
+ if self._depth + 1 >= len(self._stack):
+ return self._context.environment. \
+ undefined('there is no parent block called %r.' %
+ self.name, name='super')
+ return BlockReference(self.name, self._context, self._stack,
+ self._depth + 1)
+
+ @internalcode
+ def __call__(self):
+ rv = concat(self._stack[self._depth](self._context))
+ if self._context.eval_ctx.autoescape:
+ rv = Markup(rv)
+ return rv
+
+
+class LoopContext(object):
+ """A loop context for dynamic iteration."""
+
+ def __init__(self, iterable, recurse=None, depth0=0):
+ self._iterator = iter(iterable)
+ self._recurse = recurse
+ self._after = self._safe_next()
+ self.index0 = -1
+ self.depth0 = depth0
+
+ # try to get the length of the iterable early. This must be done
+ # here because there are some broken iterators around where there
+ # __len__ is the number of iterations left (i'm looking at your
+ # listreverseiterator!).
+ try:
+ self._length = len(iterable)
+ except (TypeError, AttributeError):
+ self._length = None
+
+ def cycle(self, *args):
+ """Cycles among the arguments with the current loop index."""
+ if not args:
+ raise TypeError('no items for cycling given')
+ return args[self.index0 % len(args)]
+
+ first = property(lambda x: x.index0 == 0)
+ last = property(lambda x: x._after is _last_iteration)
+ index = property(lambda x: x.index0 + 1)
+ revindex = property(lambda x: x.length - x.index0)
+ revindex0 = property(lambda x: x.length - x.index)
+ depth = property(lambda x: x.depth0 + 1)
+
+ def __len__(self):
+ return self.length
+
+ def __iter__(self):
+ return LoopContextIterator(self)
+
+ def _safe_next(self):
+ try:
+ return next(self._iterator)
+ except StopIteration:
+ return _last_iteration
+
+ @internalcode
+ def loop(self, iterable):
+ if self._recurse is None:
+ raise TypeError('Tried to call non recursive loop. Maybe you '
+ "forgot the 'recursive' modifier.")
+ return self._recurse(iterable, self._recurse, self.depth0 + 1)
+
+ # a nifty trick to enhance the error message if someone tried to call
+ # the the loop without or with too many arguments.
+ __call__ = loop
+ del loop
+
+ @property
+ def length(self):
+ if self._length is None:
+ # if was not possible to get the length of the iterator when
+ # the loop context was created (ie: iterating over a generator)
+ # we have to convert the iterable into a sequence and use the
+ # length of that + the number of iterations so far.
+ iterable = tuple(self._iterator)
+ self._iterator = iter(iterable)
+ iterations_done = self.index0 + 2
+ self._length = len(iterable) + iterations_done
+ return self._length
+
+ def __repr__(self):
+ return '<%s %r/%r>' % (
+ self.__class__.__name__,
+ self.index,
+ self.length
+ )
+
+
+@implements_iterator
+class LoopContextIterator(object):
+ """The iterator for a loop context."""
+ __slots__ = ('context',)
+
+ def __init__(self, context):
+ self.context = context
+
+ def __iter__(self):
+ return self
+
+ def __next__(self):
+ ctx = self.context
+ ctx.index0 += 1
+ if ctx._after is _last_iteration:
+ raise StopIteration()
+ next_elem = ctx._after
+ ctx._after = ctx._safe_next()
+ return next_elem, ctx
+
+
+class Macro(object):
+ """Wraps a macro function."""
+
+ def __init__(self, environment, func, name, arguments, defaults,
+ catch_kwargs, catch_varargs, caller):
+ self._environment = environment
+ self._func = func
+ self._argument_count = len(arguments)
+ self.name = name
+ self.arguments = arguments
+ self.defaults = defaults
+ self.catch_kwargs = catch_kwargs
+ self.catch_varargs = catch_varargs
+ self.caller = caller
+
+ @internalcode
+ def __call__(self, *args, **kwargs):
+ # try to consume the positional arguments
+ arguments = list(args[:self._argument_count])
+ off = len(arguments)
+
+ # if the number of arguments consumed is not the number of
+ # arguments expected we start filling in keyword arguments
+ # and defaults.
+ if off != self._argument_count:
+ for idx, name in enumerate(self.arguments[len(arguments):]):
+ try:
+ value = kwargs.pop(name)
+ except KeyError:
+ try:
+ value = self.defaults[idx - self._argument_count + off]
+ except IndexError:
+ value = self._environment.undefined(
+ 'parameter %r was not provided' % name, name=name)
+ arguments.append(value)
+
+ # it's important that the order of these arguments does not change
+ # if not also changed in the compiler's `function_scoping` method.
+ # the order is caller, keyword arguments, positional arguments!
+ if self.caller:
+ caller = kwargs.pop('caller', None)
+ if caller is None:
+ caller = self._environment.undefined('No caller defined',
+ name='caller')
+ arguments.append(caller)
+ if self.catch_kwargs:
+ arguments.append(kwargs)
+ elif kwargs:
+ raise TypeError('macro %r takes no keyword argument %r' %
+ (self.name, next(iter(kwargs))))
+ if self.catch_varargs:
+ arguments.append(args[self._argument_count:])
+ elif len(args) > self._argument_count:
+ raise TypeError('macro %r takes not more than %d argument(s)' %
+ (self.name, len(self.arguments)))
+ return self._func(*arguments)
+
+ def __repr__(self):
+ return '<%s %s>' % (
+ self.__class__.__name__,
+ self.name is None and 'anonymous' or repr(self.name)
+ )
+
+
+@implements_to_string
+class Undefined(object):
+ """The default undefined type. This undefined type can be printed and
+ iterated over, but every other access will raise an :exc:`jinja2.exceptions.UndefinedError`:
+
+ >>> foo = Undefined(name='foo')
+ >>> str(foo)
+ ''
+ >>> not foo
+ True
+ >>> foo + 42
+ Traceback (most recent call last):
+ ...
+ jinja2.exceptions.UndefinedError: 'foo' is undefined
+ """
+ __slots__ = ('_undefined_hint', '_undefined_obj', '_undefined_name',
+ '_undefined_exception')
+
+ def __init__(self, hint=None, obj=missing, name=None, exc=UndefinedError):
+ self._undefined_hint = hint
+ self._undefined_obj = obj
+ self._undefined_name = name
+ self._undefined_exception = exc
+
+ @internalcode
+ def _fail_with_undefined_error(self, *args, **kwargs):
+ """Regular callback function for undefined objects that raises an
+ `jinja2.exceptions.UndefinedError` on call.
+ """
+ if self._undefined_hint is None:
+ if self._undefined_obj is missing:
+ hint = '%r is undefined' % self._undefined_name
+ elif not isinstance(self._undefined_name, string_types):
+ hint = '%s has no element %r' % (
+ object_type_repr(self._undefined_obj),
+ self._undefined_name
+ )
+ else:
+ hint = '%r has no attribute %r' % (
+ object_type_repr(self._undefined_obj),
+ self._undefined_name
+ )
+ else:
+ hint = self._undefined_hint
+ raise self._undefined_exception(hint)
+
+ @internalcode
+ def __getattr__(self, name):
+ if name[:2] == '__':
+ raise AttributeError(name)
+ return self._fail_with_undefined_error()
+
+ __add__ = __radd__ = __mul__ = __rmul__ = __div__ = __rdiv__ = \
+ __truediv__ = __rtruediv__ = __floordiv__ = __rfloordiv__ = \
+ __mod__ = __rmod__ = __pos__ = __neg__ = __call__ = \
+ __getitem__ = __lt__ = __le__ = __gt__ = __ge__ = __int__ = \
+ __float__ = __complex__ = __pow__ = __rpow__ = \
+ _fail_with_undefined_error
+
+ def __eq__(self, other):
+ return type(self) is type(other)
+
+ def __ne__(self, other):
+ return not self.__eq__(other)
+
+ def __hash__(self):
+ return id(type(self))
+
+ def __str__(self):
+ return u''
+
+ def __len__(self):
+ return 0
+
+ def __iter__(self):
+ if 0:
+ yield None
+
+ def __nonzero__(self):
+ return False
+ __bool__ = __nonzero__
+
+ def __repr__(self):
+ return 'Undefined'
+
+
+def make_logging_undefined(logger=None, base=None):
+ """Given a logger object this returns a new undefined class that will
+ log certain failures. It will log iterations and printing. If no
+ logger is given a default logger is created.
+
+ Example::
+
+ logger = logging.getLogger(__name__)
+ LoggingUndefined = make_logging_undefined(
+ logger=logger,
+ base=Undefined
+ )
+
+ .. versionadded:: 2.8
+
+ :param logger: the logger to use. If not provided, a default logger
+ is created.
+ :param base: the base class to add logging functionality to. This
+ defaults to :class:`Undefined`.
+ """
+ if logger is None:
+ import logging
+ logger = logging.getLogger(__name__)
+ logger.addHandler(logging.StreamHandler(sys.stderr))
+ if base is None:
+ base = Undefined
+
+ def _log_message(undef):
+ if undef._undefined_hint is None:
+ if undef._undefined_obj is missing:
+ hint = '%s is undefined' % undef._undefined_name
+ elif not isinstance(undef._undefined_name, string_types):
+ hint = '%s has no element %s' % (
+ object_type_repr(undef._undefined_obj),
+ undef._undefined_name)
+ else:
+ hint = '%s has no attribute %s' % (
+ object_type_repr(undef._undefined_obj),
+ undef._undefined_name)
+ else:
+ hint = undef._undefined_hint
+ logger.warning('Template variable warning: %s', hint)
+
+ class LoggingUndefined(base):
+
+ def _fail_with_undefined_error(self, *args, **kwargs):
+ try:
+ return base._fail_with_undefined_error(self, *args, **kwargs)
+ except self._undefined_exception as e:
+ logger.error('Template variable error: %s', str(e))
+ raise e
+
+ def __str__(self):
+ rv = base.__str__(self)
+ _log_message(self)
+ return rv
+
+ def __iter__(self):
+ rv = base.__iter__(self)
+ _log_message(self)
+ return rv
+
+ if PY2:
+ def __nonzero__(self):
+ rv = base.__nonzero__(self)
+ _log_message(self)
+ return rv
+
+ def __unicode__(self):
+ rv = base.__unicode__(self)
+ _log_message(self)
+ return rv
+ else:
+ def __bool__(self):
+ rv = base.__bool__(self)
+ _log_message(self)
+ return rv
+
+ return LoggingUndefined
+
+
+@implements_to_string
+class DebugUndefined(Undefined):
+ """An undefined that returns the debug info when printed.
+
+ >>> foo = DebugUndefined(name='foo')
+ >>> str(foo)
+ '{{ foo }}'
+ >>> not foo
+ True
+ >>> foo + 42
+ Traceback (most recent call last):
+ ...
+ jinja2.exceptions.UndefinedError: 'foo' is undefined
+ """
+ __slots__ = ()
+
+ def __str__(self):
+ if self._undefined_hint is None:
+ if self._undefined_obj is missing:
+ return u'{{ %s }}' % self._undefined_name
+ return '{{ no such element: %s[%r] }}' % (
+ object_type_repr(self._undefined_obj),
+ self._undefined_name
+ )
+ return u'{{ undefined value printed: %s }}' % self._undefined_hint
+
+
+@implements_to_string
+class StrictUndefined(Undefined):
+ """An undefined that barks on print and iteration as well as boolean
+ tests and all kinds of comparisons. In other words: you can do nothing
+ with it except checking if it's defined using the `defined` test.
+
+ >>> foo = StrictUndefined(name='foo')
+ >>> str(foo)
+ Traceback (most recent call last):
+ ...
+ jinja2.exceptions.UndefinedError: 'foo' is undefined
+ >>> not foo
+ Traceback (most recent call last):
+ ...
+ jinja2.exceptions.UndefinedError: 'foo' is undefined
+ >>> foo + 42
+ Traceback (most recent call last):
+ ...
+ jinja2.exceptions.UndefinedError: 'foo' is undefined
+ """
+ __slots__ = ()
+ __iter__ = __str__ = __len__ = __nonzero__ = __eq__ = \
+ __ne__ = __bool__ = __hash__ = \
+ Undefined._fail_with_undefined_error
+
+
+# remove remaining slots attributes, after the metaclass did the magic they
+# are unneeded and irritating as they contain wrong data for the subclasses.
+del Undefined.__slots__, DebugUndefined.__slots__, StrictUndefined.__slots__
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/jinja2/runtime.pyc b/Assignments/microblog/flask/lib/python2.7/site-packages/jinja2/runtime.pyc
new file mode 100644
index 0000000..209147f
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/jinja2/runtime.pyc differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/jinja2/sandbox.py b/Assignments/microblog/flask/lib/python2.7/site-packages/jinja2/sandbox.py
new file mode 100644
index 0000000..7e40ab3
--- /dev/null
+++ b/Assignments/microblog/flask/lib/python2.7/site-packages/jinja2/sandbox.py
@@ -0,0 +1,367 @@
+# -*- coding: utf-8 -*-
+"""
+ jinja2.sandbox
+ ~~~~~~~~~~~~~~
+
+ Adds a sandbox layer to Jinja as it was the default behavior in the old
+ Jinja 1 releases. This sandbox is slightly different from Jinja 1 as the
+ default behavior is easier to use.
+
+ The behavior can be changed by subclassing the environment.
+
+ :copyright: (c) 2010 by the Jinja Team.
+ :license: BSD.
+"""
+import types
+import operator
+from jinja2.environment import Environment
+from jinja2.exceptions import SecurityError
+from jinja2._compat import string_types, PY2
+
+
+#: maximum number of items a range may produce
+MAX_RANGE = 100000
+
+#: attributes of function objects that are considered unsafe.
+if PY2:
+ UNSAFE_FUNCTION_ATTRIBUTES = set(['func_closure', 'func_code', 'func_dict',
+ 'func_defaults', 'func_globals'])
+else:
+ # On versions > python 2 the special attributes on functions are gone,
+ # but they remain on methods and generators for whatever reason.
+ UNSAFE_FUNCTION_ATTRIBUTES = set()
+
+
+#: unsafe method attributes. function attributes are unsafe for methods too
+UNSAFE_METHOD_ATTRIBUTES = set(['im_class', 'im_func', 'im_self'])
+
+#: unsafe generator attirbutes.
+UNSAFE_GENERATOR_ATTRIBUTES = set(['gi_frame', 'gi_code'])
+
+import warnings
+
+# make sure we don't warn in python 2.6 about stuff we don't care about
+warnings.filterwarnings('ignore', 'the sets module', DeprecationWarning,
+ module='jinja2.sandbox')
+
+from collections import deque
+
+_mutable_set_types = (set,)
+_mutable_mapping_types = (dict,)
+_mutable_sequence_types = (list,)
+
+
+# on python 2.x we can register the user collection types
+try:
+ from UserDict import UserDict, DictMixin
+ from UserList import UserList
+ _mutable_mapping_types += (UserDict, DictMixin)
+ _mutable_set_types += (UserList,)
+except ImportError:
+ pass
+
+# if sets is still available, register the mutable set from there as well
+try:
+ from sets import Set
+ _mutable_set_types += (Set,)
+except ImportError:
+ pass
+
+#: register Python 2.6 abstract base classes
+try:
+ from collections import MutableSet, MutableMapping, MutableSequence
+ _mutable_set_types += (MutableSet,)
+ _mutable_mapping_types += (MutableMapping,)
+ _mutable_sequence_types += (MutableSequence,)
+except ImportError:
+ pass
+
+_mutable_spec = (
+ (_mutable_set_types, frozenset([
+ 'add', 'clear', 'difference_update', 'discard', 'pop', 'remove',
+ 'symmetric_difference_update', 'update'
+ ])),
+ (_mutable_mapping_types, frozenset([
+ 'clear', 'pop', 'popitem', 'setdefault', 'update'
+ ])),
+ (_mutable_sequence_types, frozenset([
+ 'append', 'reverse', 'insert', 'sort', 'extend', 'remove'
+ ])),
+ (deque, frozenset([
+ 'append', 'appendleft', 'clear', 'extend', 'extendleft', 'pop',
+ 'popleft', 'remove', 'rotate'
+ ]))
+)
+
+
+def safe_range(*args):
+ """A range that can't generate ranges with a length of more than
+ MAX_RANGE items.
+ """
+ rng = range(*args)
+ if len(rng) > MAX_RANGE:
+ raise OverflowError('range too big, maximum size for range is %d' %
+ MAX_RANGE)
+ return rng
+
+
+def unsafe(f):
+ """Marks a function or method as unsafe.
+
+ ::
+
+ @unsafe
+ def delete(self):
+ pass
+ """
+ f.unsafe_callable = True
+ return f
+
+
+def is_internal_attribute(obj, attr):
+ """Test if the attribute given is an internal python attribute. For
+ example this function returns `True` for the `func_code` attribute of
+ python objects. This is useful if the environment method
+ :meth:`~SandboxedEnvironment.is_safe_attribute` is overridden.
+
+ >>> from jinja2.sandbox import is_internal_attribute
+ >>> is_internal_attribute(str, "mro")
+ True
+ >>> is_internal_attribute(str, "upper")
+ False
+ """
+ if isinstance(obj, types.FunctionType):
+ if attr in UNSAFE_FUNCTION_ATTRIBUTES:
+ return True
+ elif isinstance(obj, types.MethodType):
+ if attr in UNSAFE_FUNCTION_ATTRIBUTES or \
+ attr in UNSAFE_METHOD_ATTRIBUTES:
+ return True
+ elif isinstance(obj, type):
+ if attr == 'mro':
+ return True
+ elif isinstance(obj, (types.CodeType, types.TracebackType, types.FrameType)):
+ return True
+ elif isinstance(obj, types.GeneratorType):
+ if attr in UNSAFE_GENERATOR_ATTRIBUTES:
+ return True
+ return attr.startswith('__')
+
+
+def modifies_known_mutable(obj, attr):
+ """This function checks if an attribute on a builtin mutable object
+ (list, dict, set or deque) would modify it if called. It also supports
+ the "user"-versions of the objects (`sets.Set`, `UserDict.*` etc.) and
+ with Python 2.6 onwards the abstract base classes `MutableSet`,
+ `MutableMapping`, and `MutableSequence`.
+
+ >>> modifies_known_mutable({}, "clear")
+ True
+ >>> modifies_known_mutable({}, "keys")
+ False
+ >>> modifies_known_mutable([], "append")
+ True
+ >>> modifies_known_mutable([], "index")
+ False
+
+ If called with an unsupported object (such as unicode) `False` is
+ returned.
+
+ >>> modifies_known_mutable("foo", "upper")
+ False
+ """
+ for typespec, unsafe in _mutable_spec:
+ if isinstance(obj, typespec):
+ return attr in unsafe
+ return False
+
+
+class SandboxedEnvironment(Environment):
+ """The sandboxed environment. It works like the regular environment but
+ tells the compiler to generate sandboxed code. Additionally subclasses of
+ this environment may override the methods that tell the runtime what
+ attributes or functions are safe to access.
+
+ If the template tries to access insecure code a :exc:`SecurityError` is
+ raised. However also other exceptions may occour during the rendering so
+ the caller has to ensure that all exceptions are catched.
+ """
+ sandboxed = True
+
+ #: default callback table for the binary operators. A copy of this is
+ #: available on each instance of a sandboxed environment as
+ #: :attr:`binop_table`
+ default_binop_table = {
+ '+': operator.add,
+ '-': operator.sub,
+ '*': operator.mul,
+ '/': operator.truediv,
+ '//': operator.floordiv,
+ '**': operator.pow,
+ '%': operator.mod
+ }
+
+ #: default callback table for the unary operators. A copy of this is
+ #: available on each instance of a sandboxed environment as
+ #: :attr:`unop_table`
+ default_unop_table = {
+ '+': operator.pos,
+ '-': operator.neg
+ }
+
+ #: a set of binary operators that should be intercepted. Each operator
+ #: that is added to this set (empty by default) is delegated to the
+ #: :meth:`call_binop` method that will perform the operator. The default
+ #: operator callback is specified by :attr:`binop_table`.
+ #:
+ #: The following binary operators are interceptable:
+ #: ``//``, ``%``, ``+``, ``*``, ``-``, ``/``, and ``**``
+ #:
+ #: The default operation form the operator table corresponds to the
+ #: builtin function. Intercepted calls are always slower than the native
+ #: operator call, so make sure only to intercept the ones you are
+ #: interested in.
+ #:
+ #: .. versionadded:: 2.6
+ intercepted_binops = frozenset()
+
+ #: a set of unary operators that should be intercepted. Each operator
+ #: that is added to this set (empty by default) is delegated to the
+ #: :meth:`call_unop` method that will perform the operator. The default
+ #: operator callback is specified by :attr:`unop_table`.
+ #:
+ #: The following unary operators are interceptable: ``+``, ``-``
+ #:
+ #: The default operation form the operator table corresponds to the
+ #: builtin function. Intercepted calls are always slower than the native
+ #: operator call, so make sure only to intercept the ones you are
+ #: interested in.
+ #:
+ #: .. versionadded:: 2.6
+ intercepted_unops = frozenset()
+
+ def intercept_unop(self, operator):
+ """Called during template compilation with the name of a unary
+ operator to check if it should be intercepted at runtime. If this
+ method returns `True`, :meth:`call_unop` is excuted for this unary
+ operator. The default implementation of :meth:`call_unop` will use
+ the :attr:`unop_table` dictionary to perform the operator with the
+ same logic as the builtin one.
+
+ The following unary operators are interceptable: ``+`` and ``-``
+
+ Intercepted calls are always slower than the native operator call,
+ so make sure only to intercept the ones you are interested in.
+
+ .. versionadded:: 2.6
+ """
+ return False
+
+
+ def __init__(self, *args, **kwargs):
+ Environment.__init__(self, *args, **kwargs)
+ self.globals['range'] = safe_range
+ self.binop_table = self.default_binop_table.copy()
+ self.unop_table = self.default_unop_table.copy()
+
+ def is_safe_attribute(self, obj, attr, value):
+ """The sandboxed environment will call this method to check if the
+ attribute of an object is safe to access. Per default all attributes
+ starting with an underscore are considered private as well as the
+ special attributes of internal python objects as returned by the
+ :func:`is_internal_attribute` function.
+ """
+ return not (attr.startswith('_') or is_internal_attribute(obj, attr))
+
+ def is_safe_callable(self, obj):
+ """Check if an object is safely callable. Per default a function is
+ considered safe unless the `unsafe_callable` attribute exists and is
+ True. Override this method to alter the behavior, but this won't
+ affect the `unsafe` decorator from this module.
+ """
+ return not (getattr(obj, 'unsafe_callable', False) or
+ getattr(obj, 'alters_data', False))
+
+ def call_binop(self, context, operator, left, right):
+ """For intercepted binary operator calls (:meth:`intercepted_binops`)
+ this function is executed instead of the builtin operator. This can
+ be used to fine tune the behavior of certain operators.
+
+ .. versionadded:: 2.6
+ """
+ return self.binop_table[operator](left, right)
+
+ def call_unop(self, context, operator, arg):
+ """For intercepted unary operator calls (:meth:`intercepted_unops`)
+ this function is executed instead of the builtin operator. This can
+ be used to fine tune the behavior of certain operators.
+
+ .. versionadded:: 2.6
+ """
+ return self.unop_table[operator](arg)
+
+ def getitem(self, obj, argument):
+ """Subscribe an object from sandboxed code."""
+ try:
+ return obj[argument]
+ except (TypeError, LookupError):
+ if isinstance(argument, string_types):
+ try:
+ attr = str(argument)
+ except Exception:
+ pass
+ else:
+ try:
+ value = getattr(obj, attr)
+ except AttributeError:
+ pass
+ else:
+ if self.is_safe_attribute(obj, argument, value):
+ return value
+ return self.unsafe_undefined(obj, argument)
+ return self.undefined(obj=obj, name=argument)
+
+ def getattr(self, obj, attribute):
+ """Subscribe an object from sandboxed code and prefer the
+ attribute. The attribute passed *must* be a bytestring.
+ """
+ try:
+ value = getattr(obj, attribute)
+ except AttributeError:
+ try:
+ return obj[attribute]
+ except (TypeError, LookupError):
+ pass
+ else:
+ if self.is_safe_attribute(obj, attribute, value):
+ return value
+ return self.unsafe_undefined(obj, attribute)
+ return self.undefined(obj=obj, name=attribute)
+
+ def unsafe_undefined(self, obj, attribute):
+ """Return an undefined object for unsafe attributes."""
+ return self.undefined('access to attribute %r of %r '
+ 'object is unsafe.' % (
+ attribute,
+ obj.__class__.__name__
+ ), name=attribute, obj=obj, exc=SecurityError)
+
+ def call(__self, __context, __obj, *args, **kwargs):
+ """Call an object from sandboxed code."""
+ # the double prefixes are to avoid double keyword argument
+ # errors when proxying the call.
+ if not __self.is_safe_callable(__obj):
+ raise SecurityError('%r is not safely callable' % (__obj,))
+ return __context.call(__obj, *args, **kwargs)
+
+
+class ImmutableSandboxedEnvironment(SandboxedEnvironment):
+ """Works exactly like the regular `SandboxedEnvironment` but does not
+ permit modifications on the builtin mutable objects `list`, `set`, and
+ `dict` by using the :func:`modifies_known_mutable` function.
+ """
+
+ def is_safe_attribute(self, obj, attr, value):
+ if not SandboxedEnvironment.is_safe_attribute(self, obj, attr, value):
+ return False
+ return not modifies_known_mutable(obj, attr)
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/jinja2/sandbox.pyc b/Assignments/microblog/flask/lib/python2.7/site-packages/jinja2/sandbox.pyc
new file mode 100644
index 0000000..a44bbd2
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/jinja2/sandbox.pyc differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/jinja2/tests.py b/Assignments/microblog/flask/lib/python2.7/site-packages/jinja2/tests.py
new file mode 100644
index 0000000..bb32349
--- /dev/null
+++ b/Assignments/microblog/flask/lib/python2.7/site-packages/jinja2/tests.py
@@ -0,0 +1,173 @@
+# -*- coding: utf-8 -*-
+"""
+ jinja2.tests
+ ~~~~~~~~~~~~
+
+ Jinja test functions. Used with the "is" operator.
+
+ :copyright: (c) 2010 by the Jinja Team.
+ :license: BSD, see LICENSE for more details.
+"""
+import re
+from collections import Mapping
+from jinja2.runtime import Undefined
+from jinja2._compat import text_type, string_types, integer_types
+import decimal
+
+number_re = re.compile(r'^-?\d+(\.\d+)?$')
+regex_type = type(number_re)
+
+
+test_callable = callable
+
+
+def test_odd(value):
+ """Return true if the variable is odd."""
+ return value % 2 == 1
+
+
+def test_even(value):
+ """Return true if the variable is even."""
+ return value % 2 == 0
+
+
+def test_divisibleby(value, num):
+ """Check if a variable is divisible by a number."""
+ return value % num == 0
+
+
+def test_defined(value):
+ """Return true if the variable is defined:
+
+ .. sourcecode:: jinja
+
+ {% if variable is defined %}
+ value of variable: {{ variable }}
+ {% else %}
+ variable is not defined
+ {% endif %}
+
+ See the :func:`default` filter for a simple way to set undefined
+ variables.
+ """
+ return not isinstance(value, Undefined)
+
+
+def test_undefined(value):
+ """Like :func:`defined` but the other way round."""
+ return isinstance(value, Undefined)
+
+
+def test_none(value):
+ """Return true if the variable is none."""
+ return value is None
+
+
+def test_lower(value):
+ """Return true if the variable is lowercased."""
+ return text_type(value).islower()
+
+
+def test_upper(value):
+ """Return true if the variable is uppercased."""
+ return text_type(value).isupper()
+
+
+def test_string(value):
+ """Return true if the object is a string."""
+ return isinstance(value, string_types)
+
+
+def test_mapping(value):
+ """Return true if the object is a mapping (dict etc.).
+
+ .. versionadded:: 2.6
+ """
+ return isinstance(value, Mapping)
+
+
+def test_number(value):
+ """Return true if the variable is a number."""
+ return isinstance(value, integer_types + (float, complex, decimal.Decimal))
+
+
+def test_sequence(value):
+ """Return true if the variable is a sequence. Sequences are variables
+ that are iterable.
+ """
+ try:
+ len(value)
+ value.__getitem__
+ except:
+ return False
+ return True
+
+
+def test_equalto(value, other):
+ """Check if an object has the same value as another object:
+
+ .. sourcecode:: jinja
+
+ {% if foo.expression is equalto 42 %}
+ the foo attribute evaluates to the constant 42
+ {% endif %}
+
+ This appears to be a useless test as it does exactly the same as the
+ ``==`` operator, but it can be useful when used together with the
+ `selectattr` function:
+
+ .. sourcecode:: jinja
+
+ {{ users|selectattr("email", "equalto", "foo@bar.invalid") }}
+
+ .. versionadded:: 2.8
+ """
+ return value == other
+
+
+def test_sameas(value, other):
+ """Check if an object points to the same memory address than another
+ object:
+
+ .. sourcecode:: jinja
+
+ {% if foo.attribute is sameas false %}
+ the foo attribute really is the `False` singleton
+ {% endif %}
+ """
+ return value is other
+
+
+def test_iterable(value):
+ """Check if it's possible to iterate over an object."""
+ try:
+ iter(value)
+ except TypeError:
+ return False
+ return True
+
+
+def test_escaped(value):
+ """Check if the value is escaped."""
+ return hasattr(value, '__html__')
+
+
+TESTS = {
+ 'odd': test_odd,
+ 'even': test_even,
+ 'divisibleby': test_divisibleby,
+ 'defined': test_defined,
+ 'undefined': test_undefined,
+ 'none': test_none,
+ 'lower': test_lower,
+ 'upper': test_upper,
+ 'string': test_string,
+ 'mapping': test_mapping,
+ 'number': test_number,
+ 'sequence': test_sequence,
+ 'iterable': test_iterable,
+ 'callable': test_callable,
+ 'sameas': test_sameas,
+ 'equalto': test_equalto,
+ 'escaped': test_escaped
+}
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/jinja2/tests.pyc b/Assignments/microblog/flask/lib/python2.7/site-packages/jinja2/tests.pyc
new file mode 100644
index 0000000..7980568
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/jinja2/tests.pyc differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/jinja2/utils.py b/Assignments/microblog/flask/lib/python2.7/site-packages/jinja2/utils.py
new file mode 100644
index 0000000..cdd4cd3
--- /dev/null
+++ b/Assignments/microblog/flask/lib/python2.7/site-packages/jinja2/utils.py
@@ -0,0 +1,531 @@
+# -*- coding: utf-8 -*-
+"""
+ jinja2.utils
+ ~~~~~~~~~~~~
+
+ Utility functions.
+
+ :copyright: (c) 2010 by the Jinja Team.
+ :license: BSD, see LICENSE for more details.
+"""
+import re
+import errno
+from collections import deque
+from threading import Lock
+from jinja2._compat import text_type, string_types, implements_iterator, \
+ url_quote
+
+
+_word_split_re = re.compile(r'(\s+)')
+_punctuation_re = re.compile(
+ '^(?P(?:%s)*)(?P.*?)(?P(?:%s)*)$' % (
+ '|'.join(map(re.escape, ('(', '<', '<'))),
+ '|'.join(map(re.escape, ('.', ',', ')', '>', '\n', '>')))
+ )
+)
+_simple_email_re = re.compile(r'^\S+@[a-zA-Z0-9._-]+\.[a-zA-Z0-9._-]+$')
+_striptags_re = re.compile(r'(|<[^>]*>)')
+_entity_re = re.compile(r'&([^;]+);')
+_letters = 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ'
+_digits = '0123456789'
+
+# special singleton representing missing values for the runtime
+missing = type('MissingType', (), {'__repr__': lambda x: 'missing'})()
+
+# internal code
+internal_code = set()
+
+concat = u''.join
+
+
+def contextfunction(f):
+ """This decorator can be used to mark a function or method context callable.
+ A context callable is passed the active :class:`Context` as first argument when
+ called from the template. This is useful if a function wants to get access
+ to the context or functions provided on the context object. For example
+ a function that returns a sorted list of template variables the current
+ template exports could look like this::
+
+ @contextfunction
+ def get_exported_names(context):
+ return sorted(context.exported_vars)
+ """
+ f.contextfunction = True
+ return f
+
+
+def evalcontextfunction(f):
+ """This decorator can be used to mark a function or method as an eval
+ context callable. This is similar to the :func:`contextfunction`
+ but instead of passing the context, an evaluation context object is
+ passed. For more information about the eval context, see
+ :ref:`eval-context`.
+
+ .. versionadded:: 2.4
+ """
+ f.evalcontextfunction = True
+ return f
+
+
+def environmentfunction(f):
+ """This decorator can be used to mark a function or method as environment
+ callable. This decorator works exactly like the :func:`contextfunction`
+ decorator just that the first argument is the active :class:`Environment`
+ and not context.
+ """
+ f.environmentfunction = True
+ return f
+
+
+def internalcode(f):
+ """Marks the function as internally used"""
+ internal_code.add(f.__code__)
+ return f
+
+
+def is_undefined(obj):
+ """Check if the object passed is undefined. This does nothing more than
+ performing an instance check against :class:`Undefined` but looks nicer.
+ This can be used for custom filters or tests that want to react to
+ undefined variables. For example a custom default filter can look like
+ this::
+
+ def default(var, default=''):
+ if is_undefined(var):
+ return default
+ return var
+ """
+ from jinja2.runtime import Undefined
+ return isinstance(obj, Undefined)
+
+
+def consume(iterable):
+ """Consumes an iterable without doing anything with it."""
+ for event in iterable:
+ pass
+
+
+def clear_caches():
+ """Jinja2 keeps internal caches for environments and lexers. These are
+ used so that Jinja2 doesn't have to recreate environments and lexers all
+ the time. Normally you don't have to care about that but if you are
+ messuring memory consumption you may want to clean the caches.
+ """
+ from jinja2.environment import _spontaneous_environments
+ from jinja2.lexer import _lexer_cache
+ _spontaneous_environments.clear()
+ _lexer_cache.clear()
+
+
+def import_string(import_name, silent=False):
+ """Imports an object based on a string. This is useful if you want to
+ use import paths as endpoints or something similar. An import path can
+ be specified either in dotted notation (``xml.sax.saxutils.escape``)
+ or with a colon as object delimiter (``xml.sax.saxutils:escape``).
+
+ If the `silent` is True the return value will be `None` if the import
+ fails.
+
+ :return: imported object
+ """
+ try:
+ if ':' in import_name:
+ module, obj = import_name.split(':', 1)
+ elif '.' in import_name:
+ items = import_name.split('.')
+ module = '.'.join(items[:-1])
+ obj = items[-1]
+ else:
+ return __import__(import_name)
+ return getattr(__import__(module, None, None, [obj]), obj)
+ except (ImportError, AttributeError):
+ if not silent:
+ raise
+
+
+def open_if_exists(filename, mode='rb'):
+ """Returns a file descriptor for the filename if that file exists,
+ otherwise `None`.
+ """
+ try:
+ return open(filename, mode)
+ except IOError as e:
+ if e.errno not in (errno.ENOENT, errno.EISDIR, errno.EINVAL):
+ raise
+
+
+def object_type_repr(obj):
+ """Returns the name of the object's type. For some recognized
+ singletons the name of the object is returned instead. (For
+ example for `None` and `Ellipsis`).
+ """
+ if obj is None:
+ return 'None'
+ elif obj is Ellipsis:
+ return 'Ellipsis'
+ # __builtin__ in 2.x, builtins in 3.x
+ if obj.__class__.__module__ in ('__builtin__', 'builtins'):
+ name = obj.__class__.__name__
+ else:
+ name = obj.__class__.__module__ + '.' + obj.__class__.__name__
+ return '%s object' % name
+
+
+def pformat(obj, verbose=False):
+ """Prettyprint an object. Either use the `pretty` library or the
+ builtin `pprint`.
+ """
+ try:
+ from pretty import pretty
+ return pretty(obj, verbose=verbose)
+ except ImportError:
+ from pprint import pformat
+ return pformat(obj)
+
+
+def urlize(text, trim_url_limit=None, nofollow=False, target=None):
+ """Converts any URLs in text into clickable links. Works on http://,
+ https:// and www. links. Links can have trailing punctuation (periods,
+ commas, close-parens) and leading punctuation (opening parens) and
+ it'll still do the right thing.
+
+ If trim_url_limit is not None, the URLs in link text will be limited
+ to trim_url_limit characters.
+
+ If nofollow is True, the URLs in link text will get a rel="nofollow"
+ attribute.
+
+ If target is not None, a target attribute will be added to the link.
+ """
+ trim_url = lambda x, limit=trim_url_limit: limit is not None \
+ and (x[:limit] + (len(x) >=limit and '...'
+ or '')) or x
+ words = _word_split_re.split(text_type(escape(text)))
+ nofollow_attr = nofollow and ' rel="nofollow"' or ''
+ if target is not None and isinstance(target, string_types):
+ target_attr = ' target="%s"' % target
+ else:
+ target_attr = ''
+ for i, word in enumerate(words):
+ match = _punctuation_re.match(word)
+ if match:
+ lead, middle, trail = match.groups()
+ if middle.startswith('www.') or (
+ '@' not in middle and
+ not middle.startswith('http://') and
+ not middle.startswith('https://') and
+ len(middle) > 0 and
+ middle[0] in _letters + _digits and (
+ middle.endswith('.org') or
+ middle.endswith('.net') or
+ middle.endswith('.com')
+ )):
+ middle = '%s' % (middle,
+ nofollow_attr, target_attr, trim_url(middle))
+ if middle.startswith('http://') or \
+ middle.startswith('https://'):
+ middle = '%s' % (middle,
+ nofollow_attr, target_attr, trim_url(middle))
+ if '@' in middle and not middle.startswith('www.') and \
+ not ':' in middle and _simple_email_re.match(middle):
+ middle = '%s' % (middle, middle)
+ if lead + middle + trail != word:
+ words[i] = lead + middle + trail
+ return u''.join(words)
+
+
+def generate_lorem_ipsum(n=5, html=True, min=20, max=100):
+ """Generate some lorem ipsum for the template."""
+ from jinja2.constants import LOREM_IPSUM_WORDS
+ from random import choice, randrange
+ words = LOREM_IPSUM_WORDS.split()
+ result = []
+
+ for _ in range(n):
+ next_capitalized = True
+ last_comma = last_fullstop = 0
+ word = None
+ last = None
+ p = []
+
+ # each paragraph contains out of 20 to 100 words.
+ for idx, _ in enumerate(range(randrange(min, max))):
+ while True:
+ word = choice(words)
+ if word != last:
+ last = word
+ break
+ if next_capitalized:
+ word = word.capitalize()
+ next_capitalized = False
+ # add commas
+ if idx - randrange(3, 8) > last_comma:
+ last_comma = idx
+ last_fullstop += 2
+ word += ','
+ # add end of sentences
+ if idx - randrange(10, 20) > last_fullstop:
+ last_comma = last_fullstop = idx
+ word += '.'
+ next_capitalized = True
+ p.append(word)
+
+ # ensure that the paragraph ends with a dot.
+ p = u' '.join(p)
+ if p.endswith(','):
+ p = p[:-1] + '.'
+ elif not p.endswith('.'):
+ p += '.'
+ result.append(p)
+
+ if not html:
+ return u'\n\n'.join(result)
+ return Markup(u'\n'.join(u'%s
' % escape(x) for x in result))
+
+
+def unicode_urlencode(obj, charset='utf-8', for_qs=False):
+ """URL escapes a single bytestring or unicode string with the
+ given charset if applicable to URL safe quoting under all rules
+ that need to be considered under all supported Python versions.
+
+ If non strings are provided they are converted to their unicode
+ representation first.
+ """
+ if not isinstance(obj, string_types):
+ obj = text_type(obj)
+ if isinstance(obj, text_type):
+ obj = obj.encode(charset)
+ safe = for_qs and b'' or b'/'
+ rv = text_type(url_quote(obj, safe))
+ if for_qs:
+ rv = rv.replace('%20', '+')
+ return rv
+
+
+class LRUCache(object):
+ """A simple LRU Cache implementation."""
+
+ # this is fast for small capacities (something below 1000) but doesn't
+ # scale. But as long as it's only used as storage for templates this
+ # won't do any harm.
+
+ def __init__(self, capacity):
+ self.capacity = capacity
+ self._mapping = {}
+ self._queue = deque()
+ self._postinit()
+
+ def _postinit(self):
+ # alias all queue methods for faster lookup
+ self._popleft = self._queue.popleft
+ self._pop = self._queue.pop
+ self._remove = self._queue.remove
+ self._wlock = Lock()
+ self._append = self._queue.append
+
+ def __getstate__(self):
+ return {
+ 'capacity': self.capacity,
+ '_mapping': self._mapping,
+ '_queue': self._queue
+ }
+
+ def __setstate__(self, d):
+ self.__dict__.update(d)
+ self._postinit()
+
+ def __getnewargs__(self):
+ return (self.capacity,)
+
+ def copy(self):
+ """Return a shallow copy of the instance."""
+ rv = self.__class__(self.capacity)
+ rv._mapping.update(self._mapping)
+ rv._queue = deque(self._queue)
+ return rv
+
+ def get(self, key, default=None):
+ """Return an item from the cache dict or `default`"""
+ try:
+ return self[key]
+ except KeyError:
+ return default
+
+ def setdefault(self, key, default=None):
+ """Set `default` if the key is not in the cache otherwise
+ leave unchanged. Return the value of this key.
+ """
+ self._wlock.acquire()
+ try:
+ try:
+ return self[key]
+ except KeyError:
+ self[key] = default
+ return default
+ finally:
+ self._wlock.release()
+
+ def clear(self):
+ """Clear the cache."""
+ self._wlock.acquire()
+ try:
+ self._mapping.clear()
+ self._queue.clear()
+ finally:
+ self._wlock.release()
+
+ def __contains__(self, key):
+ """Check if a key exists in this cache."""
+ return key in self._mapping
+
+ def __len__(self):
+ """Return the current size of the cache."""
+ return len(self._mapping)
+
+ def __repr__(self):
+ return '<%s %r>' % (
+ self.__class__.__name__,
+ self._mapping
+ )
+
+ def __getitem__(self, key):
+ """Get an item from the cache. Moves the item up so that it has the
+ highest priority then.
+
+ Raise a `KeyError` if it does not exist.
+ """
+ self._wlock.acquire()
+ try:
+ rv = self._mapping[key]
+ if self._queue[-1] != key:
+ try:
+ self._remove(key)
+ except ValueError:
+ # if something removed the key from the container
+ # when we read, ignore the ValueError that we would
+ # get otherwise.
+ pass
+ self._append(key)
+ return rv
+ finally:
+ self._wlock.release()
+
+ def __setitem__(self, key, value):
+ """Sets the value for an item. Moves the item up so that it
+ has the highest priority then.
+ """
+ self._wlock.acquire()
+ try:
+ if key in self._mapping:
+ self._remove(key)
+ elif len(self._mapping) == self.capacity:
+ del self._mapping[self._popleft()]
+ self._append(key)
+ self._mapping[key] = value
+ finally:
+ self._wlock.release()
+
+ def __delitem__(self, key):
+ """Remove an item from the cache dict.
+ Raise a `KeyError` if it does not exist.
+ """
+ self._wlock.acquire()
+ try:
+ del self._mapping[key]
+ try:
+ self._remove(key)
+ except ValueError:
+ # __getitem__ is not locked, it might happen
+ pass
+ finally:
+ self._wlock.release()
+
+ def items(self):
+ """Return a list of items."""
+ result = [(key, self._mapping[key]) for key in list(self._queue)]
+ result.reverse()
+ return result
+
+ def iteritems(self):
+ """Iterate over all items."""
+ return iter(self.items())
+
+ def values(self):
+ """Return a list of all values."""
+ return [x[1] for x in self.items()]
+
+ def itervalue(self):
+ """Iterate over all values."""
+ return iter(self.values())
+
+ def keys(self):
+ """Return a list of all keys ordered by most recent usage."""
+ return list(self)
+
+ def iterkeys(self):
+ """Iterate over all keys in the cache dict, ordered by
+ the most recent usage.
+ """
+ return reversed(tuple(self._queue))
+
+ __iter__ = iterkeys
+
+ def __reversed__(self):
+ """Iterate over the values in the cache dict, oldest items
+ coming first.
+ """
+ return iter(tuple(self._queue))
+
+ __copy__ = copy
+
+
+# register the LRU cache as mutable mapping if possible
+try:
+ from collections import MutableMapping
+ MutableMapping.register(LRUCache)
+except ImportError:
+ pass
+
+
+@implements_iterator
+class Cycler(object):
+ """A cycle helper for templates."""
+
+ def __init__(self, *items):
+ if not items:
+ raise RuntimeError('at least one item has to be provided')
+ self.items = items
+ self.reset()
+
+ def reset(self):
+ """Resets the cycle."""
+ self.pos = 0
+
+ @property
+ def current(self):
+ """Returns the current item."""
+ return self.items[self.pos]
+
+ def __next__(self):
+ """Goes one item ahead and returns it."""
+ rv = self.current
+ self.pos = (self.pos + 1) % len(self.items)
+ return rv
+
+
+class Joiner(object):
+ """A joining helper for templates."""
+
+ def __init__(self, sep=u', '):
+ self.sep = sep
+ self.used = False
+
+ def __call__(self):
+ if not self.used:
+ self.used = True
+ return u''
+ return self.sep
+
+
+# Imported here because that's where it was in the past
+from markupsafe import Markup, escape, soft_unicode
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/jinja2/utils.pyc b/Assignments/microblog/flask/lib/python2.7/site-packages/jinja2/utils.pyc
new file mode 100644
index 0000000..2fd9ddc
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/jinja2/utils.pyc differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/jinja2/visitor.py b/Assignments/microblog/flask/lib/python2.7/site-packages/jinja2/visitor.py
new file mode 100644
index 0000000..413e7c3
--- /dev/null
+++ b/Assignments/microblog/flask/lib/python2.7/site-packages/jinja2/visitor.py
@@ -0,0 +1,87 @@
+# -*- coding: utf-8 -*-
+"""
+ jinja2.visitor
+ ~~~~~~~~~~~~~~
+
+ This module implements a visitor for the nodes.
+
+ :copyright: (c) 2010 by the Jinja Team.
+ :license: BSD.
+"""
+from jinja2.nodes import Node
+
+
+class NodeVisitor(object):
+ """Walks the abstract syntax tree and call visitor functions for every
+ node found. The visitor functions may return values which will be
+ forwarded by the `visit` method.
+
+ Per default the visitor functions for the nodes are ``'visit_'`` +
+ class name of the node. So a `TryFinally` node visit function would
+ be `visit_TryFinally`. This behavior can be changed by overriding
+ the `get_visitor` function. If no visitor function exists for a node
+ (return value `None`) the `generic_visit` visitor is used instead.
+ """
+
+ def get_visitor(self, node):
+ """Return the visitor function for this node or `None` if no visitor
+ exists for this node. In that case the generic visit function is
+ used instead.
+ """
+ method = 'visit_' + node.__class__.__name__
+ return getattr(self, method, None)
+
+ def visit(self, node, *args, **kwargs):
+ """Visit a node."""
+ f = self.get_visitor(node)
+ if f is not None:
+ return f(node, *args, **kwargs)
+ return self.generic_visit(node, *args, **kwargs)
+
+ def generic_visit(self, node, *args, **kwargs):
+ """Called if no explicit visitor function exists for a node."""
+ for node in node.iter_child_nodes():
+ self.visit(node, *args, **kwargs)
+
+
+class NodeTransformer(NodeVisitor):
+ """Walks the abstract syntax tree and allows modifications of nodes.
+
+ The `NodeTransformer` will walk the AST and use the return value of the
+ visitor functions to replace or remove the old node. If the return
+ value of the visitor function is `None` the node will be removed
+ from the previous location otherwise it's replaced with the return
+ value. The return value may be the original node in which case no
+ replacement takes place.
+ """
+
+ def generic_visit(self, node, *args, **kwargs):
+ for field, old_value in node.iter_fields():
+ if isinstance(old_value, list):
+ new_values = []
+ for value in old_value:
+ if isinstance(value, Node):
+ value = self.visit(value, *args, **kwargs)
+ if value is None:
+ continue
+ elif not isinstance(value, Node):
+ new_values.extend(value)
+ continue
+ new_values.append(value)
+ old_value[:] = new_values
+ elif isinstance(old_value, Node):
+ new_node = self.visit(old_value, *args, **kwargs)
+ if new_node is None:
+ delattr(node, field)
+ else:
+ setattr(node, field, new_node)
+ return node
+
+ def visit_list(self, node, *args, **kwargs):
+ """As transformers may return lists in some places this method
+ can be used to enforce a list as return value.
+ """
+ rv = self.visit(node, *args, **kwargs)
+ if not isinstance(rv, list):
+ rv = [rv]
+ return rv
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/jinja2/visitor.pyc b/Assignments/microblog/flask/lib/python2.7/site-packages/jinja2/visitor.pyc
new file mode 100644
index 0000000..efc7302
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/jinja2/visitor.pyc differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/markupsafe/__init__.py b/Assignments/microblog/flask/lib/python2.7/site-packages/markupsafe/__init__.py
new file mode 100644
index 0000000..2755401
--- /dev/null
+++ b/Assignments/microblog/flask/lib/python2.7/site-packages/markupsafe/__init__.py
@@ -0,0 +1,298 @@
+# -*- coding: utf-8 -*-
+"""
+ markupsafe
+ ~~~~~~~~~~
+
+ Implements a Markup string.
+
+ :copyright: (c) 2010 by Armin Ronacher.
+ :license: BSD, see LICENSE for more details.
+"""
+import re
+import string
+from collections import Mapping
+from markupsafe._compat import text_type, string_types, int_types, \
+ unichr, iteritems, PY2
+
+
+__all__ = ['Markup', 'soft_unicode', 'escape', 'escape_silent']
+
+
+_striptags_re = re.compile(r'(|<[^>]*>)')
+_entity_re = re.compile(r'&([^;]+);')
+
+
+class Markup(text_type):
+ r"""Marks a string as being safe for inclusion in HTML/XML output without
+ needing to be escaped. This implements the `__html__` interface a couple
+ of frameworks and web applications use. :class:`Markup` is a direct
+ subclass of `unicode` and provides all the methods of `unicode` just that
+ it escapes arguments passed and always returns `Markup`.
+
+ The `escape` function returns markup objects so that double escaping can't
+ happen.
+
+ The constructor of the :class:`Markup` class can be used for three
+ different things: When passed an unicode object it's assumed to be safe,
+ when passed an object with an HTML representation (has an `__html__`
+ method) that representation is used, otherwise the object passed is
+ converted into a unicode string and then assumed to be safe:
+
+ >>> Markup("Hello World!")
+ Markup(u'Hello World!')
+ >>> class Foo(object):
+ ... def __html__(self):
+ ... return 'foo'
+ ...
+ >>> Markup(Foo())
+ Markup(u'foo')
+
+ If you want object passed being always treated as unsafe you can use the
+ :meth:`escape` classmethod to create a :class:`Markup` object:
+
+ >>> Markup.escape("Hello World!")
+ Markup(u'Hello <em>World</em>!')
+
+ Operations on a markup string are markup aware which means that all
+ arguments are passed through the :func:`escape` function:
+
+ >>> em = Markup("%s")
+ >>> em % "foo & bar"
+ Markup(u'foo & bar')
+ >>> strong = Markup("%(text)s")
+ >>> strong % {'text': ''}
+ Markup(u'<blink>hacker here</blink>')
+ >>> Markup("Hello ") + ""
+ Markup(u'Hello <foo>')
+ """
+ __slots__ = ()
+
+ def __new__(cls, base=u'', encoding=None, errors='strict'):
+ if hasattr(base, '__html__'):
+ base = base.__html__()
+ if encoding is None:
+ return text_type.__new__(cls, base)
+ return text_type.__new__(cls, base, encoding, errors)
+
+ def __html__(self):
+ return self
+
+ def __add__(self, other):
+ if isinstance(other, string_types) or hasattr(other, '__html__'):
+ return self.__class__(super(Markup, self).__add__(self.escape(other)))
+ return NotImplemented
+
+ def __radd__(self, other):
+ if hasattr(other, '__html__') or isinstance(other, string_types):
+ return self.escape(other).__add__(self)
+ return NotImplemented
+
+ def __mul__(self, num):
+ if isinstance(num, int_types):
+ return self.__class__(text_type.__mul__(self, num))
+ return NotImplemented
+ __rmul__ = __mul__
+
+ def __mod__(self, arg):
+ if isinstance(arg, tuple):
+ arg = tuple(_MarkupEscapeHelper(x, self.escape) for x in arg)
+ else:
+ arg = _MarkupEscapeHelper(arg, self.escape)
+ return self.__class__(text_type.__mod__(self, arg))
+
+ def __repr__(self):
+ return '%s(%s)' % (
+ self.__class__.__name__,
+ text_type.__repr__(self)
+ )
+
+ def join(self, seq):
+ return self.__class__(text_type.join(self, map(self.escape, seq)))
+ join.__doc__ = text_type.join.__doc__
+
+ def split(self, *args, **kwargs):
+ return list(map(self.__class__, text_type.split(self, *args, **kwargs)))
+ split.__doc__ = text_type.split.__doc__
+
+ def rsplit(self, *args, **kwargs):
+ return list(map(self.__class__, text_type.rsplit(self, *args, **kwargs)))
+ rsplit.__doc__ = text_type.rsplit.__doc__
+
+ def splitlines(self, *args, **kwargs):
+ return list(map(self.__class__, text_type.splitlines(
+ self, *args, **kwargs)))
+ splitlines.__doc__ = text_type.splitlines.__doc__
+
+ def unescape(self):
+ r"""Unescape markup again into an text_type string. This also resolves
+ known HTML4 and XHTML entities:
+
+ >>> Markup("Main » About").unescape()
+ u'Main \xbb About'
+ """
+ from markupsafe._constants import HTML_ENTITIES
+ def handle_match(m):
+ name = m.group(1)
+ if name in HTML_ENTITIES:
+ return unichr(HTML_ENTITIES[name])
+ try:
+ if name[:2] in ('#x', '#X'):
+ return unichr(int(name[2:], 16))
+ elif name.startswith('#'):
+ return unichr(int(name[1:]))
+ except ValueError:
+ pass
+ return u''
+ return _entity_re.sub(handle_match, text_type(self))
+
+ def striptags(self):
+ r"""Unescape markup into an text_type string and strip all tags. This
+ also resolves known HTML4 and XHTML entities. Whitespace is
+ normalized to one:
+
+ >>> Markup("Main » About").striptags()
+ u'Main \xbb About'
+ """
+ stripped = u' '.join(_striptags_re.sub('', self).split())
+ return Markup(stripped).unescape()
+
+ @classmethod
+ def escape(cls, s):
+ """Escape the string. Works like :func:`escape` with the difference
+ that for subclasses of :class:`Markup` this function would return the
+ correct subclass.
+ """
+ rv = escape(s)
+ if rv.__class__ is not cls:
+ return cls(rv)
+ return rv
+
+ def make_simple_escaping_wrapper(name):
+ orig = getattr(text_type, name)
+ def func(self, *args, **kwargs):
+ args = _escape_argspec(list(args), enumerate(args), self.escape)
+ _escape_argspec(kwargs, iteritems(kwargs), self.escape)
+ return self.__class__(orig(self, *args, **kwargs))
+ func.__name__ = orig.__name__
+ func.__doc__ = orig.__doc__
+ return func
+
+ for method in '__getitem__', 'capitalize', \
+ 'title', 'lower', 'upper', 'replace', 'ljust', \
+ 'rjust', 'lstrip', 'rstrip', 'center', 'strip', \
+ 'translate', 'expandtabs', 'swapcase', 'zfill':
+ locals()[method] = make_simple_escaping_wrapper(method)
+
+ # new in python 2.5
+ if hasattr(text_type, 'partition'):
+ def partition(self, sep):
+ return tuple(map(self.__class__,
+ text_type.partition(self, self.escape(sep))))
+ def rpartition(self, sep):
+ return tuple(map(self.__class__,
+ text_type.rpartition(self, self.escape(sep))))
+
+ # new in python 2.6
+ if hasattr(text_type, 'format'):
+ def format(*args, **kwargs):
+ self, args = args[0], args[1:]
+ formatter = EscapeFormatter(self.escape)
+ kwargs = _MagicFormatMapping(args, kwargs)
+ return self.__class__(formatter.vformat(self, args, kwargs))
+
+ def __html_format__(self, format_spec):
+ if format_spec:
+ raise ValueError('Unsupported format specification '
+ 'for Markup.')
+ return self
+
+ # not in python 3
+ if hasattr(text_type, '__getslice__'):
+ __getslice__ = make_simple_escaping_wrapper('__getslice__')
+
+ del method, make_simple_escaping_wrapper
+
+
+class _MagicFormatMapping(Mapping):
+ """This class implements a dummy wrapper to fix a bug in the Python
+ standard library for string formatting.
+
+ See http://bugs.python.org/issue13598 for information about why
+ this is necessary.
+ """
+
+ def __init__(self, args, kwargs):
+ self._args = args
+ self._kwargs = kwargs
+ self._last_index = 0
+
+ def __getitem__(self, key):
+ if key == '':
+ idx = self._last_index
+ self._last_index += 1
+ try:
+ return self._args[idx]
+ except LookupError:
+ pass
+ key = str(idx)
+ return self._kwargs[key]
+
+ def __iter__(self):
+ return iter(self._kwargs)
+
+ def __len__(self):
+ return len(self._kwargs)
+
+
+if hasattr(text_type, 'format'):
+ class EscapeFormatter(string.Formatter):
+
+ def __init__(self, escape):
+ self.escape = escape
+
+ def format_field(self, value, format_spec):
+ if hasattr(value, '__html_format__'):
+ rv = value.__html_format__(format_spec)
+ elif hasattr(value, '__html__'):
+ if format_spec:
+ raise ValueError('No format specification allowed '
+ 'when formatting an object with '
+ 'its __html__ method.')
+ rv = value.__html__()
+ else:
+ rv = string.Formatter.format_field(self, value, format_spec)
+ return text_type(self.escape(rv))
+
+
+def _escape_argspec(obj, iterable, escape):
+ """Helper for various string-wrapped functions."""
+ for key, value in iterable:
+ if hasattr(value, '__html__') or isinstance(value, string_types):
+ obj[key] = escape(value)
+ return obj
+
+
+class _MarkupEscapeHelper(object):
+ """Helper for Markup.__mod__"""
+
+ def __init__(self, obj, escape):
+ self.obj = obj
+ self.escape = escape
+
+ __getitem__ = lambda s, x: _MarkupEscapeHelper(s.obj[x], s.escape)
+ __unicode__ = __str__ = lambda s: text_type(s.escape(s.obj))
+ __repr__ = lambda s: str(s.escape(repr(s.obj)))
+ __int__ = lambda s: int(s.obj)
+ __float__ = lambda s: float(s.obj)
+
+
+# we have to import it down here as the speedups and native
+# modules imports the markup type which is define above.
+try:
+ from markupsafe._speedups import escape, escape_silent, soft_unicode
+except ImportError:
+ from markupsafe._native import escape, escape_silent, soft_unicode
+
+if not PY2:
+ soft_str = soft_unicode
+ __all__.append('soft_str')
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/markupsafe/__init__.pyc b/Assignments/microblog/flask/lib/python2.7/site-packages/markupsafe/__init__.pyc
new file mode 100644
index 0000000..a525178
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/markupsafe/__init__.pyc differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/markupsafe/_compat.py b/Assignments/microblog/flask/lib/python2.7/site-packages/markupsafe/_compat.py
new file mode 100644
index 0000000..62e5632
--- /dev/null
+++ b/Assignments/microblog/flask/lib/python2.7/site-packages/markupsafe/_compat.py
@@ -0,0 +1,26 @@
+# -*- coding: utf-8 -*-
+"""
+ markupsafe._compat
+ ~~~~~~~~~~~~~~~~~~
+
+ Compatibility module for different Python versions.
+
+ :copyright: (c) 2013 by Armin Ronacher.
+ :license: BSD, see LICENSE for more details.
+"""
+import sys
+
+PY2 = sys.version_info[0] == 2
+
+if not PY2:
+ text_type = str
+ string_types = (str,)
+ unichr = chr
+ int_types = (int,)
+ iteritems = lambda x: iter(x.items())
+else:
+ text_type = unicode
+ string_types = (str, unicode)
+ unichr = unichr
+ int_types = (int, long)
+ iteritems = lambda x: x.iteritems()
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/markupsafe/_compat.pyc b/Assignments/microblog/flask/lib/python2.7/site-packages/markupsafe/_compat.pyc
new file mode 100644
index 0000000..d480c04
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/markupsafe/_compat.pyc differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/markupsafe/_constants.py b/Assignments/microblog/flask/lib/python2.7/site-packages/markupsafe/_constants.py
new file mode 100644
index 0000000..919bf03
--- /dev/null
+++ b/Assignments/microblog/flask/lib/python2.7/site-packages/markupsafe/_constants.py
@@ -0,0 +1,267 @@
+# -*- coding: utf-8 -*-
+"""
+ markupsafe._constants
+ ~~~~~~~~~~~~~~~~~~~~~
+
+ Highlevel implementation of the Markup string.
+
+ :copyright: (c) 2010 by Armin Ronacher.
+ :license: BSD, see LICENSE for more details.
+"""
+
+
+HTML_ENTITIES = {
+ 'AElig': 198,
+ 'Aacute': 193,
+ 'Acirc': 194,
+ 'Agrave': 192,
+ 'Alpha': 913,
+ 'Aring': 197,
+ 'Atilde': 195,
+ 'Auml': 196,
+ 'Beta': 914,
+ 'Ccedil': 199,
+ 'Chi': 935,
+ 'Dagger': 8225,
+ 'Delta': 916,
+ 'ETH': 208,
+ 'Eacute': 201,
+ 'Ecirc': 202,
+ 'Egrave': 200,
+ 'Epsilon': 917,
+ 'Eta': 919,
+ 'Euml': 203,
+ 'Gamma': 915,
+ 'Iacute': 205,
+ 'Icirc': 206,
+ 'Igrave': 204,
+ 'Iota': 921,
+ 'Iuml': 207,
+ 'Kappa': 922,
+ 'Lambda': 923,
+ 'Mu': 924,
+ 'Ntilde': 209,
+ 'Nu': 925,
+ 'OElig': 338,
+ 'Oacute': 211,
+ 'Ocirc': 212,
+ 'Ograve': 210,
+ 'Omega': 937,
+ 'Omicron': 927,
+ 'Oslash': 216,
+ 'Otilde': 213,
+ 'Ouml': 214,
+ 'Phi': 934,
+ 'Pi': 928,
+ 'Prime': 8243,
+ 'Psi': 936,
+ 'Rho': 929,
+ 'Scaron': 352,
+ 'Sigma': 931,
+ 'THORN': 222,
+ 'Tau': 932,
+ 'Theta': 920,
+ 'Uacute': 218,
+ 'Ucirc': 219,
+ 'Ugrave': 217,
+ 'Upsilon': 933,
+ 'Uuml': 220,
+ 'Xi': 926,
+ 'Yacute': 221,
+ 'Yuml': 376,
+ 'Zeta': 918,
+ 'aacute': 225,
+ 'acirc': 226,
+ 'acute': 180,
+ 'aelig': 230,
+ 'agrave': 224,
+ 'alefsym': 8501,
+ 'alpha': 945,
+ 'amp': 38,
+ 'and': 8743,
+ 'ang': 8736,
+ 'apos': 39,
+ 'aring': 229,
+ 'asymp': 8776,
+ 'atilde': 227,
+ 'auml': 228,
+ 'bdquo': 8222,
+ 'beta': 946,
+ 'brvbar': 166,
+ 'bull': 8226,
+ 'cap': 8745,
+ 'ccedil': 231,
+ 'cedil': 184,
+ 'cent': 162,
+ 'chi': 967,
+ 'circ': 710,
+ 'clubs': 9827,
+ 'cong': 8773,
+ 'copy': 169,
+ 'crarr': 8629,
+ 'cup': 8746,
+ 'curren': 164,
+ 'dArr': 8659,
+ 'dagger': 8224,
+ 'darr': 8595,
+ 'deg': 176,
+ 'delta': 948,
+ 'diams': 9830,
+ 'divide': 247,
+ 'eacute': 233,
+ 'ecirc': 234,
+ 'egrave': 232,
+ 'empty': 8709,
+ 'emsp': 8195,
+ 'ensp': 8194,
+ 'epsilon': 949,
+ 'equiv': 8801,
+ 'eta': 951,
+ 'eth': 240,
+ 'euml': 235,
+ 'euro': 8364,
+ 'exist': 8707,
+ 'fnof': 402,
+ 'forall': 8704,
+ 'frac12': 189,
+ 'frac14': 188,
+ 'frac34': 190,
+ 'frasl': 8260,
+ 'gamma': 947,
+ 'ge': 8805,
+ 'gt': 62,
+ 'hArr': 8660,
+ 'harr': 8596,
+ 'hearts': 9829,
+ 'hellip': 8230,
+ 'iacute': 237,
+ 'icirc': 238,
+ 'iexcl': 161,
+ 'igrave': 236,
+ 'image': 8465,
+ 'infin': 8734,
+ 'int': 8747,
+ 'iota': 953,
+ 'iquest': 191,
+ 'isin': 8712,
+ 'iuml': 239,
+ 'kappa': 954,
+ 'lArr': 8656,
+ 'lambda': 955,
+ 'lang': 9001,
+ 'laquo': 171,
+ 'larr': 8592,
+ 'lceil': 8968,
+ 'ldquo': 8220,
+ 'le': 8804,
+ 'lfloor': 8970,
+ 'lowast': 8727,
+ 'loz': 9674,
+ 'lrm': 8206,
+ 'lsaquo': 8249,
+ 'lsquo': 8216,
+ 'lt': 60,
+ 'macr': 175,
+ 'mdash': 8212,
+ 'micro': 181,
+ 'middot': 183,
+ 'minus': 8722,
+ 'mu': 956,
+ 'nabla': 8711,
+ 'nbsp': 160,
+ 'ndash': 8211,
+ 'ne': 8800,
+ 'ni': 8715,
+ 'not': 172,
+ 'notin': 8713,
+ 'nsub': 8836,
+ 'ntilde': 241,
+ 'nu': 957,
+ 'oacute': 243,
+ 'ocirc': 244,
+ 'oelig': 339,
+ 'ograve': 242,
+ 'oline': 8254,
+ 'omega': 969,
+ 'omicron': 959,
+ 'oplus': 8853,
+ 'or': 8744,
+ 'ordf': 170,
+ 'ordm': 186,
+ 'oslash': 248,
+ 'otilde': 245,
+ 'otimes': 8855,
+ 'ouml': 246,
+ 'para': 182,
+ 'part': 8706,
+ 'permil': 8240,
+ 'perp': 8869,
+ 'phi': 966,
+ 'pi': 960,
+ 'piv': 982,
+ 'plusmn': 177,
+ 'pound': 163,
+ 'prime': 8242,
+ 'prod': 8719,
+ 'prop': 8733,
+ 'psi': 968,
+ 'quot': 34,
+ 'rArr': 8658,
+ 'radic': 8730,
+ 'rang': 9002,
+ 'raquo': 187,
+ 'rarr': 8594,
+ 'rceil': 8969,
+ 'rdquo': 8221,
+ 'real': 8476,
+ 'reg': 174,
+ 'rfloor': 8971,
+ 'rho': 961,
+ 'rlm': 8207,
+ 'rsaquo': 8250,
+ 'rsquo': 8217,
+ 'sbquo': 8218,
+ 'scaron': 353,
+ 'sdot': 8901,
+ 'sect': 167,
+ 'shy': 173,
+ 'sigma': 963,
+ 'sigmaf': 962,
+ 'sim': 8764,
+ 'spades': 9824,
+ 'sub': 8834,
+ 'sube': 8838,
+ 'sum': 8721,
+ 'sup': 8835,
+ 'sup1': 185,
+ 'sup2': 178,
+ 'sup3': 179,
+ 'supe': 8839,
+ 'szlig': 223,
+ 'tau': 964,
+ 'there4': 8756,
+ 'theta': 952,
+ 'thetasym': 977,
+ 'thinsp': 8201,
+ 'thorn': 254,
+ 'tilde': 732,
+ 'times': 215,
+ 'trade': 8482,
+ 'uArr': 8657,
+ 'uacute': 250,
+ 'uarr': 8593,
+ 'ucirc': 251,
+ 'ugrave': 249,
+ 'uml': 168,
+ 'upsih': 978,
+ 'upsilon': 965,
+ 'uuml': 252,
+ 'weierp': 8472,
+ 'xi': 958,
+ 'yacute': 253,
+ 'yen': 165,
+ 'yuml': 255,
+ 'zeta': 950,
+ 'zwj': 8205,
+ 'zwnj': 8204
+}
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/markupsafe/_constants.pyc b/Assignments/microblog/flask/lib/python2.7/site-packages/markupsafe/_constants.pyc
new file mode 100644
index 0000000..196dbb6
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/markupsafe/_constants.pyc differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/markupsafe/_native.py b/Assignments/microblog/flask/lib/python2.7/site-packages/markupsafe/_native.py
new file mode 100644
index 0000000..5e83f10
--- /dev/null
+++ b/Assignments/microblog/flask/lib/python2.7/site-packages/markupsafe/_native.py
@@ -0,0 +1,46 @@
+# -*- coding: utf-8 -*-
+"""
+ markupsafe._native
+ ~~~~~~~~~~~~~~~~~~
+
+ Native Python implementation the C module is not compiled.
+
+ :copyright: (c) 2010 by Armin Ronacher.
+ :license: BSD, see LICENSE for more details.
+"""
+from markupsafe import Markup
+from markupsafe._compat import text_type
+
+
+def escape(s):
+ """Convert the characters &, <, >, ' and " in string s to HTML-safe
+ sequences. Use this if you need to display text that might contain
+ such characters in HTML. Marks return value as markup string.
+ """
+ if hasattr(s, '__html__'):
+ return s.__html__()
+ return Markup(text_type(s)
+ .replace('&', '&')
+ .replace('>', '>')
+ .replace('<', '<')
+ .replace("'", ''')
+ .replace('"', '"')
+ )
+
+
+def escape_silent(s):
+ """Like :func:`escape` but converts `None` into an empty
+ markup string.
+ """
+ if s is None:
+ return Markup()
+ return escape(s)
+
+
+def soft_unicode(s):
+ """Make a string unicode if it isn't already. That way a markup
+ string is not converted back to unicode.
+ """
+ if not isinstance(s, text_type):
+ s = text_type(s)
+ return s
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/markupsafe/_native.pyc b/Assignments/microblog/flask/lib/python2.7/site-packages/markupsafe/_native.pyc
new file mode 100644
index 0000000..efbab6b
Binary files /dev/null and b/Assignments/microblog/flask/lib/python2.7/site-packages/markupsafe/_native.pyc differ
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/markupsafe/_speedups.c b/Assignments/microblog/flask/lib/python2.7/site-packages/markupsafe/_speedups.c
new file mode 100644
index 0000000..f349feb
--- /dev/null
+++ b/Assignments/microblog/flask/lib/python2.7/site-packages/markupsafe/_speedups.c
@@ -0,0 +1,239 @@
+/**
+ * markupsafe._speedups
+ * ~~~~~~~~~~~~~~~~~~~~
+ *
+ * This module implements functions for automatic escaping in C for better
+ * performance.
+ *
+ * :copyright: (c) 2010 by Armin Ronacher.
+ * :license: BSD.
+ */
+
+#include
+
+#define ESCAPED_CHARS_TABLE_SIZE 63
+#define UNICHR(x) (PyUnicode_AS_UNICODE((PyUnicodeObject*)PyUnicode_DecodeASCII(x, strlen(x), NULL)));
+
+#if PY_VERSION_HEX < 0x02050000 && !defined(PY_SSIZE_T_MIN)
+typedef int Py_ssize_t;
+#define PY_SSIZE_T_MAX INT_MAX
+#define PY_SSIZE_T_MIN INT_MIN
+#endif
+
+
+static PyObject* markup;
+static Py_ssize_t escaped_chars_delta_len[ESCAPED_CHARS_TABLE_SIZE];
+static Py_UNICODE *escaped_chars_repl[ESCAPED_CHARS_TABLE_SIZE];
+
+static int
+init_constants(void)
+{
+ PyObject *module;
+ /* happing of characters to replace */
+ escaped_chars_repl['"'] = UNICHR(""");
+ escaped_chars_repl['\''] = UNICHR("'");
+ escaped_chars_repl['&'] = UNICHR("&");
+ escaped_chars_repl['<'] = UNICHR("<");
+ escaped_chars_repl['>'] = UNICHR(">");
+
+ /* lengths of those characters when replaced - 1 */
+ memset(escaped_chars_delta_len, 0, sizeof (escaped_chars_delta_len));
+ escaped_chars_delta_len['"'] = escaped_chars_delta_len['\''] = \
+ escaped_chars_delta_len['&'] = 4;
+ escaped_chars_delta_len['<'] = escaped_chars_delta_len['>'] = 3;
+
+ /* import markup type so that we can mark the return value */
+ module = PyImport_ImportModule("markupsafe");
+ if (!module)
+ return 0;
+ markup = PyObject_GetAttrString(module, "Markup");
+ Py_DECREF(module);
+
+ return 1;
+}
+
+static PyObject*
+escape_unicode(PyUnicodeObject *in)
+{
+ PyUnicodeObject *out;
+ Py_UNICODE *inp = PyUnicode_AS_UNICODE(in);
+ const Py_UNICODE *inp_end = PyUnicode_AS_UNICODE(in) + PyUnicode_GET_SIZE(in);
+ Py_UNICODE *next_escp;
+ Py_UNICODE *outp;
+ Py_ssize_t delta=0, erepl=0, delta_len=0;
+
+ /* First we need to figure out how long the escaped string will be */
+ while (*(inp) || inp < inp_end) {
+ if (*inp < ESCAPED_CHARS_TABLE_SIZE) {
+ delta += escaped_chars_delta_len[*inp];
+ erepl += !!escaped_chars_delta_len[*inp];
+ }
+ ++inp;
+ }
+
+ /* Do we need to escape anything at all? */
+ if (!erepl) {
+ Py_INCREF(in);
+ return (PyObject*)in;
+ }
+
+ out = (PyUnicodeObject*)PyUnicode_FromUnicode(NULL, PyUnicode_GET_SIZE(in) + delta);
+ if (!out)
+ return NULL;
+
+ outp = PyUnicode_AS_UNICODE(out);
+ inp = PyUnicode_AS_UNICODE(in);
+ while (erepl-- > 0) {
+ /* look for the next substitution */
+ next_escp = inp;
+ while (next_escp < inp_end) {
+ if (*next_escp < ESCAPED_CHARS_TABLE_SIZE &&
+ (delta_len = escaped_chars_delta_len[*next_escp])) {
+ ++delta_len;
+ break;
+ }
+ ++next_escp;
+ }
+
+ if (next_escp > inp) {
+ /* copy unescaped chars between inp and next_escp */
+ Py_UNICODE_COPY(outp, inp, next_escp-inp);
+ outp += next_escp - inp;
+ }
+
+ /* escape 'next_escp' */
+ Py_UNICODE_COPY(outp, escaped_chars_repl[*next_escp], delta_len);
+ outp += delta_len;
+
+ inp = next_escp + 1;
+ }
+ if (inp < inp_end)
+ Py_UNICODE_COPY(outp, inp, PyUnicode_GET_SIZE(in) - (inp - PyUnicode_AS_UNICODE(in)));
+
+ return (PyObject*)out;
+}
+
+
+static PyObject*
+escape(PyObject *self, PyObject *text)
+{
+ PyObject *s = NULL, *rv = NULL, *html;
+
+ /* we don't have to escape integers, bools or floats */
+ if (PyLong_CheckExact(text) ||
+#if PY_MAJOR_VERSION < 3
+ PyInt_CheckExact(text) ||
+#endif
+ PyFloat_CheckExact(text) || PyBool_Check(text) ||
+ text == Py_None)
+ return PyObject_CallFunctionObjArgs(markup, text, NULL);
+
+ /* if the object has an __html__ method that performs the escaping */
+ html = PyObject_GetAttrString(text, "__html__");
+ if (html) {
+ rv = PyObject_CallObject(html, NULL);
+ Py_DECREF(html);
+ return rv;
+ }
+
+ /* otherwise make the object unicode if it isn't, then escape */
+ PyErr_Clear();
+ if (!PyUnicode_Check(text)) {
+#if PY_MAJOR_VERSION < 3
+ PyObject *unicode = PyObject_Unicode(text);
+#else
+ PyObject *unicode = PyObject_Str(text);
+#endif
+ if (!unicode)
+ return NULL;
+ s = escape_unicode((PyUnicodeObject*)unicode);
+ Py_DECREF(unicode);
+ }
+ else
+ s = escape_unicode((PyUnicodeObject*)text);
+
+ /* convert the unicode string into a markup object. */
+ rv = PyObject_CallFunctionObjArgs(markup, (PyObject*)s, NULL);
+ Py_DECREF(s);
+ return rv;
+}
+
+
+static PyObject*
+escape_silent(PyObject *self, PyObject *text)
+{
+ if (text != Py_None)
+ return escape(self, text);
+ return PyObject_CallFunctionObjArgs(markup, NULL);
+}
+
+
+static PyObject*
+soft_unicode(PyObject *self, PyObject *s)
+{
+ if (!PyUnicode_Check(s))
+#if PY_MAJOR_VERSION < 3
+ return PyObject_Unicode(s);
+#else
+ return PyObject_Str(s);
+#endif
+ Py_INCREF(s);
+ return s;
+}
+
+
+static PyMethodDef module_methods[] = {
+ {"escape", (PyCFunction)escape, METH_O,
+ "escape(s) -> markup\n\n"
+ "Convert the characters &, <, >, ', and \" in string s to HTML-safe\n"
+ "sequences. Use this if you need to display text that might contain\n"
+ "such characters in HTML. Marks return value as markup string."},
+ {"escape_silent", (PyCFunction)escape_silent, METH_O,
+ "escape_silent(s) -> markup\n\n"
+ "Like escape but converts None to an empty string."},
+ {"soft_unicode", (PyCFunction)soft_unicode, METH_O,
+ "soft_unicode(object) -> string\n\n"
+ "Make a string unicode if it isn't already. That way a markup\n"
+ "string is not converted back to unicode."},
+ {NULL, NULL, 0, NULL} /* Sentinel */
+};
+
+
+#if PY_MAJOR_VERSION < 3
+
+#ifndef PyMODINIT_FUNC /* declarations for DLL import/export */
+#define PyMODINIT_FUNC void
+#endif
+PyMODINIT_FUNC
+init_speedups(void)
+{
+ if (!init_constants())
+ return;
+
+ Py_InitModule3("markupsafe._speedups", module_methods, "");
+}
+
+#else /* Python 3.x module initialization */
+
+static struct PyModuleDef module_definition = {
+ PyModuleDef_HEAD_INIT,
+ "markupsafe._speedups",
+ NULL,
+ -1,
+ module_methods,
+ NULL,
+ NULL,
+ NULL,
+ NULL
+};
+
+PyMODINIT_FUNC
+PyInit__speedups(void)
+{
+ if (!init_constants())
+ return NULL;
+
+ return PyModule_Create(&module_definition);
+}
+
+#endif
diff --git a/Assignments/microblog/flask/lib/python2.7/site-packages/markupsafe/tests.py b/Assignments/microblog/flask/lib/python2.7/site-packages/markupsafe/tests.py
new file mode 100644
index 0000000..6369936
--- /dev/null
+++ b/Assignments/microblog/flask/lib/python2.7/site-packages/markupsafe/tests.py
@@ -0,0 +1,179 @@
+# -*- coding: utf-8 -*-
+import gc
+import sys
+import unittest
+from markupsafe import Markup, escape, escape_silent
+from markupsafe._compat import text_type
+
+
+class MarkupTestCase(unittest.TestCase):
+
+ def test_adding(self):
+ # adding two strings should escape the unsafe one
+ unsafe = ''
+ safe = Markup('username')
+ assert unsafe + safe == text_type(escape(unsafe)) + text_type(safe)
+
+ def test_string_interpolation(self):
+ # string interpolations are safe to use too
+ assert Markup('%s') % '' == \
+ '