Skip to content

Commit

Permalink
feat: add package dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
e-kondr01 committed Aug 26, 2023
1 parent dfb3106 commit 1a881dc
Show file tree
Hide file tree
Showing 8 changed files with 48 additions and 22 deletions.
3 changes: 3 additions & 0 deletions .flake8
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[flake8]
max-line-length = 88
exclude = .git,__pycache__,__init__.py,.mypy_cache,.pytest_cache
21 changes: 21 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
The MIT License (MIT)

Copyright (c) 2023 Kondrashov Egor

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
11 changes: 0 additions & 11 deletions TODO.md

This file was deleted.

1 change: 0 additions & 1 deletion fastapi_sqlalchemy_toolkit/filters.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@

from .base_model import Base


# NullableQuery определяет значения квери параметра,
# который должны интерпретироваться как сравнение с null.
# None интерпретируется как отсутствие квери параметра
Expand Down
9 changes: 3 additions & 6 deletions fastapi_sqlalchemy_toolkit/ordering.py
Original file line number Diff line number Diff line change
@@ -1,15 +1,12 @@
from dataclasses import dataclass
from enum import Enum
from typing import Annotated, Any, Callable, Literal, Optional, Sequence, Type, get_args
from typing import Annotated, Sequence, Type
from uuid import uuid4

import pydantic
from dateutil import parser
from fastapi import Depends, Query
from fastapi import Depends
from sqlalchemy.orm.attributes import InstrumentedAttribute

from app.models.base import Base

from .base_model import Base


@dataclass
Expand Down
2 changes: 1 addition & 1 deletion fastapi_sqlalchemy_toolkit/utils.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
from typing import Any, Optional, Type

import pydantic
from dateutil import parser
from fastapi import Query


Expand Down Expand Up @@ -31,6 +30,7 @@ def __new__(

return super().__new__(self, name, bases, namespaces, **kwargs)


# Утилиты для передачи нескольких значений для фильтрации в одном
# квери параметре через запятую
comma_list_query = Query(
Expand Down
13 changes: 10 additions & 3 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
[build-system]
requires = ["setuptools>=61.0"]
build-backend = "setuptools.build_meta"
requires = ["hatchling"]
build-backend = "hatchling.build"

[project]
name = "fastapi_sqlalchemy_toolkit"
version = "0.0.2"
version = "0.0.2.3"
authors = [
{ name="Egor Kondrashov", email="[email protected]" },
]
Expand All @@ -15,6 +15,13 @@ classifiers = [
"Programming Language :: Python :: 3",
"Operating System :: OS Independent",
]
dependencies = [
"fastapi>=0.100.0",
"sqlalchemy>=2.0.0",
"fastapi_pagination>=0.12.6",
"pydantic>=2.0.0",
"python-dateutil>=2.8.2"
]

[project.urls]
"Homepage" = "https://github.com/e-kondr01/fastapi-sqlalchemy-toolkit"
10 changes: 10 additions & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
fastapi>=0.100.0
sqlalchemy>=2.0.0
fastapi_pagination>=0.12.6
pydantic>=2.0.0
python-dateutil>=2.8.2

black
isort
pylint
mypy

0 comments on commit 1a881dc

Please sign in to comment.