This is the tools for python.
Project description
wd_pytools
Introduce
This is the tools for python.
wdcmd
import time
from wdcmd import Info, entity
class TestServer:
config_path = 'config.yaml'
status = True
def info_run(self):
return Info("run", "run application") \
.set_args("c", self.config_path, "閰嶇疆鏂囦欢鍦板潃"), self.run
def run(self, ctx):
print(f"閰嶇疆鏂囦欢鍦板潃锛歿ctx.get('c')}")
while self.status:
print("test run ....")
time.sleep(1)
def exit(self):
self.status = False
print("server stop over")
if __name__ == "__main__":
server = TestServer()
entity.register(*server.info_run()).on_exits(server.exit).launch()
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
wd_pytools-0.0.3.tar.gz
(5.1 kB
view hashes)
Built Distribution
Close
Hashes for wd_pytools-0.0.3-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | a3843eac125f55ee646affa138619902c7f62fb4d43013a072a49875124677b4 |
|
MD5 | 0adf6a69a62dde2392f801bb71a3d35f |
|
BLAKE2b-256 | cb962f4f16700241491b31a6593c656e9ecac698c6a59a6d6d26fe938b55eb89 |