aboutsummaryrefslogtreecommitdiffstats
path: root/templates/{{cookiecutter.services_dir}}/{{cookiecutter.service_slug}}.py
blob: 0d79e539c9b1faadc0dc4e259c0899b64113d013 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
from pyagl.services.base import AGLBaseService, AFBResponse
import asyncio
import os


class {{cookiecutter.classname}}(AGLBaseService):
    service = '{{cookiecutter.aglsystemdservice}}'
    parser = AGLBaseService.getparser()

    def __init__(self, ip, port=None, service='{{cookiecutter.aglsystemdservice}}'):
        super().__init__(api='{{cookiecutter.api}}', ip=ip, port=port, service=service)
        # more init stuff specific to the new service

async def main(loop):
    args = {{cookiecutter.classname}}.parser.parse_args()
    svc = await {{cookiecutter.classname}}(args.ipaddr)