DEVGRU

プログラミングと競馬予想について書きます

cookiecutter を使ってPyramidのプロジェクトをテンプレートから作成する

Pyramid 使いたいんですが、最近cookiecutterの記事(参考)がはてブに上がったりしていたので、 Pyramidのものがないか探したらありました。

https://github.com/Pylons/pyramid-cookiecutter-starter

あとは、書いてあるとおりにコマンドを打つと作れると思います。

こんな感じ。

$ cookiecutter gh:Pylons/pyramid-cookiecutter-starter
project_name [Pyramid Scaffold]: my-dictionary
repo_name [my_dictionary]: 
Select template_language:
1 - jinja2
2 - chameleon
3 - mako
Choose from 1, 2, 3 [1]: 3

===============================================================================
Documentation: https://docs.pylonsproject.org/projects/pyramid/en/latest/
Tutorials:     https://docs.pylonsproject.org/projects/pyramid_tutorials/en/latest/
Twitter:       https://twitter.com/PylonsProject
Mailing List:  https://groups.google.com/forum/#!forum/pylons-discuss
Welcome to Pyramid.  Sorry for the convenience.
===============================================================================

Change directory into your newly created project.
    cd my_dictionary

Create a Python virtual environment.
    python3 -m venv env

Upgrade packaging tools.
    env/bin/pip install --upgrade pip setuptools

Install the project in editable mode with its testing requirements.
    env/bin/pip install -e ".[testing]"

Run your project's tests.
    env/bin/pytest

Run your project.
    env/bin/pserve development.ini

参考:

qiita.com

blog.amedama.jp

wonderwall.hatenablog.com


退屈なことはPythonにやらせよう ―ノンプログラマーにもできる自動化処理プログラミング

退屈なことはPythonにやらせよう ―ノンプログラマーにもできる自動化処理プログラミング

詳細!Python 3 入門ノート

詳細!Python 3 入門ノート

入門 Python 3

入門 Python 3