Skip to main content

This is a tools for init flask restful api project, this can save your time.

Project description

Init Flask Restful Api

This project is no longer maintained, please visit:https://github.com/Deacone/cookiecutter-flask-rest

PyPI - Python Version PyPI - Downloads PyPI - Format PyPI - License PyPI

Installing

Install and update using pip:

pip install -U rflask

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 directory 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.md
    ├── __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 project root direcroty, open terminal:

$ git clone ***.git
$ cd <your_project>
$ docker-compose up

Links

Project details


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.1.6.tar.gz (16.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

rflask-1.1.6-py2.py3-none-any.whl (16.6 kB view details)

Uploaded Python 2Python 3

File details

Details for the file rflask-1.1.6.tar.gz.

File metadata

  • Download URL: rflask-1.1.6.tar.gz
  • Upload date:
  • Size: 16.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/45.1.0 requests-toolbelt/0.9.1 tqdm/4.43.0 CPython/3.7.6

File hashes

Hashes for rflask-1.1.6.tar.gz
Algorithm Hash digest
SHA256 83e558d177acfae8d6e90fa635f7ad472895836494737268804392cfe94190a7
MD5 3bccc69fdc6dd7ebb8c9ce11b7365164
BLAKE2b-256 14047bc0c97febf2a7ba3323c44a95498e283c2f6cf37ace2685d7027562697f

See more details on using hashes here.

File details

Details for the file rflask-1.1.6-py2.py3-none-any.whl.

File metadata

  • Download URL: rflask-1.1.6-py2.py3-none-any.whl
  • Upload date:
  • Size: 16.6 kB
  • Tags: Python 2, Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/45.1.0 requests-toolbelt/0.9.1 tqdm/4.43.0 CPython/3.7.6

File hashes

Hashes for rflask-1.1.6-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 5120909626262b4834625232e3d672da9701a3df2972a9ca1aed643b9978498c
MD5 5270f3d91f7bf55b01c0cf507dea0d44
BLAKE2b-256 a68f1333448557dcb6107a20a1d6e37168e69b3286e2a2eccfe00d46d5e4491b

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page