aio-libs / aiohttp-devtools

dev tools for aiohttp

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

aiohttp-tools: do we need it?

samuelcolvin opened this issue · comments

There's quite a bit of code required to deploy an aiohttp app which will be duplicated between almost all apps.

This code probably doesn't want to end up in aiohttp itself, but also can't be included in aiohttp-devtools as it will be required in production and testing where aiohttp-devtools shouldn't be installed.

There are therefore two options:

  • include this code when generating a new project with with start
  • create a third library perhaps aiohttp-tools which has minimal requirements and takes care of this logic

Examples of such code:
1 config parsing eg. clayman74/wallet config, see #2 for example of needs
2 creating, resetting, migration dbs
3 executing management commands - this is probably an easier way of covering 2.

The more I think about this the more I think it's necessary and could causing more confusion than it solves.

It will however require a bit of code to be created in all started projects while could go out of date and wouldn't be easily updated across the population.

Let's postpone aiohttp-tools for a while.
Say, db migration could be done by many different ways now, especially taking into account that there are no async ORM yet.
Also I doubt if we need django-style management commands -- there are easier and more native ways for working with cmdline options than deriving from django.Command I believe.
IMHO the tool shouldn't operate on command line level at all but provide helpful classes/functions at first.

Too many questions.
I suggest experimenting with aiohttp-devtools and after collecting an expertise about good practices switch to aiohttp-prodtools.

only 3 questions; which I wanted to get a vague idea about before starting.

Postponing makes sense.