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
testssubdirectory - Creates a
srcsubdirectory - Creates an empty
src/api.py - Creates an empty
requirements.txtfile in the root directory - Creates an empty
README.mdfile in the root directory - Creates an empty
CODEOWNERSfile in the root directory
- Creates a
- Creates additional resources if specified by flags:
--dockerfilecreates an emptyDockerfilein the root directory--modelsfilecreates an emptymodels.pyinsrc/apidirectory--dbfilecreates an emptydb.pyinsrc/apidirectory--resourcesfilecreates an emptyresources.pyinsrc/apidirectory- '--tox' creates an empty
tox.iniin the root directory
- Provides the
shellcommand to get a Python console (support IPython if installed) - Provides the
runcommand 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
Metadata
Release files for falcontool 0.3.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| falcontool-0.3.1.tar.gz | 3.3 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| falcontool-0.3.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 6.4 kB
Release files / falcontool-0.3.1.tar.gz
| Download URL | falcontool-0.3.1.tar.gz |
|---|---|
| Size | 3.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
30cc29d65656aa7bc29c774fb66cd0d0e22048407c580215990218f3cd97f0bc
|
|
BLAKE2b-256 checksum How to use checksums |
b2fee542f6576acb641445b1e28f7c3af71cc86d4b11cc3584d3bee754b49ee9
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is 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
|
Release files / falcontool-0.3.1-py3-none-any.whl
| Download URL | falcontool-0.3.1-py3-none-any.whl |
|---|---|
| Size | 3.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
05337ceae96e4e05188e23f826699b0c76501f2e6cfc529d75a2b863ccd45a22
|
|
BLAKE2b-256 checksum How to use checksums |
d6ac5c82a229d1be121bc3a9391b569114f061a928dc05ab8bcf0ce5ca0601d9
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is 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
|