Application server framework help you write long run application.
Project description
About
Application server framework help you write long run application.
Install
pip install appserver
Usage
E:\zencore>appserver Usage: appserver [OPTIONS] COMMAND [ARGS]... Options: -c, --config FILENAME Config file path, use yaml format. Default to config.yaml. --help Show this message and exit. Commands: reload Reload application server. start Start application server. stop Stop application server.
Example Config
application: deamon: true workspace: /opt/application/workspace/ pidfile: /tmp/appname.pid main: app.main
Create a new type server
from appserver import server from appserver import set_default_config_path from appserver import set_default_pidfile from appserver import set_config_loader from appserver import default_config_loader def helloserver_loader(config): data = default_config_loader(config) data["server-name"] = "hello server v1.0.0" return data if __name__ == "__main__": set_default_config_path("/etc/helloserver.yaml") set_default_pidfile("/var/run/helloserver.pid") set_config_loader(helloserver_loader) server()
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
appserver-0.4.2.tar.gz
(3.1 kB
view details)
File details
Details for the file appserver-0.4.2.tar.gz
.
File metadata
- Download URL: appserver-0.4.2.tar.gz
- Upload date:
- Size: 3.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 00e351e99a03e6a4509f31bc0ce13bb07802b83f791828bbd03b434725d72cb1 |
|
MD5 | db6bccdf4098f40aa2ef6e8a0cae2585 |
|
BLAKE2b-256 | fe97a36d2185ec86fa7301c9e179f20a0451cf1c61f82f6fe7a38c4468ad4580 |