duck.__main__

Main entry to Duck command-line tool.

Module Contents

Functions

cli

Duck CLI - Manage your projects with ease.

collectstatic

Collect static files from Blueprints’ directories.

django

Run Django-related commands in your project.

django_add

Integrate an existing Django project into Duck.

logs

Manage Duck project logs.

makeblueprint

Create a new Blueprint for organizing routes, similar to Flask’s Blueprint system.

makeproject

Create a new project whether it’s a normal, full or a mini project.

monitor

Monitor Duck system metrics in real-time.

runserver

Run the development or production server.

runtests

Run pre-built Duck test cases.

service

Create and manage Duck background service for linux-based systems using systemd.

sitemap

Create sitemap for Duck.

ssl_gen

Generate self-signed SSL certificate.

Data

EXAMPLES

API

duck.__main__.EXAMPLES

None

duck.__main__.cli(ctx, version)

Duck CLI - Manage your projects with ease.

duck.__main__.collectstatic(skip_confirmation)

Collect static files from Blueprints’ directories.

duck.__main__.django(args)

Run Django-related commands in your project.

duck.__main__.django_add(source, appname, dest)

Integrate an existing Django project into Duck.

duck.__main__.logs()

Manage Duck project logs.

duck.__main__.makeblueprint(name, dest, overwrite)

Create a new Blueprint for organizing routes, similar to Flask’s Blueprint system.

Notes:

  • It’s recommended to provide camelCased names like CounterApp.

duck.__main__.makeproject(name, dest, overwrite, project_type)

Create a new project whether it’s a normal, full or a mini project.

duck.__main__.monitor(interval, duck_process, pid, cpu_warning, ram_warning)

Monitor Duck system metrics in real-time.

Supports:

  • Multiple Duck servers by name

  • Filtering by specific process IDs

  • CPU/RAM threshold highlighting

duck.__main__.runserver(address, port, domain, settings, ipv6, file, use_django, is_reload, workers)

Run the development or production server.

duck.__main__.runtests(verbose)

Run pre-built Duck test cases.

duck.__main__.service()

Create and manage Duck background service for linux-based systems using systemd.

CUSTOMIZE the service in settings.py.

duck.__main__.sitemap()

Create sitemap for Duck.

duck.__main__.ssl_gen()

Generate self-signed SSL certificate.