Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

apg

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

apg

Awesome project generation tool

  • 0.4.8
  • PyPI
  • Socket score

Maintainers
1

APG

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

Contents

  • Installation
  • Usage

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>

Keywords

FAQs


Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc