Name | django-command-server JSON |
Version |
0.1.2
JSON |
| download |
home_page | |
Summary | Django management.command is running a long live task, we make it a linux daemon server, so that you can start, stop, restart the task. |
upload_time | 2023-09-18 02:10:03 |
maintainer | Jiang Li |
docs_url | None |
author | Jiang Li |
requires_python | |
license | MIT |
keywords |
django
extentions
|
VCS |
|
bugtrack_url |
|
requirements |
No requirements were recorded.
|
Travis-CI |
No Travis.
|
coveralls test coverage |
No coveralls.
|
# django-command-server
Django management.command is running a long live task, we make it a linux daemon server, so that you can start, stop, restart the task.
## Install
```
pip install django-command-server
```
## Usage
**app/management/commands/helloserver.py**
```
import djclick as click
from django_command_server import DjangoCommandServer
class HelloServer(DjangoCommandServer):
def main(self):
while True:
print("hello")
@click.group()
def main():
pass
hello_server = HelloServer()
hello_server.setup(main)
```
**Notes:**
- django_command_server is not a django application, do do NOT include it in django's INSTALLED_APPS.
- DjangoCommandServer setup takes a djclick.group(), so create an instance and pass it to setup.
- Implement your own server main.
## Release
### v0.1.0 2020/11/09
- First release.
### v0.1.1 2020/11/09
- Add deps in requirements.txt.
### v0.1.2 2023/09/18
- Doc update.
Raw data
{
"_id": null,
"home_page": "",
"name": "django-command-server",
"maintainer": "Jiang Li",
"docs_url": null,
"requires_python": "",
"maintainer_email": "jiangli@zencore.cn",
"keywords": "django extentions",
"author": "Jiang Li",
"author_email": "jiangli@zencore.cn",
"download_url": "https://files.pythonhosted.org/packages/4b/88/76cb9a9eeed76bd7034826b7a8ef5b884772c13123465f7a36d68d255c6b/django-command-server-0.1.2.tar.gz",
"platform": null,
"description": "# django-command-server\n\nDjango management.command is running a long live task, we make it a linux daemon server, so that you can start, stop, restart the task.\n\n## Install\n\n```\npip install django-command-server\n```\n\n\n## Usage\n\n**app/management/commands/helloserver.py**\n\n```\nimport djclick as click\nfrom django_command_server import DjangoCommandServer\n\nclass HelloServer(DjangoCommandServer):\n def main(self):\n while True:\n print(\"hello\")\n\n@click.group()\ndef main():\n pass\n\nhello_server = HelloServer()\nhello_server.setup(main)\n```\n\n**Notes:**\n\n- django_command_server is not a django application, do do NOT include it in django's INSTALLED_APPS.\n- DjangoCommandServer setup takes a djclick.group(), so create an instance and pass it to setup.\n- Implement your own server main.\n\n\n## Release\n\n### v0.1.0 2020/11/09\n\n- First release.\n\n### v0.1.1 2020/11/09\n\n- Add deps in requirements.txt.\n\n### v0.1.2 2023/09/18\n\n- Doc update.\n",
"bugtrack_url": null,
"license": "MIT",
"summary": "Django management.command is running a long live task, we make it a linux daemon server, so that you can start, stop, restart the task.",
"version": "0.1.2",
"project_urls": null,
"split_keywords": [
"django",
"extentions"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "847bfd5d6e630cc6393e62799eeb99531876234e14050ab103da321d888e41db",
"md5": "cb286043e8793173af802859ba50fc40",
"sha256": "6cd48f7d2a77f69100524d55288df02ef0d86f380db6f41291030e122eadc8c0"
},
"downloads": -1,
"filename": "django_command_server-0.1.2-py3-none-any.whl",
"has_sig": false,
"md5_digest": "cb286043e8793173af802859ba50fc40",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": null,
"size": 3597,
"upload_time": "2023-09-18T02:10:01",
"upload_time_iso_8601": "2023-09-18T02:10:01.542094Z",
"url": "https://files.pythonhosted.org/packages/84/7b/fd5d6e630cc6393e62799eeb99531876234e14050ab103da321d888e41db/django_command_server-0.1.2-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "4b8876cb9a9eeed76bd7034826b7a8ef5b884772c13123465f7a36d68d255c6b",
"md5": "474946bf24b34f5902d616c576b29034",
"sha256": "6941c031bb815b23d09f58e92908be5abbc7a3791ce60ca625a1efaa68403ca6"
},
"downloads": -1,
"filename": "django-command-server-0.1.2.tar.gz",
"has_sig": false,
"md5_digest": "474946bf24b34f5902d616c576b29034",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 3662,
"upload_time": "2023-09-18T02:10:03",
"upload_time_iso_8601": "2023-09-18T02:10:03.480712Z",
"url": "https://files.pythonhosted.org/packages/4b/88/76cb9a9eeed76bd7034826b7a8ef5b884772c13123465f7a36d68d255c6b/django-command-server-0.1.2.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2023-09-18 02:10:03",
"github": false,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"lcname": "django-command-server"
}