Skip to main content

Falcon commandline tool

Project description

Falcontool: a simple utility to create and work with Falcon-based projects

Falcontool is an attempt to provide tooling for quickly and easily starting a Falcon-based project.

It is inspired by Django's django-admin and Flask's flask.

Falcontool does the following:

  • Creates a project repository given a project_name
  • Sets up the basic project scaffolding, including:
    • Creates a tests subdirectory
    • Creates a src subdirectory
    • Creates an empty src/api.py
    • Creates an empty requirements.txt file in the root directory
    • Creates an empty README.md file in the root directory
    • Creates an empty CODEOWNERS file in the root directory
  • Creates additional resources if specified by flags:
    • --dockerfile creates an empty Dockerfile in the root directory
    • --modelsfile creates an empty models.py in src/api directory
    • --dbfile creates an empty db.py in src/api directory
    • --resourcesfile creates an empty resources.py in src/api directory
    • '--tox' creates an empty tox.ini in the root directory
  • Provides the shell command to get a Python console (support IPython if installed)
  • Provides the run command to start the API server

Installation

$> pip install falcontool

Usage

$> falcon create foo
created directory foo
created directory tests
created directory src
created file requirements.txt
created file README.md
created file src/api.py
created file CODEOWNERS

$> cd foo
$> ll -a ./*
-rw-r--r-- 1 tjb tjb   40 Sep 29 20:23 ./CODEOWNERS
-rw-r--r-- 1 tjb tjb   40 Sep 29 20:23 ./README.md
-rw-r--r-- 1 tjb tjb   40 Sep 29 20:23 ./requirements.txt

./src:
total 12
drwxr-xr-x 2 tjb tjb 4096 Sep 29 20:23 ./
drwxr-xr-x 4 tjb tjb 4096 Sep 29 20:23 ../
-rw-r--r-- 1 tjb tjb   40 Sep 29 20:23 api.py

./tests:
total 8
drwxr-xr-x 2 tjb tjb 4096 Sep 29 20:23 ./
drwxr-xr-x 4 tjb tjb 4096 Sep 29 20:23 ../

$> falcon shell
Cannot find IPython. Falling back to Python console.
Python 3.7.4 (default, Aug 19 2019, 22:20:25) 
[GCC 8.3.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
(InteractiveConsole)
>>> 

$> falcon run
[2019-09-30 18:15:25 -0400] [17047] [INFO] Starting gunicorn 19.9.0
[2019-09-30 18:15:25 -0400] [17047] [INFO] Listening at: http://127.0.0.1:8000 (17047)
[2019-09-30 18:15:25 -0400] [17047] [INFO] Using worker: sync
[2019-09-30 18:15:25 -0400] [17050] [INFO] Booting worker with pid: 17050

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

falcontool-0.3.0.tar.gz (3.3 kB view details)

Uploaded Source

Built Distribution

falcontool-0.3.0-py3-none-any.whl (3.1 kB view details)

Uploaded Python 3

File details

Details for the file falcontool-0.3.0.tar.gz.

File metadata

  • Download URL: falcontool-0.3.0.tar.gz
  • Upload date:
  • Size: 3.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/2.0.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.36.1 CPython/3.7.4

File hashes

Hashes for falcontool-0.3.0.tar.gz
Algorithm Hash digest
SHA256 bdc82a524f0bf8f7c0d0b33e860d6023a3b14e1e8b002037108433fd22bd5c48
MD5 fce2a75f1b9e0bc646814430bebd070b
BLAKE2b-256 303ffb1cebd8571e6b4fff0c588b55d692a69d5c73b4df45efa2cdd0188a2b0b

See more details on using hashes here.

File details

Details for the file falcontool-0.3.0-py3-none-any.whl.

File metadata

  • Download URL: falcontool-0.3.0-py3-none-any.whl
  • Upload date:
  • Size: 3.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/2.0.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.36.1 CPython/3.7.4

File hashes

Hashes for falcontool-0.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 bea16fa8777dcc5454f781e7760b7874d6ae094b9b0342daa17d7334467c3fa4
MD5 0559db570cf8e9c06f3db385a70fad20
BLAKE2b-256 174b4969ed0b3dee4b209f7eb75da4ff554ae6f1200a726f461b3a5bd7e5e9e6

See more details on using hashes here.

Supported by

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