Skip to content

Commit

Permalink
Merge branch 'release/0.1a3'
Browse files Browse the repository at this point in the history
  • Loading branch information
ri-gilfanov committed Apr 15, 2021
2 parents 26acbc0 + 33dcc80 commit 1ed9672
Show file tree
Hide file tree
Showing 6 changed files with 51 additions and 8 deletions.
2 changes: 1 addition & 1 deletion .readthedocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,5 +18,5 @@ formats: all

# Optionally set the version of Python and requirements required to build your docs
python:
version: 3.9
version: 3.8

30 changes: 30 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
BSD 3-Clause License

Copyright (c) 2021, Ruslan Ilyasovich Gilfanov
All rights reserved.

Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:

1. Redistributions of source code must retain the above copyright notice, this
list of conditions and the following disclaimer.

2. Redistributions in binary form must reproduce the above copyright notice,
this list of conditions and the following disclaimer in the documentation
and/or other materials provided with the distribution.

3. Neither the name of the copyright holder nor the names of its
contributors may be used to endorse or promote products derived from
this software without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

6 changes: 6 additions & 0 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -31,3 +31,9 @@ Example
aiohttp_sqlalchemy.setup(app, [sa_engine('sqlite+aiosqlite:///')])
app.add_routes(routes)
web.run_app(app)
Documentation
-------------

See: https://aiohttp-sqlalchemy.readthedocs.io/

6 changes: 3 additions & 3 deletions aiohttp_sqlalchemy/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,12 @@
from typing import TYPE_CHECKING

if TYPE_CHECKING:
from aiohttp.web import Application, Request, Response
from aiohttp.web import Application, Request, StreamResponse
from sqlalchemy.ext.asyncio import AsyncEngine
from typing import Callable, Iterable, Tuple


__version__ = '0.1a1'
__version__ = '0.1a3'


def sa_decorator(key: str = 'sa_main'):
Expand Down Expand Up @@ -39,7 +39,7 @@ async def wrapped(*args, **kwargs):

def sa_middleware(key: str = 'sa_main') -> 'Callable':
@middleware
async def sa_middleware_(request: 'Request', handler: 'Callable') -> 'Response':
async def sa_middleware_(request: 'Request', handler: 'Callable') -> 'StreamResponse':
async with AsyncSession(request.app[key]) as request[key]:
return await handler(request)
return sa_middleware_
Expand Down
4 changes: 2 additions & 2 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
author = 'Ruslan Ilyasovich Gilfanov'

# The full version, including alpha/beta/rc tags
release = '0.1a1'
release = '0.1a3'


# -- General configuration ---------------------------------------------------
Expand Down Expand Up @@ -51,7 +51,7 @@
# The theme to use for HTML and HTML Help pages. See the documentation for
# a list of builtin themes.
#
html_theme = 'alabaster'
html_theme = 'sphinx_rtd_theme'

# Add any paths that contain custom static files (such as style sheets) here,
# relative to this directory. They are copied after the builtin static files,
Expand Down
11 changes: 9 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "aiohttp-sqlalchemy"
version = "0.1a1"
version = "0.1a3"
description = "SQLAlchemy >= 1.4 support for aiohttp."
authors = [
"Ruslan Ilyasovich Gilfanov <ri.gilfanov@yandex.ru>",
Expand All @@ -9,19 +9,26 @@ classifiers = [
"Development Status :: 3 - Alpha",
"Programming Language :: Python",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Topic :: Internet",
"Topic :: Internet :: WWW/HTTP",
]
documentation = "https://aiohttp-sqlalchemy.readthedocs.io/"
homepage = "https://github.com/ri-gilfanov/aiohttp-sqlalchemy"
keywords = ["aiohttp", "sqlalchemy"]
license = "BSD-3-Clause"
readme = "README.rst"
repository = "https://github.com/ri-gilfanov/aiohttp-sqlalchemy"

[tool.poetry.dependencies]
python = "^3.9"
python = "^3.8"
aiohttp = "*"
SQLAlchemy = "*"

[tool.poetry.dev-dependencies]
asyncpg = "*"
aiosqlite = "*"
mypy = "*"
pytest = "*"
Expand Down

0 comments on commit 1ed9672

Please sign in to comment.