Skip to main content

Django server controllers, e.g. UwsgiController.

Project description

django-server-controller

Django server controllers, e.g. UwsgiController.

Install

pip install django-server-controller

Examples

example_ctrl.py

from django_server_controller import UwsgiController
import example_pro

EXAMPLE_PRO_BASE_DIR = "/apprun/example-pro/"

try:
    from example_localsettings import *
except ImportError:
    pass

controller = UwsgiController(example_pro, EXAMPLE_PRO_BASE_DIR)
main = controller.get_controller()

if __name__ == "__main__":
    main()

example_ctrl Usage

C:\Workspace\example-pro>python example-ctrl.py
Usage: example-ctrl.py [OPTIONS] COMMAND [ARGS]...

Options:
  --help  Show this message and exit.

Commands:
  reload   Reload uwsgi server.
  restart  Restart uwsgi server.
  start    Start uwsgi server.
  status   Get uwsgi server status.
  stop     Stop uwsgi server.

wsgi.ini file paths

  • os.path.abspath(os.path.join(os.path.dirname(project.__file__), "wsgi.ini"))
  • os.path.abspath(os.path.join(base_dir, "./etc/wsgi.ini"))
  • os.path.abspath("wsgi.ini")

Chrooted to base_dir before find wsgi.ini

Suggest project folders

  • /apprun/example-pro/
    • /apprun/example-pro/web/
    • /apprun/example-pro/web/static/
    • /apprun/example-pro/web/media/
    • /apprun/example-pro/logs/
    • /apprun/example-pro/tmp/
    • /apprun/example-pro/etc/
    • /apprun/example-pro/uwsgi.pid

Releases

v0.1.2 2020/07/25

  • Fix reload parameter problem.

v0.1.1 2020/07/25

  • Fix psutil import problem.

v0.1.0 2020/07/25

  • First release.

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

django-server-controller-0.1.2.tar.gz (4.0 kB view details)

Uploaded Source

File details

Details for the file django-server-controller-0.1.2.tar.gz.

File metadata

  • Download URL: django-server-controller-0.1.2.tar.gz
  • Upload date:
  • Size: 4.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.24.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.46.0 CPython/3.7.7

File hashes

Hashes for django-server-controller-0.1.2.tar.gz
Algorithm Hash digest
SHA256 0512c8d71ab351ef36477caf94af074137cbc11433a7ed14139aee376d366063
MD5 261538e9f961374067302b7038b8d309
BLAKE2b-256 b47dc69aa22e59a10a53f53dfc54bf66f8cec8dd1f028d2cc744458d1a219dde

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