Flask入门教程
替换为你的仓库名称。 提示 如果你使用 Python 2.7,那么需要使用 pip 来执行安装 Pipenv 的命令;打开 Python Shell 时使用 python 命令,而不是 python3。 提示 如果你在 GitHub 上的仓库类型为私有仓库,那么需要将 PythonAnywhere 服 务器的 SSH 密钥添加到 GitHub 账户中,具体参考第 1 章“设置 SSH 密钥”小节。 文件,并写入生产环境下需要设置的两个环境变 量。其中,密钥( SECRET_KEY )的值是随机字符串,我们可以使用 uuid 模块来 生成: 第 11 章:部署上线 119 $ python3 >>> import uuid >>> uuid.uuid4().hex '3d6f45a5fc12445dbac2f59c3b6c7cb1' 复制生成的随机字符备用,接着创建 .env0 码力 | 127 页 | 7.62 MB | 1 年前3Flask Documentation (1.1.x)
environment Create a project folder and a venv folder within: $ mkdir myproject $ cd myproject $ python3 -m venv venv On Windows: $ py -3 -m venv venv If you needed to install virtualenv because you python] Deploying Flask on Google App Engine [https://cloud.google.com/appengine/docs/standard/python3/runtime] Deploying Flask on AWS Elastic Beanstalk [https://docs.aws.amazon.com/elasticbeanstalk --virtualenv /path/to/virtual/environment. You might also need to add --plugin python or --plugin python3 depending on which python version you use for your project. Configuring nginx A basic flask nginx0 码力 | 428 页 | 895.98 KB | 1 年前3Flask-RESTful Documentation Release 0.3.10
= parser.parse_args() Note The default argument type is a unicode string. This will be str in python3 and unicode in python2. If you specify the help value, it will be rendered as the error message0 码力 | 42 页 | 84.60 KB | 1 年前3Flask-RESTful Documentation Release 0.3.10
= parser.parse_args() Note: The default argument type is a unicode string. This will be str in python3 and unicode in python2. If you specify the help value, it will be rendered as the error message0 码力 | 39 页 | 212.29 KB | 1 年前3Flask Documentation (1.1.x)
environment Create a project folder and a venv folder within: $ mkdir myproject $ cd myproject $ python3 -m venv venv On Windows: $ py -3 -m venv venv If you needed to install virtualenv because you --virtualenv /path/to/virtual/environment. You might also need to add --plugin python or --plugin python3 depending on which python version you use for your project. Configuring nginx A basic flask nginx git remote add pallets https://github.com/pallets/flask git fetch pallets • Create a virtualenv: python3 -m venv env . env/bin/activate # or "env\Scripts\activate" on Windows • Install Flask in editable0 码力 | 291 页 | 1.25 MB | 1 年前3Flask-RESTful Documentation Release 0.3.6
= parser.parse_args() Note: The default argument type is a unicode string. This will be str in python3 and unicode in python2. If you specify the help value, it will be rendered as the error message0 码力 | 46 页 | 245.60 KB | 1 年前3Flask-RESTful Documentation Release 0.3.6
= parser.parse_args() Note The default argument type is a unicode string. This will be str in python3 and unicode in python2. If you specify the help value, it will be rendered as the error message0 码力 | 49 页 | 91.90 KB | 1 年前3Flask-RESTful Documentation Release 0.3.7
= parser.parse_args() Note: The default argument type is a unicode string. This will be str in python3 and unicode in python2. If you specify the help value, it will be rendered as the error message0 码力 | 50 页 | 253.09 KB | 1 年前3Flask-RESTful Documentation Release 0.3.8
= parser.parse_args() Note: The default argument type is a unicode string. This will be str in python3 and unicode in python2. If you specify the help value, it will be rendered as the error message0 码力 | 50 页 | 253.64 KB | 1 年前3Flask-RESTful Documentation Release 0.3.8
= parser.parse_args() Note The default argument type is a unicode string. This will be str in python3 and unicode in python2. If you specify the help value, it will be rendered as the error message0 码力 | 55 页 | 93.30 KB | 1 年前3
共 11 条
- 1
- 2