The Wayback Machine - https://web.archive.org/web/20201115072513/https://github.com/aio-libs/aiohttp/issues/4137
Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: explain why all setups we set to app #4137

Open
Arfey opened this issue Oct 3, 2019 · 3 comments
Open

docs: explain why all setups we set to app #4137

Arfey opened this issue Oct 3, 2019 · 3 comments

Comments

@Arfey
Copy link
Member

@Arfey Arfey commented Oct 3, 2019

Add in documentation part (maybe into tutorial) where explaining why all connection, settings and etс, we add to the instance of application.

example:

async def init_pg(app):
    conf = app['config']['postgres']
    engine = await aiopg.sa.create_engine(
        database=conf['database'],
        user=conf['user'],
        password=conf['password'],
        host=conf['host'],
        port=conf['port'],
        minsize=conf['minsize'],
        maxsize=conf['maxsize'],
    )
    app['db'] = engine

Please don't forget:

  • add screenshot with your part of documentation
  • write below that u want to take it to work
@oktak
Copy link

@oktak oktak commented Oct 4, 2019

I wonder there exists a website https://demos.aiohttp.org/en/latest/tutorial.html
Is it serving similar purpose? Does this issue aim to merge the two?
Indeed, I am willing to work on this, may be add some screenshots :)
Please let me know more about the direction.

@Arfey
Copy link
Member Author

@Arfey Arfey commented Oct 4, 2019

Tutorial is story about show how may looks project on aiohttp and how u need to design it. The main documentation is about how work and why.

The main goal of this issue it's describe why we choose this way to share settings and etc.

@asvetlov
Copy link
Member

@asvetlov asvetlov commented Oct 11, 2019

Can be a part of #4078 work

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
3 participants
You can’t perform that action at this time.