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 details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file wd_pytools-0.0.3.tar.gz.
File metadata
- Download URL: wd_pytools-0.0.3.tar.gz
- Upload date:
- Size: 5.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.10.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5a65d473441ac8ef4725cdb1d02c6ec9208d52facd67c2b79b6acd18bb3eff56
|
|
| MD5 |
6d4d42115ad874a2410acf0de95d9895
|
|
| BLAKE2b-256 |
b4a3b741730b8f39cb5fcb001955db42e539258d3fda372fbad167db43d29548
|
File details
Details for the file wd_pytools-0.0.3-py3-none-any.whl.
File metadata
- Download URL: wd_pytools-0.0.3-py3-none-any.whl
- Upload date:
- Size: 6.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.10.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a3843eac125f55ee646affa138619902c7f62fb4d43013a072a49875124677b4
|
|
| MD5 |
0adf6a69a62dde2392f801bb71a3d35f
|
|
| BLAKE2b-256 |
cb962f4f16700241491b31a6593c656e9ecac698c6a59a6d6d26fe938b55eb89
|