opened
underyx
username_0
Just like https://github.com/kiwicom/kiwi-platform-py/issues/7.

### Questions

- Where do we place this in the package? `kw.platform.aiohttp` is reserved for the proxied patched version of aiohttp. We could have it inside anyway but it's probably nicer to have `kw.platform.aiohttp_middleware`?
aiohttp-middleware: Middleware for delaying and rejecting requests
issue
created
paveldedik
username_1
Why not place the package in `kw.platform.aiohttp.middlewares`? Or maybe even `kw.platform.aiohttp.web.middlewares`? As I understand it, no patching of the global library will be done by importing `kw.platform.aiohttp`, so it should work right? And we could also use the middleware automatically in the patched version of `aiohttp`.
comment
created
underyx
username_0
Yep, you're right, that's now the new plan. I still feel like it's not a good idea to place it in `kw.platform.aiohttp`, though; think of the usage, people would always end up with:

```python
import aiohttp
from kw.platform import aiohttp
```

so they'd be forced to add an alias anyway.
comment
created
paveldedik
username_1
Sorry, I haven't noticed your comment when I created the pull request. In the pull request, people would end up with something like this:

```python
from kw.platform.aiohttp import user_agent_middlewere
```

And it doesn't seem so bad. And also, you can always alias the import.
comment
closed
underyx
username_0
issue
created
underyx
username_0
Let's keep it for now, but I imagine it will get annoying once we have 3-4 middleware there to import them one-by-one.
comment