Skip to main content

Awesome project generation tool

Project description

APG

Code generation tool, which helps you to start a project without pain.

Contents

Installation

pip install apg

Dependencies

  • make
  • docker
  • docker-compose
  • cookiecutter
  • Click
  • npm (for ReactJS projects)

Usage

Create a new project in the current directory:

$ apg init <framework_name>

Available frameworks:

  • flask (Flask used as basis, we added webargs, Swagger, pytest and other handy stuff)
  • aiohttp (AIOHTTP used as basis, but we completely reorganized it to look more like flask. Also added Swagger, webargs and so on)
  • react (Only basic functionality of ReactJS application)

Once you've done that, commands listed below will be available

Flask project:

$ make dev # build application containers and run in developer mode
$ make build # build application containers
$ make up # run application in production mode
$ make stop # stop application and running containers
$ make db # initialize database
$ make migrate # create data migration for database
$ make bash # run bash shell inside application container
$ make shell # run pimped out python console
$ make dbshell # run databse console
$ make test # run autotests (all project files)
$ make test file=<folder_name> # to run all test files in folder
$ make test file=<folder_name>/<file_name> # to run all tests in single file
$ make test file=<folder_name>/<file_name>::<test_case_name> # to run single test case

AIOHTTP project:

$ make dev # build application containers and run in developer mode
$ make shell # run pimped out python console
$ make check # check apispec
$ make dbshell # run database console
$ make migrate # create data migration for database
$ make upgrade # apply data migrations to database
$ make test # run autotests (all project files)
$ make test file=<folder_name> # to run all test files in folder
$ make test file=<folder_name>/<file_name> # to run all tests in single file
$ make test file=<folder_name>/<file_name>::<test_case_name> # to run single test case

After you run make dev command The API documentation will be available (SwaggerUI)

React project:

$ npm start:dev # in standalone project start dev-server, otherwise compile project in dist folder and start watching it
$ npm build:prod # build production

Add a new module to the current project (current directory):

$ apg module <name>

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

apg-0.4.8.tar.gz (9.1 MB view details)

Uploaded Source

File details

Details for the file apg-0.4.8.tar.gz.

File metadata

  • Download URL: apg-0.4.8.tar.gz
  • Upload date:
  • Size: 9.1 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.18.4 setuptools/41.0.0 requests-toolbelt/0.8.0 tqdm/4.19.5 CPython/3.6.4

File hashes

Hashes for apg-0.4.8.tar.gz
Algorithm Hash digest
SHA256 12c32314e9ab485983aef63777324ed19ae18cb97d95aa651fd5f74400361e56
MD5 c1db532fa4752608257d7ac8a8d09c0f
BLAKE2b-256 2808c58a0eb32b525a0d56eddc989daf443f3027ccf3d8ff2139c14ac43b7b6d

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