-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Eugene Shershen
authored and
Eugene Shershen
committed
Oct 22, 2021
1 parent
5b16d47
commit 3e84c56
Showing
8 changed files
with
66 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
[flake8] | ||
exclude = .venv | ||
max-line-length = 100 | ||
extend-ignore = E203 | ||
extend-ignore = E203 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -11,4 +11,4 @@ __pycache__/ | |
htmlcov/ | ||
test.py | ||
*.egg-info | ||
coverage.xml | ||
coverage.xml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
exclude: (alembic|build|dist|docker|esign|kubernetes|migrations) | ||
|
||
default_language_version: | ||
python: python3.7 | ||
|
||
repos: | ||
- repo: https://github.com/pre-commit/pre-commit-hooks | ||
rev: v4.0.1 | ||
hooks: | ||
- id: end-of-file-fixer | ||
- id: trailing-whitespace | ||
- repo: https://github.com/asottile/pyupgrade | ||
rev: v2.28.0 | ||
hooks: | ||
- id: pyupgrade | ||
args: | ||
- --py37-plus | ||
- repo: https://github.com/myint/autoflake | ||
rev: v1.4 | ||
hooks: | ||
- id: autoflake | ||
args: | ||
- --in-place | ||
- --remove-all-unused-imports | ||
- --expand-star-imports | ||
- --remove-duplicate-keys | ||
- --remove-unused-variables | ||
- repo: https://github.com/PyCQA/isort | ||
rev: 5.9.3 | ||
hooks: | ||
- id: isort | ||
- repo: https://github.com/psf/black | ||
rev: 21.9b0 | ||
hooks: | ||
- id: black | ||
- repo: https://github.com/PyCQA/flake8 | ||
rev: 3.9.2 | ||
hooks: | ||
- id: flake8 | ||
args: | ||
- --max-line-length=100 | ||
- --ignore=E203, E501, W503 | ||
- repo: https://github.com/pre-commit/mirrors-mypy | ||
rev: v0.910 | ||
hooks: | ||
- id: mypy | ||
additional_dependencies: | ||
- pydantic | ||
- types-ujson |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,7 +9,7 @@ | |
|
||
### Description | ||
|
||
FastAPI-Async-SQLAlchemy provides middleware for FastAPI and SQLAlchemy using async AsyncSession and async engine. | ||
FastAPI-Async-SQLAlchemy provides middleware for FastAPI and SQLAlchemy using async AsyncSession and async engine. | ||
Based on FastAPI-SQLAlchemy | ||
|
||
### Install | ||
|
@@ -34,7 +34,7 @@ from sqlalchemy import table | |
|
||
app = FastAPI() | ||
app.add_middleware( | ||
SQLAlchemyMiddleware, | ||
SQLAlchemyMiddleware, | ||
db_url="postgresql+asyncpg://user:[email protected]:5432/primary_db" | ||
) | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters