Ubuntu 14.04 LTSでvenvを利用して速攻でPython3.4 + Nginx + uWSGI + FlaskなWebアプリケーション実行環境を作る 2014-04-20 | tags: python, flask, nginx, uwsgi, ubuntu, -- (permalink) Ubuntu 12.04でpyenvを利用して速攻でPython3.4 + Nginx + uWSGI + FlaskなWebアプリケーション実行環境を作る この14.04版ではpyenv依存をやめてvenvだけを使うようにしています。 登場人物 ぼく 去年まで女子校だった私立高校に通う普通の高校生。人間が嫌い。これ以降登場しない。 Ubuntu Linuxらしいが、よく知らない。 venv Pythonの実行環境を切り替えるやつ。標準でついてくるようになったらしいが、よく知らない。
When I was trying to implement Flask-Login into my first Flask application I had difficulty understanding from the flask-login docs how to implement the Authorization Tokens required to use the Remember Me feature. I found another flask plugin package called Flask-Security, which I used to base the below example off of. This example extends the basic example that the Flask-Login Documentation give
The Stormpath API shut down on August 17, 2017. Thank you to all the developers who have used Stormpath. This is the second post in a two-part series on Flask authentication. You should read the previous article, The Flask Authentication Problem, before continuing. Since I started working at Stormpath, I’ve been thinking about ways to help Flask developers build simpler, more secure Flask web appl
ISUCON の季節ですね。 ISUCON では慣習的に各言語で代表的なマイクロフレームワークが使われるのですが、 Python では今のところ Flask がずっと使われています。 Flask は確かに、簡単なサンプルアプリを書くときの見た目はマイクロフレームワークになっています。 しかし、構造的には沢山のフック、シグナルがあったりしていて、重量級の設計になっています。 Flask 本体と Werkzeug を合わせると数万行のサイズです。単なる Hello World アプリでも、数十の関数呼び出しが裏で動いています。 Bottle も、 Flask と同じくマルチスレッド対応で、スレッドローカルを使ったコンテキストスタックがある、拡張機能もあるフレームワークですが、構造は Flask よりも大分質素です。 ソースコードも1ファイル3000行代で、その分フレームワークのオーバーヘッドも
git clone https://github.com/mattupstate/flask-jwt.git ./flask-jwt pip install ./flask-jwt from flask import Flask from flask_jwt import JWT, jwt_required, current_identity from werkzeug.security import safe_str_cmp class User(object): def __init__(self, id, username, password): self.id = id self.username = username self.password = password def __str__(self): return "User(id='%s')" % self.id users
Even after deploying a number of Flask apps I always find myself googling up blog posts on how to get the trio of nginx, gunicorn and supervisor working together. Below is simple, straight, no-nonsense guide on how to deploy a flask app on a Linux server using Nginx, Gunicorn and Supervisor. A disclaimer: this guide will not tell you what these technologies are. Specifically, I will not talk about
Flask-Auth¶ Flask-Auth is a flask extension that offers database-agnostic (but still fairly plug-and-play) role-based user authentication. Sounds impressive, right? Features¶ Set of functions to assist in user session management (logging in and out, getting the current user, expiring sessions, encrypting passwords, etc). Base user class AuthUser that can be used with most ORM’s. Plug-and-play mode
Atom はまだいまいちだし、Sublime Text は使ってると金を要求してくるし、emacs はそろそろ引退かな。Markdown 書くのに Mou とかは便利だけど、長い文章を書いてるとだんだんもっさりしてくる。と、普段使いのテキストエディタをどれにすればいいかここのところずっと考えている。 それとは別に、保存したテキストファイルたちをどう管理すればいいかもよく考える。ファイル名を考えるのがめんどくさい。どこに保存したのか忘れる。ファイルツリーをたどるのがめんどくさい。⌘+s を押すのすらめんどくさい。正直エディタのほうでなんとかしてほしい。 Evernote とか便利だけど、勝手にフォーマットされて困る。コードとか貼付けられない。 というわけで少し前に自分用の Markdown エディタを作った。 tototoshi/gfm-editor 左側にエディタ、右側にリアルタイムプレビ
リリース、障害情報などのサービスのお知らせ
最新の人気エントリーの配信
処理を実行中です
j次のブックマーク
k前のブックマーク
lあとで読む
eコメント一覧を開く
oページを開く