pax_global_header00006660000000000000000000000064146202335620014515gustar00rootroot0000000000000052 comment=417976c47ed49f3be40114c95bce7747c349d7ee aiohttp-mako-1.0.0/000077500000000000000000000000001462023356200141105ustar00rootroot00000000000000aiohttp-mako-1.0.0/.gitignore000066400000000000000000000012731462023356200161030ustar00rootroot00000000000000># Byte-compiled / optimized / DLL files __pycache__/ *.py[cod] # C extensions *.so # Distribution / packaging .Python env/ build/ develop-eggs/ dist/ downloads/ eggs/ lib/ lib64/ parts/ sdist/ var/ *.egg-info/ .installed.cfg *.egg # PyInstaller # Usually these files are written by a python script from a template # before PyInstaller builds the exe, so as to inject date/other infos into it. *.manifest *.spec # Installer logs pip-log.txt pip-delete-this-directory.txt # Unit test / coverage reports htmlcov/ .tox/ .coverage .cache nosetests.xml coverage.xml cover # Translations *.mo *.pot # Django stuff: *.log # Sphinx documentation docs/_build/ # PyBuilder target/ # PyCharm .idea aiohttp-mako-1.0.0/.pyup.yml000066400000000000000000000001231462023356200157020ustar00rootroot00000000000000# Label PRs with `deps-update` label label_prs: deps-update schedule: every month aiohttp-mako-1.0.0/.travis.yml000066400000000000000000000025411462023356200162230ustar00rootroot00000000000000language: python python: - 3.5 - 3.6 - 3.7 dist: xenial install: - pip install --upgrade setuptools - pip install codecov - pip install -r requirements-dev.txt - python setup.py develop script: make cov after_success: codecov jobs: include: - stage: deploy if: tag IS present python: 3.7 script: skip after_success: [] deploy: provider: pypi user: aio-libs-bot password: # Encrypted with `travis encrypt -r aio-libs/aiohttp-mako --api-endpoint 'https://api.travis-ci.com/'`: secure: "Z1RiKRyiQTeOsf6tW9znK7Lbv4YJCGf+EzYr1F2EpTi6CpLM8/G23z+r8Q79gAsQaJhFX4/nk5xauHpS7hwlpPYzO/0wo1fhoTgqi92wtzgON8YK1C6ttuC49tytcN4lMN07rismN8l96WX9rJIOGZyrX15HjqljaHt91W56A1JMCkQsNsUKFO08sYU0Gf5YYDQzS88gwziBSyR4BxCTDOUIv2GKNUFXCr4nHTp1HR2grUVrpFwTksu2y5sGFEB27ugymksN8LjYrWcM9JLFUfj1MI19ww6wSlTzU8KvTjOPxYxKhM7Jyw1jIzwKtOXz4Mf3Q5buncgAJarkaDogztEx6UFMQ6R4vepnzdN7QyGGNU0bBMZ+oJvdIsAmeR+AMznrNYExytBAhsEFATjE+0ox8x+FydwNyypH9eWh/fEFNSaXU0TCRzkLd3nwtqq5TpUF4BkCUoxzAH/cOUFYJC9arAStaeQmTHtCgHOkPSUBh/vOMGM7LoAkdUoN1VO2jTiHydR3gMj23pA7pscnJmakiLtiYiXfLY3TPrcZ5l8cb3kX7OdpDteHJBdpIv0wbIi06VoG5/dad85W84pkf6fk1ykaLEzAOtz5JDQXM+tBfztyI9RSqJK+GmjvCnxGZKXe4hEnY52S16BkfvSliEWvUKJdROxZAbwqQNLxtBQ=" distributions: "sdist bdist_wheel" on: tags: true all_branches: true aiohttp-mako-1.0.0/CHANGES.txt000066400000000000000000000005441462023356200157240ustar00rootroot00000000000000CHANGES ======= 1.0.0 (2019-09-08) ^^^^^^^^^^^^^^^^^^ * Drop ``@coroutine`` syntax * Drop Python 3.4 0.2.0 (2016-12-14) ^^^^^^^^^^^^^^^^^^ * Add context processors #16 0.1.0 (2016-11-12) ^^^^^^^^^^^^^^^^^^ * Drop python 3.3 support * Add python 3.5 support * Move tests from nose to py.test 0.0.1 (2015-05-08) ^^^^^^^^^^^^^^^^^^ * Initial release. aiohttp-mako-1.0.0/LICENSE000066400000000000000000000261071462023356200151230ustar00rootroot00000000000000Apache License Version 2.0, January 2004 http://www.apache.org/licenses/ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 1. Definitions. "License" shall mean the terms and conditions for use, reproduction, and distribution as defined by Sections 1 through 9 of this document. "Licensor" shall mean the copyright owner or entity authorized by the copyright owner that is granting the License. "Legal Entity" shall mean the union of the acting entity and all other entities that control, are controlled by, or are under common control with that entity. For the purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity. "You" (or "Your") shall mean an individual or Legal Entity exercising permissions granted by this License. "Source" form shall mean the preferred form for making modifications, including but not limited to software source code, documentation source, and configuration files. "Object" form shall mean any form resulting from mechanical transformation or translation of a Source form, including but not limited to compiled object code, generated documentation, and conversions to other media types. "Work" shall mean the work of authorship, whether in Source or Object form, made available under the License, as indicated by a copyright notice that is included in or attached to the work (an example is provided in the Appendix below). "Derivative Works" shall mean any work, whether in Source or Object form, that is based on (or derived from) the Work and for which the editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship. For the purposes of this License, Derivative Works shall not include works that remain separable from, or merely link (or bind by name) to the interfaces of, the Work and Derivative Works thereof. "Contribution" shall mean any work of authorship, including the original version of the Work and any modifications or additions to that Work or Derivative Works thereof, that is intentionally submitted to Licensor for inclusion in the Work by the copyright owner or by an individual or Legal Entity authorized to submit on behalf of the copyright owner. For the purposes of this definition, "submitted" means any form of electronic, verbal, or written communication sent to the Licensor or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, the Licensor for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by the copyright owner as "Not a Contribution." "Contributor" shall mean Licensor and any individual or Legal Entity on behalf of whom a Contribution has been received by Licensor and subsequently incorporated within the Work. 2. Grant of Copyright License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, sublicense, and distribute the Work and such Derivative Works in Source or Object form. 3. Grant of Patent License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this section) patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer the Work, where such license applies only to those patent claims licensable by such Contributor that are necessarily infringed by their Contribution(s) alone or by combination of their Contribution(s) with the Work to which such Contribution(s) was submitted. If You institute patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Work or a Contribution incorporated within the Work constitutes direct or contributory patent infringement, then any patent licenses granted to You under this License for that Work shall terminate as of the date such litigation is filed. 4. Redistribution. You may reproduce and distribute copies of the Work or Derivative Works thereof in any medium, with or without modifications, and in Source or Object form, provided that You meet the following conditions: (a) You must give any other recipients of the Work or Derivative Works a copy of this License; and (b) You must cause any modified files to carry prominent notices stating that You changed the files; and (c) You must retain, in the Source form of any Derivative Works that You distribute, all copyright, patent, trademark, and attribution notices from the Source form of the Work, excluding those notices that do not pertain to any part of the Derivative Works; and (d) If the Work includes a "NOTICE" text file as part of its distribution, then any Derivative Works that You distribute must include a readable copy of the attribution notices contained within such NOTICE file, excluding those notices that do not pertain to any part of the Derivative Works, in at least one of the following places: within a NOTICE text file distributed as part of the Derivative Works; within the Source form or documentation, if provided along with the Derivative Works; or, within a display generated by the Derivative Works, if and wherever such third-party notices normally appear. The contents of the NOTICE file are for informational purposes only and do not modify the License. You may add Your own attribution notices within Derivative Works that You distribute, alongside or as an addendum to the NOTICE text from the Work, provided that such additional attribution notices cannot be construed as modifying the License. You may add Your own copyright statement to Your modifications and may provide additional or different license terms and conditions for use, reproduction, or distribution of Your modifications, or for any such Derivative Works as a whole, provided Your use, reproduction, and distribution of the Work otherwise complies with the conditions stated in this License. 5. Submission of Contributions. Unless You explicitly state otherwise, any Contribution intentionally submitted for inclusion in the Work by You to the Licensor shall be under the terms and conditions of this License, without any additional terms or conditions. Notwithstanding the above, nothing herein shall supersede or modify the terms of any separate license agreement you may have executed with Licensor regarding such Contributions. 6. Trademarks. This License does not grant permission to use the trade names, trademarks, service marks, or product names of the Licensor, except as required for reasonable and customary use in describing the origin of the Work and reproducing the content of the NOTICE file. 7. Disclaimer of Warranty. Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness of using or redistributing the Work and assume any risks associated with Your exercise of permissions under this License. 8. Limitation of Liability. In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall any Contributor be liable to You for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this License or out of the use or inability to use the Work (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if such Contributor has been advised of the possibility of such damages. 9. Accepting Warranty or Additional Liability. While redistributing the Work or Derivative Works thereof, You may choose to offer, and charge a fee for, acceptance of support, warranty, indemnity, or other liability obligations and/or rights consistent with this License. However, in accepting such obligations, You may act only on Your own behalf and on Your sole responsibility, not on behalf of any other Contributor, and only if You agree to indemnify, defend, and hold each Contributor harmless for any liability incurred by, or claims asserted against, such Contributor by reason of your accepting any such warranty or additional liability. END OF TERMS AND CONDITIONS APPENDIX: How to apply the Apache License to your work. To apply the Apache License to your work, attach the following boilerplate notice, with the fields enclosed by brackets "{}" replaced with your own identifying information. (Don't include the brackets!) The text should be enclosed in the appropriate comment syntax for the file format. We also recommend that a file or class name and description of purpose be included on the same "printed page" as the copyright notice for easier identification within third-party archives. Copyright 2015-2018 Nikolay Novik and aio-libs team. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. aiohttp-mako-1.0.0/MANIFEST.in000066400000000000000000000001451462023356200156460ustar00rootroot00000000000000include LICENSE include CHANGES.txt include README.rst graft aiohttp_mako global-exclude *.pyc *.swp aiohttp-mako-1.0.0/Makefile000066400000000000000000000015501462023356200155510ustar00rootroot00000000000000# Some simple testing tasks (sorry, UNIX only). flake: pep8 aiohttp_mako tests pyflakes aiohttp_mako tests/test_simple_renderer.py test: flake py.test -s -v ./tests/ vtest: py.test -s -v ./tests/ cov cover coverage: flake py.test -s -v --cov-report term --cov-report html --cov aiohttp_mako ./tests @echo "open file://`pwd`/htmlcov/index.html" clean: rm -rf `find . -name __pycache__` rm -f `find . -type f -name '*.py[co]' ` rm -f `find . -type f -name '*~' ` rm -f `find . -type f -name '.*~' ` rm -f `find . -type f -name '@*' ` rm -f `find . -type f -name '#*#' ` rm -f `find . -type f -name '*.orig' ` rm -f `find . -type f -name '*.rej' ` rm -f .coverage rm -rf coverage rm -rf build rm -rf cover doc: make -C docs html @echo "open file://`pwd`/docs/_build/html/index.html" .PHONY: all build venv flake test vtest testloop cov clean doc aiohttp-mako-1.0.0/README.rst000066400000000000000000000040031462023356200155740ustar00rootroot00000000000000aiohttp_mako ============ .. image:: https://travis-ci.com/aio-libs/aiohttp-mako.svg?branch=master :target: https://travis-ci.com/aio-libs/aiohttp-mako .. image:: https://codecov.io/gh/aio-libs/aiohttp-mako/branch/master/graph/badge.svg :target: https://codecov.io/gh/aio-libs/aiohttp-mako .. image:: https://img.shields.io/pypi/v/aiohttp-mako.svg :target: https://pypi.python.org/pypi/aiohttp-mako .. image:: https://badges.gitter.im/Join%20Chat.svg :target: https://gitter.im/aio-libs/Lobby :alt: Chat on Gitter mako_ template renderer for `aiohttp.web`__ based on aiohttp_jinja2_. Library has almost same api and support python 3.5 (PEP492_) syntax. It is used in aiohttp_debugtoolbar_. __ aiohttp_web_ Example ------- .. code:: python import asyncio import aiohttp_mako from aiohttp import web @aiohttp_mako.template('index.html') async def func(request): return {'head': 'aiohttp_mako', 'text': 'Hello World!'} async def init(loop): app = web.Application(loop=loop) lookup = aiohttp_mako.setup(app, input_encoding='utf-8', output_encoding='utf-8', default_filters=['decode.utf8']) template = """

${head}

${text}""" lookup.put_string('index.html', template) app.router.add_route('GET', '/', func) return app loop = asyncio.get_event_loop() app = loop.run_until_complete(init(loop)) web.run_app(app, host='127.0.0.1', port=9000) License ------- ``aiohttp_mako`` is offered under the Apache 2 license. .. _mako: http://www.makotemplates.org/ .. _aiohttp_jinja2: https://github.com/aio-libs/aiohttp_jinja2 .. _aiohttp_web: http://aiohttp.readthedocs.org/en/latest/web.html .. _html_error_template: http://docs.makotemplates.org/en/latest/usage.html#mako.exceptions.html_error_template .. _aiohttp_debugtoolbar: https://github.com/aio-libs/aiohttp_debugtoolbar .. _PEP492: https://www.python.org/dev/peps/pep-0492/ aiohttp-mako-1.0.0/aiohttp_mako/000077500000000000000000000000001462023356200165675ustar00rootroot00000000000000aiohttp-mako-1.0.0/aiohttp_mako/__init__.py000066400000000000000000000063211462023356200207020ustar00rootroot00000000000000import functools import sys from collections.abc import Mapping from aiohttp import web from mako.lookup import TemplateLookup from mako.exceptions import TemplateLookupException, text_error_template __version__ = '0.4.0' __all__ = ('setup', 'get_lookup', 'render_template', 'template', 'render_string') APP_KEY = 'aiohttp_mako_lookup' APP_CONTEXT_PROCESSORS_KEY = 'aiohttp_mako_context_processors' REQUEST_CONTEXT_KEY = 'aiohttp_mako_context' def setup(app, *args, app_key=APP_KEY, context_processors=(), **kwargs): app[app_key] = TemplateLookup(*args, **kwargs) if context_processors: app[APP_CONTEXT_PROCESSORS_KEY] = context_processors app.middlewares.append(context_processors_middleware) return app[app_key] def get_lookup(app, *, app_key=APP_KEY): return app.get(app_key) def render_string(template_name, request, context, *, app_key): lookup = request.app.get(app_key) if lookup is None: raise web.HTTPInternalServerError( text=("Template engine is not initialized, " "call aiohttp_mako.setup(app_key={}) first" "".format(app_key))) try: template = lookup.get_template(template_name) except TemplateLookupException as e: raise web.HTTPInternalServerError( text="Template '{}' not found".format(template_name)) from e if not isinstance(context, Mapping): raise web.HTTPInternalServerError( text="context should be mapping, not {}".format(type(context))) if request.get(REQUEST_CONTEXT_KEY): context = dict(request[REQUEST_CONTEXT_KEY], **context) try: text = template.render_unicode(**context) except Exception: # pragma: no cover exc_info = sys.exc_info() errtext = text_error_template().render( error=exc_info[1], traceback=exc_info[2]) exc = MakoRenderingException(errtext).with_traceback(exc_info[2]) raise exc return text def render_template(template_name, request, context, *, app_key=APP_KEY, encoding='utf-8'): response = web.Response() text = render_string(template_name, request, context, app_key=app_key) response.content_type = 'text/html' response.charset = encoding response.text = text return response def template(template_name, *, app_key=APP_KEY, encoding='utf-8', status=200): def wrapper(func): @functools.wraps(func) async def wrapped(*args): context = await func(*args) request = args[-1] response = render_template(template_name, request, context, app_key=app_key, encoding=encoding) response.set_status(status) return response return wrapped return wrapper class MakoRenderingException(Exception): """Mako rendering exceptions with error """ @web.middleware async def context_processors_middleware(request, handler): request[REQUEST_CONTEXT_KEY] = {} for processor in request.app[APP_CONTEXT_PROCESSORS_KEY]: request[REQUEST_CONTEXT_KEY].update(await processor(request)) return await handler(request) async def request_processor(request): return {'request': request} aiohttp-mako-1.0.0/docs/000077500000000000000000000000001462023356200150405ustar00rootroot00000000000000aiohttp-mako-1.0.0/docs/Makefile000066400000000000000000000152121462023356200165010ustar00rootroot00000000000000# Makefile for Sphinx documentation # # You can set these variables from the command line. SPHINXOPTS = SPHINXBUILD = sphinx-build PAPER = BUILDDIR = _build # User-friendly check for sphinx-build ifeq ($(shell which $(SPHINXBUILD) >/dev/null 2>&1; echo $$?), 1) $(error The '$(SPHINXBUILD)' command was not found. Make sure you have Sphinx installed, then set the SPHINXBUILD environment variable to point to the full path of the '$(SPHINXBUILD)' executable. Alternatively you can add the directory with the executable to your PATH. If you don't have Sphinx installed, grab it from http://sphinx-doc.org/) endif # Internal variables. PAPEROPT_a4 = -D latex_paper_size=a4 PAPEROPT_letter = -D latex_paper_size=letter ALLSPHINXOPTS = -d $(BUILDDIR)/doctrees $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) . # the i18n builder cannot share the environment and doctrees with the others I18NSPHINXOPTS = $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) . .PHONY: help clean html dirhtml singlehtml pickle json htmlhelp qthelp devhelp epub latex latexpdf text man changes linkcheck doctest gettext help: @echo "Please use \`make ' where is one of" @echo " html to make standalone HTML files" @echo " dirhtml to make HTML files named index.html in directories" @echo " singlehtml to make a single large HTML file" @echo " pickle to make pickle files" @echo " json to make JSON files" @echo " htmlhelp to make HTML files and a HTML help project" @echo " qthelp to make HTML files and a qthelp project" @echo " devhelp to make HTML files and a Devhelp project" @echo " epub to make an epub" @echo " latex to make LaTeX files, you can set PAPER=a4 or PAPER=letter" @echo " latexpdf to make LaTeX files and run them through pdflatex" @echo " latexpdfja to make LaTeX files and run them through platex/dvipdfmx" @echo " text to make text files" @echo " man to make manual pages" @echo " texinfo to make Texinfo files" @echo " info to make Texinfo files and run them through makeinfo" @echo " gettext to make PO message catalogs" @echo " changes to make an overview of all changed/added/deprecated items" @echo " xml to make Docutils-native XML files" @echo " pseudoxml to make pseudoxml-XML files for display purposes" @echo " linkcheck to check all external links for integrity" @echo " doctest to run all doctests embedded in the documentation (if enabled)" clean: rm -rf $(BUILDDIR)/* html: $(SPHINXBUILD) -b html $(ALLSPHINXOPTS) $(BUILDDIR)/html @echo @echo "Build finished. The HTML pages are in $(BUILDDIR)/html." dirhtml: $(SPHINXBUILD) -b dirhtml $(ALLSPHINXOPTS) $(BUILDDIR)/dirhtml @echo @echo "Build finished. The HTML pages are in $(BUILDDIR)/dirhtml." singlehtml: $(SPHINXBUILD) -b singlehtml $(ALLSPHINXOPTS) $(BUILDDIR)/singlehtml @echo @echo "Build finished. The HTML page is in $(BUILDDIR)/singlehtml." pickle: $(SPHINXBUILD) -b pickle $(ALLSPHINXOPTS) $(BUILDDIR)/pickle @echo @echo "Build finished; now you can process the pickle files." json: $(SPHINXBUILD) -b json $(ALLSPHINXOPTS) $(BUILDDIR)/json @echo @echo "Build finished; now you can process the JSON files." htmlhelp: $(SPHINXBUILD) -b htmlhelp $(ALLSPHINXOPTS) $(BUILDDIR)/htmlhelp @echo @echo "Build finished; now you can run HTML Help Workshop with the" \ ".hhp project file in $(BUILDDIR)/htmlhelp." qthelp: $(SPHINXBUILD) -b qthelp $(ALLSPHINXOPTS) $(BUILDDIR)/qthelp @echo @echo "Build finished; now you can run "qcollectiongenerator" with the" \ ".qhcp project file in $(BUILDDIR)/qthelp, like this:" @echo "# qcollectiongenerator $(BUILDDIR)/qthelp/aiohttp_jinja2.qhcp" @echo "To view the help file:" @echo "# assistant -collectionFile $(BUILDDIR)/qthelp/aiohttp_jinja2.qhc" devhelp: $(SPHINXBUILD) -b devhelp $(ALLSPHINXOPTS) $(BUILDDIR)/devhelp @echo @echo "Build finished." @echo "To view the help file:" @echo "# mkdir -p $$HOME/.local/share/devhelp/aiohttp_jinja2" @echo "# ln -s $(BUILDDIR)/devhelp $$HOME/.local/share/devhelp/aiohttp_jinja2" @echo "# devhelp" epub: $(SPHINXBUILD) -b epub $(ALLSPHINXOPTS) $(BUILDDIR)/epub @echo @echo "Build finished. The epub file is in $(BUILDDIR)/epub." latex: $(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex @echo @echo "Build finished; the LaTeX files are in $(BUILDDIR)/latex." @echo "Run \`make' in that directory to run these through (pdf)latex" \ "(use \`make latexpdf' here to do that automatically)." latexpdf: $(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex @echo "Running LaTeX files through pdflatex..." $(MAKE) -C $(BUILDDIR)/latex all-pdf @echo "pdflatex finished; the PDF files are in $(BUILDDIR)/latex." latexpdfja: $(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex @echo "Running LaTeX files through platex and dvipdfmx..." $(MAKE) -C $(BUILDDIR)/latex all-pdf-ja @echo "pdflatex finished; the PDF files are in $(BUILDDIR)/latex." text: $(SPHINXBUILD) -b text $(ALLSPHINXOPTS) $(BUILDDIR)/text @echo @echo "Build finished. The text files are in $(BUILDDIR)/text." man: $(SPHINXBUILD) -b man $(ALLSPHINXOPTS) $(BUILDDIR)/man @echo @echo "Build finished. The manual pages are in $(BUILDDIR)/man." texinfo: $(SPHINXBUILD) -b texinfo $(ALLSPHINXOPTS) $(BUILDDIR)/texinfo @echo @echo "Build finished. The Texinfo files are in $(BUILDDIR)/texinfo." @echo "Run \`make' in that directory to run these through makeinfo" \ "(use \`make info' here to do that automatically)." info: $(SPHINXBUILD) -b texinfo $(ALLSPHINXOPTS) $(BUILDDIR)/texinfo @echo "Running Texinfo files through makeinfo..." make -C $(BUILDDIR)/texinfo info @echo "makeinfo finished; the Info files are in $(BUILDDIR)/texinfo." gettext: $(SPHINXBUILD) -b gettext $(I18NSPHINXOPTS) $(BUILDDIR)/locale @echo @echo "Build finished. The message catalogs are in $(BUILDDIR)/locale." changes: $(SPHINXBUILD) -b changes $(ALLSPHINXOPTS) $(BUILDDIR)/changes @echo @echo "The overview file is in $(BUILDDIR)/changes." linkcheck: $(SPHINXBUILD) -b linkcheck $(ALLSPHINXOPTS) $(BUILDDIR)/linkcheck @echo @echo "Link check complete; look for any errors in the above output " \ "or in $(BUILDDIR)/linkcheck/output.txt." doctest: $(SPHINXBUILD) -b doctest $(ALLSPHINXOPTS) $(BUILDDIR)/doctest @echo "Testing of doctests in the sources finished, look at the " \ "results in $(BUILDDIR)/doctest/output.txt." xml: $(SPHINXBUILD) -b xml $(ALLSPHINXOPTS) $(BUILDDIR)/xml @echo @echo "Build finished. The XML files are in $(BUILDDIR)/xml." pseudoxml: $(SPHINXBUILD) -b pseudoxml $(ALLSPHINXOPTS) $(BUILDDIR)/pseudoxml @echo @echo "Build finished. The pseudo-XML files are in $(BUILDDIR)/pseudoxml." aiohttp-mako-1.0.0/docs/_static/000077500000000000000000000000001462023356200164665ustar00rootroot00000000000000aiohttp-mako-1.0.0/docs/_static/aiohttp-icon-128x128.png000066400000000000000000001533251462023356200225360ustar00rootroot00000000000000PNG  IHDR*gAMA a cHRMz&u0`:pQ<bKGD X pHYsHHFk>IDATxuײ.jd|-  ,AA xH  !ø~ݫ~MBdsϽ^/n p‰(TRUT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vhn4M M M1)M_i\1W{{{^kW)u[XXnǃL L L 4 4 44 B:VF+m6h-mLm6S7JD*=JOKsi.O~C?+H_/p#阌ɘov.ʾ}>kXVqUܺf]-͖fKsl&f}>b--ůJkrqqg3ZUVU+u:JQJYztJtGh} y xx3xF }>i7ϛ 1٘lLί5ov;]]jw*UJVohk5F?c1R,ʧWq%S? uNp@2[fly2^~%_nv7mm}>o k"f5YVGcC:x 0[UTD5JU*uԝn-UPN:/żq9.x ί&}O~H1?+AbEݢnQO|u:_tU*JJ%%VUbs92]L D@l[VJ]+ePeuna9c9A<.[V8'ʆT"|p_-{K +$I' *ʛy3opp='b.dFazZO]zQ/%9b8)NsRD!EHEEQQ4JU(!J"M4~x*GSt oMh;N oVlTLTŽ\6ï6^kx\"%W xS|}c'q'q n-x 17p7 psQ,ųMi7(D!JJTjR[jKmE7Mt+XPjSO_pjߍ؝/8WFeTlͷg$ߖo˷;α}>k#p\f.35͚fMq8_ai@ B)R(R**8%P%PP_L,£#D%tEXtdate:create2018-10-06T17:06:56+00:003Z%tEXtdate:modify2018-10-06T17:06:56+00:00B?GtEXtsvg:base-urifile:///home/andrew/projects/aiohttp/docs/aiohttp-icon.svg!hIENDB`aiohttp-mako-1.0.0/docs/aiohttp-icon.ico000066400000000000000000000062761462023356200201450ustar00rootroot00000000000000  ( @vsIGXGSA\UGE^JN_lJG[V_U>:EBTDUgofU98yxPI@ALXAUol>@@oMHC84TaHVkoBNHNvZHA>?[fLS]\ORLRp[NSUIoN7CVbufSJ;YQKah__T5HaXk[]mS^B{Jkg_~=<^Y>NhBLQXNVeH>GOHcOXQMH_DAKtjdH^I67>45QiZP>I\7>63JgUY=j`b[dR@gvcGOcHKC8WTakLf_\seID86?CAUsSNn}phJfl\dkUnuD=53LKHRh}al[]hUkvDOHBBDIIFFKRtvMNDv.>vzHLW\>CD09Dp__bbaalmM@:WOB9=]ej[GE=27obb``_^]MrHDI4ZrdSJ?92=drB;gBCA=Q`@=ADFEQTDgNNACYO>AEXpX7=?Hj}?aiohttp-mako-1.0.0/docs/conf.py000066400000000000000000000235101462023356200163400ustar00rootroot00000000000000#!/usr/bin/env python3 # -*- coding: utf-8 -*- # # aiohttp_mako documentation build configuration file, created by # sphinx-quickstart on Sun Mar 22 12:04:15 2015. # # This file is execfile()d with the current directory set to its # containing dir. # # Note that not all possible configuration values are present in this # autogenerated file. # # All configuration values have a default; values that are commented out # serve to show the default. import sys import os import codecs import re _docs_path = os.path.dirname(__file__) _version_path = os.path.abspath(os.path.join(_docs_path, '..', 'aiohttp_mako', '__init__.py')) with codecs.open(_version_path, 'r', 'latin1') as fp: try: _version_info = re.search(r"^__version__ = '" r"(?P\d+)" r"\.(?P\d+)" r"\.(?P\d+)" r"(?P.*)?'$", fp.read(), re.M).groupdict() except IndexError: raise RuntimeError('Unable to determine version.') # If extensions (or modules to document with autodoc) are in another directory, # add these directories to sys.path here. If the directory is relative to the # documentation root, use os.path.abspath to make it absolute, like shown here. sys.path.insert(0, os.path.abspath('..')) import alabaster # -- General configuration ------------------------------------------------ # If your documentation needs a minimal Sphinx version, state it here. needs_sphinx = '1.3' # Add any Sphinx extension module names here, as strings. They can be # extensions coming with Sphinx (named 'sphinx.ext.*') or your custom # ones. extensions = [ 'sphinx.ext.intersphinx', 'sphinx.ext.viewcode', 'alabaster', ] # Add any paths that contain templates here, relative to this directory. templates_path = ['_templates'] # The suffix of source filenames. source_suffix = '.rst' # The encoding of source files. # source_encoding = 'utf-8-sig' # The master toctree document. master_doc = 'index' # General information about the project. project = 'aiohttp_mako' copyright = '2015, Nikolay Novik and aio-libs team' # The version info for the project you're documenting, acts as replacement for # |version| and |release|, also used in various other places throughout the # built documents. # # The short X.Y version. version = '{major}.{minor}'.format(**_version_info) # The full version, including alpha/beta/rc tags. release = '{major}.{minor}.{patch}-{tag}'.format(**_version_info) # The language for content autogenerated by Sphinx. Refer to documentation # for a list of supported languages. # language = None # There are two options for replacing |today|: either, you set today to some # non-false value, then it is used: # today = '' # Else, today_fmt is used as the format for a strftime call. # today_fmt = '%B %d, %Y' # List of patterns, relative to source directory, that match files and # directories to ignore when looking for source files. exclude_patterns = ['_build'] # The reST default role (used for this markup: `text`) to use for all # documents. # default_role = None # If true, '()' will be appended to :func: etc. cross-reference text. # add_function_parentheses = True # If true, the current module name will be prepended to all description # unit titles (such as .. function::). # add_module_names = True # If true, sectionauthor and moduleauthor directives will be shown in the # output. They are ignored by default. # show_authors = False # The name of the Pygments (syntax highlighting) style to use. pygments_style = 'sphinx' # A list of ignored prefixes for module index sorting. # modindex_common_prefix = [] # If true, keep warnings as "system message" paragraphs in the built documents. # keep_warnings = False # -- Options for HTML output ---------------------------------------------- # The theme to use for HTML and HTML Help pages. See the documentation for # a list of builtin themes. html_theme = 'alabaster' # Theme options are theme-specific and customize the look and feel of a theme # further. For a list of options available for each theme, see the # documentation. html_theme_options = { 'logo': 'aiohttp-icon-128x128.png', 'description': 'jinja2 template renderer for aiohttp.web', 'github_user': 'aio-libs', 'github_repo': 'aiohttp_mako', 'github_button': True, 'github_banner': True, 'travis_button': True, 'pre_bg': '#FFF6E5', 'note_bg': '#E5ECD1', 'note_border': '#BFCF8C', 'body_text': '#482C0A', 'sidebar_text': '#49443E', 'sidebar_header': '#4B4032', } # Add any paths that contain custom themes here, relative to this directory. html_theme_path = [alabaster.get_path()] # The name for this set of Sphinx documents. If None, it defaults to # " v documentation". # html_title = None # A shorter title for the navigation bar. Default is the same as html_title. # html_short_title = None # The name of an image file (relative to this directory) to place at the top # of the sidebar. # html_logo = None # The name of an image file (within the static path) to use as favicon of the # docs. This file should be a Windows icon file (.ico) being 16x16 or 32x32 # pixels large. html_favicon = 'aiohttp-icon.ico' # Add any paths that contain custom static files (such as style sheets) here, # relative to this directory. They are copied after the builtin static files, # so a file named "default.css" will overwrite the builtin "default.css". html_static_path = ['_static'] # Add any extra paths that contain custom files (such as robots.txt or # .htaccess) here, relative to this directory. These files are copied # directly to the root of the documentation. # html_extra_path = [] # If not '', a 'Last updated on:' timestamp is inserted at every page bottom, # using the given strftime format. # html_last_updated_fmt = '%b %d, %Y' # If true, SmartyPants will be used to convert quotes and dashes to # typographically correct entities. # html_use_smartypants = True # Custom sidebar templates, maps document names to template names. html_sidebars = { '**': [ 'about.html', 'navigation.html', 'searchbox.html', ] } # Additional templates that should be rendered to pages, maps page names to # template names. # html_additional_pages = {} # If false, no module index is generated. # html_domain_indices = True # If false, no index is generated. # html_use_index = True # If true, the index is split into individual pages for each letter. # html_split_index = False # If true, links to the reST sources are added to the pages. # html_show_sourcelink = True # If true, "Created using Sphinx" is shown in the HTML footer. Default is True. # html_show_sphinx = True # If true, "(C) Copyright ..." is shown in the HTML footer. Default is True. # html_show_copyright = True # If true, an OpenSearch description file will be output, and all pages will # contain a tag referring to it. The value of this option must be the # base URL from which the finished HTML is served. # html_use_opensearch = '' # This is the file name suffix for HTML files (e.g. ".xhtml"). # html_file_suffix = None # Output file base name for HTML help builder. htmlhelp_basename = 'aiohttp_makodoc' # -- Options for LaTeX output --------------------------------------------- # The paper size ('letterpaper' or 'a4paper'). # 'papersize': 'letterpaper', # The font size ('10pt', '11pt' or '12pt'). # 'pointsize': '10pt', # Additional stuff for the LaTeX preamble. # 'preamble': '', latex_elements = { } # Grouping the document tree into LaTeX files. List of tuples # (source start file, target name, title, # author, documentclass [howto, manual, or own class]). latex_documents = [ ('index', 'aiohttp_jinja2.tex', 'aiohttp\\_jinja2 Documentation', 'Andrew Svetlov', 'manual'), ] # The name of an image file (relative to this directory) to place at the top of # the title page. # latex_logo = None # For "manual" documents, if this is true, then toplevel headings are parts, # not chapters. # latex_use_parts = False # If true, show page references after internal links. # latex_show_pagerefs = False # If true, show URL addresses after external links. # latex_show_urls = False # Documents to append as an appendix to all manuals. # latex_appendices = [] # If false, no module index is generated. # latex_domain_indices = True # -- Options for manual page output --------------------------------------- # One entry per manual page. List of tuples # (source start file, name, description, authors, manual section). man_pages = [ ('index', 'aiohttp_jinja2', 'aiohttp_jinja2 Documentation', ['Andrew Svetlov'], 1) ] # If true, show URL addresses after external links. # man_show_urls = False # -- Options for Texinfo output ------------------------------------------- # Grouping the document tree into Texinfo files. List of tuples # (source start file, target name, title, author, # dir menu entry, description, category) texinfo_documents = [ ('index', 'aiohttp_jinja2', 'aiohttp_jinja2 Documentation', 'Andrew Svetlov', 'aiohttp_jinja2', 'One line description of project.', 'Miscellaneous'), ] # Documents to append as an appendix to all manuals. # texinfo_appendices = [] # If false, no module index is generated. # texinfo_domain_indices = True # How to display URL addresses: 'footnote', 'no', or 'inline'. # texinfo_show_urls = 'footnote' # If true, do not generate a @detailmenu in the "Top" node's menu. # texinfo_no_detailmenu = False # Example configuration for intersphinx: refer to the Python standard library. intersphinx_mapping = {'http://docs.python.org/3': None, 'http://aiohttp.readthedocs.org/en/stable': None, 'http://jinja2.pocoo.org/docs/dev': None} aiohttp-mako-1.0.0/docs/index.rst000066400000000000000000000137771462023356200167200ustar00rootroot00000000000000.. aiohttp_mako documentation master file, created by sphinx-quickstart on Sun Mar 22 12:04:15 2015. You can adapt this file completely to your liking, but it should at least contain the root `toctree` directive. aiohttp_mako ============ mako_ template renderer for `aiohttp.web`__. `aiohttp_mako` based on :term:`aiohttp_jinja2`. Library has almost same api and it is used in aiohttp_debugtoolbar_. .. _mako: http://www.makotemplates.org/ .. _aiohttp_debugtoolbar: https://github.com/aio-libs/aiohttp_debugtoolbar .. _aiohttp_web: http://aiohttp.readthedocs.org/en/latest/web.html __ aiohttp_web_ Usage ----- Before template rendering you have to setup *mako* templates location first:: app = web.Application(loop=loop) lookup = aiohttp_mako.setup(app, input_encoding='utf-8', output_encoding='utf-8', default_filters=['decode.utf8']) After that you may to use template engine in your *web-handlers*. The most convinient way is to decorate *web-handler*:: @aiohttp_mako.template('tmpl.html') async def handler(request): return {'head': 'aiohttp_mako', 'text': 'Hello World!'} On handler call the ``aiohttp_mako.template`` decorator will pass returned dictionary ``{'head': 'aiohttp_mako', 'text': 'Hello World!'}`` into template named ``"tmpl.html"`` for getting resulting HTML text. If you need more complex processing (set response headers for example) you may call ``render_template`` function:: async def handler(request): context = {'head': 'aiohttp_mako', 'text': 'Hello World!'} response = aiohttp_mako.render_template('tmpl.html', request, context) response.headers['Content-Language'] = 'ru' return response .. _aiohttp_mako-reference: Context processors ~~~~~~~~~~~~~~~~~~ Context processors is a way to add some variables to each template context. It calculates variables on each request. Context processors is following last-win strategy. Therefore a context processor could rewrite variables delivered with previous one. In order to use context processors create required processors:: async def foo_processor(request): return {'foo': 'bar'} And pass them into :func:`setup`:: aiohttp_mako.setup( app, context_processors=[foo_processor, aiohttp_mako.request_processor], loader=loader) As you can see, there is a built-in :func:`request_processor`, which adds current :class:`aiohttp.web.Request` into context of templates under ``'request'`` name. Example ------- :: import asyncio import aiohttp_mako from aiohttp import web @aiohttp_mako.template('index.html') def func(request): return {'head': 'aiohttp_mako', 'text': 'Hello World!'} async def init(loop): app = web.Application(loop=loop) lookup = aiohttp_mako.setup(app, input_encoding='utf-8', output_encoding='utf-8', default_filters=['decode.utf8']) template = """

${head}

${text}""" lookup.put_string('index.html', template) app.router.add_route('GET', '/', func) handler = app.make_handler() srv = await loop.create_server(handler, '127.0.0.1', 8080) print("Server started at http://127.0.0.1:8080") return srv, handler loop = asyncio.get_event_loop() srv, handler = loop.run_until_complete(init(loop)) try: loop.run_forever() except KeyboardInterrupt: loop.run_until_complete(handler.finish_connections()) Reference --------- .. highlight:: python .. module:: aiohttp_mako .. currentmodule:: aiohttp_mako .. data:: APP_KEY The key name in :class:`aiohttp.web.Application` dictionary, ``'aiohttp_mako_environment'`` for storing :term:`mako` template lookup object (:class:`mako.lookup.TemplateLookup`). Usually you don't need to operate with *application* manually, left it to :mod:`aiohttp_mako` functions. .. function:: get_lookup(app, app_key=APP_KEY) Get from `aiohttp` application instance :class:`mako.lookup.TemplateLookup` object :param app: (:class:`aiohttp.web.Application` instance). :param app_key: is an optional key for application dict, :const:`APP_KEY` by default. :returns: :class:`mako.lookup.TemplateLookup` object which has stored in the :class:`aiohttp.web.Application` .. function:: render_template(template_name, request, context, *, \ app_key=APP_KEY) Return :class:`aiohttp.web.Response` which contains template *template_name* filled with *context*. :param template_name: name of template plus relative path. :param request: :class:`aiohttp.web.Request` object :param context: dictionary object required to render current template :param app_key: is an optional key for application dict, :const:`APP_KEY` by default. .. function:: setup(app, *args, app_key=APP_KEY, **kwargs) Return :class:`mako.lookup.TemplateLookup` instance, which contains collections of templates. :param app: (:class:`aiohttp.web.Application` instance). :param app_key: is an optional key for application dict, :const:`APP_KEY` by default. License ------- ``aiohttp_mako`` is offered under the Apache 2 license. Glossary -------- .. if you add new entries, keep the alphabetical sorting! .. glossary:: aiohttp_jinja2 `jinja2` template renderer for `aiohttp.web`. See https://github.com/aio-libs/aiohttp_jinja2/ jinja2 A modern and designer-friendly templating language for Python. See http://jinja.pocoo.org/ mako Mako is a template library written in Python. It provides a familiar, non-XML syntax which compiles into Python modules for maximum performance. See http://www.makotemplates.org/ Indices and tables ================== * :ref:`genindex` * :ref:`search` aiohttp-mako-1.0.0/docs/make.bat000066400000000000000000000150751462023356200164550ustar00rootroot00000000000000@ECHO OFF REM Command file for Sphinx documentation if "%SPHINXBUILD%" == "" ( set SPHINXBUILD=sphinx-build ) set BUILDDIR=_build set ALLSPHINXOPTS=-d %BUILDDIR%/doctrees %SPHINXOPTS% . set I18NSPHINXOPTS=%SPHINXOPTS% . if NOT "%PAPER%" == "" ( set ALLSPHINXOPTS=-D latex_paper_size=%PAPER% %ALLSPHINXOPTS% set I18NSPHINXOPTS=-D latex_paper_size=%PAPER% %I18NSPHINXOPTS% ) if "%1" == "" goto help if "%1" == "help" ( :help echo.Please use `make ^` where ^ is one of echo. html to make standalone HTML files echo. dirhtml to make HTML files named index.html in directories echo. singlehtml to make a single large HTML file echo. pickle to make pickle files echo. json to make JSON files echo. htmlhelp to make HTML files and a HTML help project echo. qthelp to make HTML files and a qthelp project echo. devhelp to make HTML files and a Devhelp project echo. epub to make an epub echo. latex to make LaTeX files, you can set PAPER=a4 or PAPER=letter echo. text to make text files echo. man to make manual pages echo. texinfo to make Texinfo files echo. gettext to make PO message catalogs echo. changes to make an overview over all changed/added/deprecated items echo. xml to make Docutils-native XML files echo. pseudoxml to make pseudoxml-XML files for display purposes echo. linkcheck to check all external links for integrity echo. doctest to run all doctests embedded in the documentation if enabled goto end ) if "%1" == "clean" ( for /d %%i in (%BUILDDIR%\*) do rmdir /q /s %%i del /q /s %BUILDDIR%\* goto end ) %SPHINXBUILD% 2> nul if errorlevel 9009 ( echo. echo.The 'sphinx-build' command was not found. Make sure you have Sphinx echo.installed, then set the SPHINXBUILD environment variable to point echo.to the full path of the 'sphinx-build' executable. Alternatively you echo.may add the Sphinx directory to PATH. echo. echo.If you don't have Sphinx installed, grab it from echo.http://sphinx-doc.org/ exit /b 1 ) if "%1" == "html" ( %SPHINXBUILD% -b html %ALLSPHINXOPTS% %BUILDDIR%/html if errorlevel 1 exit /b 1 echo. echo.Build finished. The HTML pages are in %BUILDDIR%/html. goto end ) if "%1" == "dirhtml" ( %SPHINXBUILD% -b dirhtml %ALLSPHINXOPTS% %BUILDDIR%/dirhtml if errorlevel 1 exit /b 1 echo. echo.Build finished. The HTML pages are in %BUILDDIR%/dirhtml. goto end ) if "%1" == "singlehtml" ( %SPHINXBUILD% -b singlehtml %ALLSPHINXOPTS% %BUILDDIR%/singlehtml if errorlevel 1 exit /b 1 echo. echo.Build finished. The HTML pages are in %BUILDDIR%/singlehtml. goto end ) if "%1" == "pickle" ( %SPHINXBUILD% -b pickle %ALLSPHINXOPTS% %BUILDDIR%/pickle if errorlevel 1 exit /b 1 echo. echo.Build finished; now you can process the pickle files. goto end ) if "%1" == "json" ( %SPHINXBUILD% -b json %ALLSPHINXOPTS% %BUILDDIR%/json if errorlevel 1 exit /b 1 echo. echo.Build finished; now you can process the JSON files. goto end ) if "%1" == "htmlhelp" ( %SPHINXBUILD% -b htmlhelp %ALLSPHINXOPTS% %BUILDDIR%/htmlhelp if errorlevel 1 exit /b 1 echo. echo.Build finished; now you can run HTML Help Workshop with the ^ .hhp project file in %BUILDDIR%/htmlhelp. goto end ) if "%1" == "qthelp" ( %SPHINXBUILD% -b qthelp %ALLSPHINXOPTS% %BUILDDIR%/qthelp if errorlevel 1 exit /b 1 echo. echo.Build finished; now you can run "qcollectiongenerator" with the ^ .qhcp project file in %BUILDDIR%/qthelp, like this: echo.^> qcollectiongenerator %BUILDDIR%\qthelp\aiohttp_jinja2.qhcp echo.To view the help file: echo.^> assistant -collectionFile %BUILDDIR%\qthelp\aiohttp_jinja2.ghc goto end ) if "%1" == "devhelp" ( %SPHINXBUILD% -b devhelp %ALLSPHINXOPTS% %BUILDDIR%/devhelp if errorlevel 1 exit /b 1 echo. echo.Build finished. goto end ) if "%1" == "epub" ( %SPHINXBUILD% -b epub %ALLSPHINXOPTS% %BUILDDIR%/epub if errorlevel 1 exit /b 1 echo. echo.Build finished. The epub file is in %BUILDDIR%/epub. goto end ) if "%1" == "latex" ( %SPHINXBUILD% -b latex %ALLSPHINXOPTS% %BUILDDIR%/latex if errorlevel 1 exit /b 1 echo. echo.Build finished; the LaTeX files are in %BUILDDIR%/latex. goto end ) if "%1" == "latexpdf" ( %SPHINXBUILD% -b latex %ALLSPHINXOPTS% %BUILDDIR%/latex cd %BUILDDIR%/latex make all-pdf cd %BUILDDIR%/.. echo. echo.Build finished; the PDF files are in %BUILDDIR%/latex. goto end ) if "%1" == "latexpdfja" ( %SPHINXBUILD% -b latex %ALLSPHINXOPTS% %BUILDDIR%/latex cd %BUILDDIR%/latex make all-pdf-ja cd %BUILDDIR%/.. echo. echo.Build finished; the PDF files are in %BUILDDIR%/latex. goto end ) if "%1" == "text" ( %SPHINXBUILD% -b text %ALLSPHINXOPTS% %BUILDDIR%/text if errorlevel 1 exit /b 1 echo. echo.Build finished. The text files are in %BUILDDIR%/text. goto end ) if "%1" == "man" ( %SPHINXBUILD% -b man %ALLSPHINXOPTS% %BUILDDIR%/man if errorlevel 1 exit /b 1 echo. echo.Build finished. The manual pages are in %BUILDDIR%/man. goto end ) if "%1" == "texinfo" ( %SPHINXBUILD% -b texinfo %ALLSPHINXOPTS% %BUILDDIR%/texinfo if errorlevel 1 exit /b 1 echo. echo.Build finished. The Texinfo files are in %BUILDDIR%/texinfo. goto end ) if "%1" == "gettext" ( %SPHINXBUILD% -b gettext %I18NSPHINXOPTS% %BUILDDIR%/locale if errorlevel 1 exit /b 1 echo. echo.Build finished. The message catalogs are in %BUILDDIR%/locale. goto end ) if "%1" == "changes" ( %SPHINXBUILD% -b changes %ALLSPHINXOPTS% %BUILDDIR%/changes if errorlevel 1 exit /b 1 echo. echo.The overview file is in %BUILDDIR%/changes. goto end ) if "%1" == "linkcheck" ( %SPHINXBUILD% -b linkcheck %ALLSPHINXOPTS% %BUILDDIR%/linkcheck if errorlevel 1 exit /b 1 echo. echo.Link check complete; look for any errors in the above output ^ or in %BUILDDIR%/linkcheck/output.txt. goto end ) if "%1" == "doctest" ( %SPHINXBUILD% -b doctest %ALLSPHINXOPTS% %BUILDDIR%/doctest if errorlevel 1 exit /b 1 echo. echo.Testing of doctests in the sources finished, look at the ^ results in %BUILDDIR%/doctest/output.txt. goto end ) if "%1" == "xml" ( %SPHINXBUILD% -b xml %ALLSPHINXOPTS% %BUILDDIR%/xml if errorlevel 1 exit /b 1 echo. echo.Build finished. The XML files are in %BUILDDIR%/xml. goto end ) if "%1" == "pseudoxml" ( %SPHINXBUILD% -b pseudoxml %ALLSPHINXOPTS% %BUILDDIR%/pseudoxml if errorlevel 1 exit /b 1 echo. echo.Build finished. The pseudo-XML files are in %BUILDDIR%/pseudoxml. goto end ) :end aiohttp-mako-1.0.0/examples/000077500000000000000000000000001462023356200157265ustar00rootroot00000000000000aiohttp-mako-1.0.0/examples/simple.py000066400000000000000000000013231462023356200175700ustar00rootroot00000000000000import asyncio import aiohttp_mako from aiohttp import web @aiohttp_mako.template('index.html') async def func(request): return {'head': 'aiohttp_mako', 'text': 'Hello World!'} async def init(loop): app = web.Application(loop=loop) lookup = aiohttp_mako.setup(app, input_encoding='utf-8', output_encoding='utf-8', default_filters=['decode.utf8']) template = """

${head}

${text}""" lookup.put_string('index.html', template) app.router.add_route('GET', '/', func) return app loop = asyncio.get_event_loop() app = loop.run_until_complete(init(loop)) web.run_app(app, host='127.0.0.1', port=9000) aiohttp-mako-1.0.0/requirements-dev.txt000066400000000000000000000002411462023356200201450ustar00rootroot00000000000000ipdb==0.12 coverage==4.5.3 pytest==4.5.0 pytest-cov==2.7.1 pep8==1.7.1 pyflakes==2.1.1 aiohttp==3.5.4 pytest-aiohttp==0.3.0 pytest-sugar==0.9.2 yarl==1.3.0 -e . aiohttp-mako-1.0.0/setup.cfg000066400000000000000000000000431462023356200157260ustar00rootroot00000000000000[tool:pytest] filterwarnings=error aiohttp-mako-1.0.0/setup.py000066400000000000000000000031431462023356200156230ustar00rootroot00000000000000import codecs from setuptools import setup, find_packages import os import re import sys if sys.version_info < (3, 5, 3): raise RuntimeError("aiohttp 3.x requires Python 3.5.3+") with codecs.open(os.path.join(os.path.abspath(os.path.dirname( __file__)), 'aiohttp_mako', '__init__.py'), 'r', 'latin1') as fp: try: version = re.findall(r"^__version__ = '([^']+)'$", fp.read(), re.M)[0] except IndexError: raise RuntimeError('Unable to determine version.') def read(f): return open(os.path.join(os.path.dirname(__file__), f)).read().strip() install_requires = ['aiohttp>=3.0', 'mako>=1.0.0'] setup(name='aiohttp-mako', version=version, description=("mako template renderer for aiohttp.web " "(http server for asyncio)"), lond_description='\n\n'.join((read('README.rst'), read('CHANGES.txt'))), classifiers=[ 'License :: OSI Approved :: Apache Software License', 'Intended Audience :: Developers', 'Programming Language :: Python', 'Programming Language :: Python :: 3', 'Programming Language :: Python :: 3.5', 'Programming Language :: Python :: 3.6', 'Programming Language :: Python :: 3.7', 'Topic :: Internet :: WWW/HTTP', 'Framework :: AsyncIO', ], author='Nikolay Novik', author_email='nickolainovik@gmail.com', url='https://github.com/aio-libs/aiohttp-mako/', license='Apache 2', packages=find_packages(), python_requires='>=3.5.3', install_requires=install_requires, include_package_data=True) aiohttp-mako-1.0.0/tests/000077500000000000000000000000001462023356200152525ustar00rootroot00000000000000aiohttp-mako-1.0.0/tests/conftest.py000066400000000000000000000006571462023356200174610ustar00rootroot00000000000000import sys import pytest import aiohttp_mako from aiohttp import web @pytest.fixture def app(): app = web.Application() lookup = aiohttp_mako.setup(app, input_encoding='utf-8', output_encoding='utf-8', default_filters=['decode.utf8']) tplt = "

${head}

${text}" lookup.put_string('tplt.html', tplt) return app aiohttp-mako-1.0.0/tests/test_context_processors.py000066400000000000000000000055021462023356200226330ustar00rootroot00000000000000from aiohttp import web import aiohttp_mako def create_app(context_processors): app = web.Application() lookup = aiohttp_mako.setup(app, input_encoding='utf-8', output_encoding='utf-8', default_filters=['decode.utf8'], context_processors=context_processors) tplt = "

${head}

${text}" lookup.put_string('tplt.html', tplt) return app async def test_simple(aiohttp_client): async def context_processor(request): return {'text': request.path} app = create_app([context_processor]) @aiohttp_mako.template('tplt.html') async def func(request): return {'head': 'HEAD'} app.router.add_route('GET', '/', func) client = await aiohttp_client(app) resp = await client.get('/') assert 200 == resp.status txt = await resp.text() assert '

HEAD

/' == txt async def test_overwrite(aiohttp_client): async def context_processor1(request): return {'head': 'HEAD', 'text': 'foo'} async def context_processor2(request): return {'text': 'bar'} app = create_app([context_processor1, context_processor2]) @aiohttp_mako.template('tplt.html') async def func(request): return {} app.router.add_route('GET', '/', func) client = await aiohttp_client(app) resp = await client.get('/') assert 200 == resp.status txt = await resp.text() assert '

HEAD

bar' == txt async def test_overwrite_primary_context(aiohttp_client): async def context_processor(request): return {'text': 'foo'} app = create_app([context_processor]) @aiohttp_mako.template('tplt.html') async def func(request): return {'head': 'HEAD', 'text': 'text'} app.router.add_route('GET', '/', func) client = await aiohttp_client(app) resp = await client.get('/') assert 200 == resp.status txt = await resp.text() assert '

HEAD

text' == txt async def test_request_processor(aiohttp_client): app = web.Application() lookup = aiohttp_mako.setup( app, input_encoding='utf-8', output_encoding='utf-8', default_filters=['decode.utf8'], context_processors=[aiohttp_mako.request_processor] ) tplt = "

${head}

path=${request.path}" lookup.put_string('tplt.html', tplt) @aiohttp_mako.template('tplt.html') async def func(request): return {'head': 'HEAD'} app.router.add_route('GET', '/', func) client = await aiohttp_client(app) resp = await client.get('/') assert 200 == resp.status txt = await resp.text() assert '

HEAD

path=/' == txt aiohttp-mako-1.0.0/tests/test_simple_renderer.py000066400000000000000000000070141462023356200220440ustar00rootroot00000000000000import pytest from aiohttp import web from aiohttp.test_utils import make_mocked_request from mako.lookup import TemplateLookup import aiohttp_mako async def test_func(app, aiohttp_client): @aiohttp_mako.template('tplt.html') async def func(request): return {'head': 'HEAD', 'text': 'text'} app.router.add_route('GET', '/', func) client = await aiohttp_client(app) resp = await client.get('/') assert 200 == resp.status txt = await resp.text() assert '

HEAD

text' == txt async def test_meth(app, aiohttp_client): class Handler: @aiohttp_mako.template('tplt.html') async def meth(self, request): return {'head': 'HEAD', 'text': 'text'} handler = Handler() app.router.add_route('GET', '/', handler.meth) client = await aiohttp_client(app) resp = await client.get('/') txt = await resp.text() assert '

HEAD

text' == txt assert 200 == resp.status async def test_render_template(app, aiohttp_client): async def func(request): return aiohttp_mako.render_template('tplt.html', request, {'head': 'HEAD', 'text': 'text'}) app.router.add_route('GET', '/', func) client = await aiohttp_client(app) resp = await client.get('/') assert 200 == resp.status txt = await resp.text() assert '

HEAD

text' == txt async def test_render_not_initialized(): async def func(request): return aiohttp_mako.render_template('template', request, {}) app = web.Application() app.router.add_route('GET', '/', func) req = make_mocked_request('GET', '/', app=app) with pytest.raises(web.HTTPInternalServerError) as ctx: await func(req) assert "Template engine is not initialized, " \ "call aiohttp_mako.setup(app_key={}) first" \ "".format(aiohttp_mako.APP_KEY) == ctx.value.text async def test_template_not_found(): app = web.Application() aiohttp_mako.setup(app, input_encoding='utf-8', output_encoding='utf-8', default_filters=['decode.utf8']) req = make_mocked_request('GET', '/', app=app) with pytest.raises(web.HTTPInternalServerError) as ctx: aiohttp_mako.render_template('template', req, {}) assert "Template 'template' not found" == ctx.value.text async def test_template_not_mapping(): @aiohttp_mako.template('tmpl.html') async def func(request): return 'data' app = web.Application() lookup = aiohttp_mako.setup(app, input_encoding='utf-8', output_encoding='utf-8', default_filters=['decode.utf8']) tplt = "

${head}

${text}" lookup.put_string('tmpl.html', tplt) app.router.add_route('GET', '/', func) req = make_mocked_request('GET', '/', app=app) with pytest.raises(web.HTTPInternalServerError) as ctx: await func(req) assert "context should be mapping, not" \ " " == ctx.value.text async def test_get_env(): app = web.Application() lookup1 = aiohttp_mako.setup(app, input_encoding='utf-8', output_encoding='utf-8', default_filters=['decode.utf8']) lookup2 = aiohttp_mako.get_lookup(app) assert lookup1 is lookup2 assert isinstance(lookup2, TemplateLookup)