This is a tools for init flask restful api project, this can save your time.
Project description
Installing
Install and update using pip:
pip install -U rflask
A Simple Example
$ rflask init
project_name: [flask-restful-api-20200125-090404]
author: [Deacon]
author_email: [deacon@example.com]
description: [Flask restful api project.]
...
...
Create file /Users/donghp/Downloads/Git_doc/PythonProject/init-flask-restful-api/flask-restful-api-20200125-090404/supervisord_example.conf
Done.
Project dir tree:
.
├── applications
│ ├── test
│ │ ├── README.rst
│ │ ├── __init__.py
│ │ ├── models.py
│ │ ├── urls.py
│ │ └── views.py
│ ├── user
│ │ ├── README.rst
│ │ ├── __init__.py
│ │ ├── models.py
│ │ └── views.py
│ └── __init__.py
├── enums
│ └── __init__.py
├── exceptions
│ ├── __init__.py
│ └── project_excepions.py
├── flask_ext
│ ├── __init__.py
│ └── logger.py
├── logs
├── requirements
│ ├── dev.txt
│ └── prod.txt
├── scripts
│ └── __init__.py
│ └── commands.py
├── utils
│ └── __init__.py
├── Dockerfile
├── LICENSE
├── Pipfile
├── README.rst
├── __init__.py
├── app.py
├── autoapp.py
├── compat.py
├── database.py
├── docker-compose.yml
├── extensions.py
├── gunicorn.conf.py
├── gunicorn_example.conf.py
├── settings.py
├── setup.py
├── supervisord.conf
└── supervisord_example.conf
Then, you can do like this:
$ cd your_project
$ pip install pipenv
$ pipenv install --dev
$ pipenv run python app.py
* Serving Flask app "autoapp" (lazy loading)
* Environment: dev
* Debug mode: on
2020-01-23 13:03:24,151 [4554636736:MainThread] [_internal.py:_internal:_log] [INFO]: * Running on http://127.0.0.1:5000/ (Press CTRL+C to quit)
2020-01-23 13:03:24,152 [4554636736:MainThread] [_internal.py:_internal:_log] [INFO]: * Restarting with stat
2020-01-23 13:03:24,600 [4616764864:MainThread] [_internal.py:_internal:_log] [WARNING]: * Debugger is active!
2020-01-23 13:03:24,604 [4616764864:MainThread] [_internal.py:_internal:_log] [INFO]: * Debugger PIN: 186-303-110
Deploy to docker
In your project root dir, open the terminal:
$ git clone ***.git
$ cd <your_project>
$ docker-compose up
Links
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
rflask-1.0.10.tar.gz
(14.6 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file rflask-1.0.10.tar.gz.
File metadata
- Download URL: rflask-1.0.10.tar.gz
- Upload date:
- Size: 14.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/45.1.0 requests-toolbelt/0.9.1 tqdm/4.42.0 CPython/3.7.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e31f90e1c2ad98cdf4a4c5dd2d59036e9cfe7e3fda22da0aac6965e4b70f3634
|
|
| MD5 |
cba4a01b3d70749e326e12baf3bcb636
|
|
| BLAKE2b-256 |
79f1b4f3c37c8945d50a33ed2fbcf66c67d105d27c835aba8a1bff73504f0488
|
File details
Details for the file rflask-1.0.10-py2.py3-none-any.whl.
File metadata
- Download URL: rflask-1.0.10-py2.py3-none-any.whl
- Upload date:
- Size: 15.9 kB
- Tags: Python 2, Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/45.1.0 requests-toolbelt/0.9.1 tqdm/4.42.0 CPython/3.7.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
defb00c48a793d75b23d6bd8606c39600001b4b680d61f1019c7aac17c89924c
|
|
| MD5 |
98df971fe8c73a17e46ff890d9af07f3
|
|
| BLAKE2b-256 |
a281b88c13717c845ed6111ddb4a283fb829b847c4d626af3799d43852d3a664
|