mirror of
https://github.com/aykhans/portfolio-blog.git
synced 2025-04-18 19:39:43 +00:00
- Added flake8
- create_user moved to commands
This commit is contained in:
parent
3659e04622
commit
f782944caa
4
src/.flake8
Normal file
4
src/.flake8
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
[flake8]
|
||||||
|
per-file-ignores = app/db/base.py:F401
|
||||||
|
exclude = .git,__pycache__,__init__.py
|
||||||
|
max-line-length = 79
|
@ -10,12 +10,19 @@ from pydantic import (
|
|||||||
class Settings(BaseSettings):
|
class Settings(BaseSettings):
|
||||||
PROJECT_NAME: str = 'FastAPI Portfolio & Blog'
|
PROJECT_NAME: str = 'FastAPI Portfolio & Blog'
|
||||||
|
|
||||||
MAIN_PATH: Path = Path(__file__).resolve().parent.parent.parent # path to src folder
|
MAIN_PATH: Path = (
|
||||||
|
Path(__file__).
|
||||||
|
resolve().
|
||||||
|
parent.
|
||||||
|
parent.
|
||||||
|
parent
|
||||||
|
) # path to src folder
|
||||||
APP_PATH: Path = MAIN_PATH / 'app' # path to app folder
|
APP_PATH: Path = MAIN_PATH / 'app' # path to app folder
|
||||||
MEDIA_FOLDER: Path = Path('media') # name of media folder
|
MEDIA_FOLDER: Path = Path('media') # name of media folder
|
||||||
MEDIA_PATH: Path = MAIN_PATH / MEDIA_FOLDER # path to media folder
|
MEDIA_PATH: Path = MAIN_PATH / MEDIA_FOLDER # path to media folder
|
||||||
STATIC_FOLDER_NAME: Path = Path('static') # name of static folder
|
STATIC_FOLDER_NAME: Path = Path('static') # name of static folder
|
||||||
STATIC_FOLDER: Path = MAIN_PATH / STATIC_FOLDER_NAME # path to static folder
|
STATIC_FOLDER: Path =\
|
||||||
|
MAIN_PATH / STATIC_FOLDER_NAME # path to static folder
|
||||||
|
|
||||||
FILE_FOLDERS: dict[str, Path] = {
|
FILE_FOLDERS: dict[str, Path] = {
|
||||||
'post_images': Path('post_images'),
|
'post_images': Path('post_images'),
|
||||||
|
@ -32,7 +32,11 @@ def create_access_token(
|
|||||||
)
|
)
|
||||||
|
|
||||||
to_encode = {"exp": expire, "sub": str(subject)}
|
to_encode = {"exp": expire, "sub": str(subject)}
|
||||||
encoded_jwt = jwt.encode(to_encode, settings.SECRET_KEY, algorithm=ALGORITHM)
|
encoded_jwt = jwt.encode(
|
||||||
|
to_encode,
|
||||||
|
settings.SECRET_KEY,
|
||||||
|
algorithm=ALGORITHM
|
||||||
|
)
|
||||||
|
|
||||||
return encoded_jwt
|
return encoded_jwt
|
||||||
|
|
||||||
|
@ -44,7 +44,12 @@ class CRUDBase(Generic[ModelType, CreateSchemaType, UpdateSchemaType]):
|
|||||||
self, db: Session, *, skip: int = 0, limit: int = 100
|
self, db: Session, *, skip: int = 0, limit: int = 100
|
||||||
) -> List[ModelType]:
|
) -> List[ModelType]:
|
||||||
|
|
||||||
q = select(self.model).offset(skip).limit(limit).order_by(self.model.id.desc())
|
q = (
|
||||||
|
select(self.model).
|
||||||
|
offset(skip).
|
||||||
|
limit(limit).
|
||||||
|
order_by(self.model.id.desc())
|
||||||
|
)
|
||||||
obj = await db.execute(q)
|
obj = await db.execute(q)
|
||||||
return obj.scalars()
|
return obj.scalars()
|
||||||
|
|
||||||
@ -52,11 +57,18 @@ class CRUDBase(Generic[ModelType, CreateSchemaType, UpdateSchemaType]):
|
|||||||
self, db: Session, *, skip: int = 0, limit: int = 100
|
self, db: Session, *, skip: int = 0, limit: int = 100
|
||||||
) -> List[ModelType]:
|
) -> List[ModelType]:
|
||||||
|
|
||||||
q = select(self.model).offset(skip).limit(limit).order_by(self.model.id.desc())
|
q = (
|
||||||
|
select(self.model).
|
||||||
|
offset(skip).
|
||||||
|
limit(limit).
|
||||||
|
order_by(self.model.id.desc())
|
||||||
|
)
|
||||||
obj = db.execute(q)
|
obj = db.execute(q)
|
||||||
return obj.scalars()
|
return obj.scalars()
|
||||||
|
|
||||||
async def create(self, db: Session, *, obj_in: CreateSchemaType) -> ModelType:
|
async def create(
|
||||||
|
self, db: Session, *, obj_in: CreateSchemaType
|
||||||
|
) -> ModelType:
|
||||||
obj_in_data = jsonable_encoder(obj_in)
|
obj_in_data = jsonable_encoder(obj_in)
|
||||||
db_obj = self.model(**obj_in_data) # type: ignore
|
db_obj = self.model(**obj_in_data) # type: ignore
|
||||||
db.add(db_obj)
|
db.add(db_obj)
|
||||||
|
@ -75,4 +75,5 @@ class CRUDPost(CRUDBase[Post, PostCreate, PostUpdate]):
|
|||||||
|
|
||||||
return obj
|
return obj
|
||||||
|
|
||||||
|
|
||||||
post = CRUDPost(Post)
|
post = CRUDPost(Post)
|
@ -60,7 +60,11 @@ class CRUDUser(CRUDBase[User, UserCreate, UserUpdate]):
|
|||||||
return db_obj
|
return db_obj
|
||||||
|
|
||||||
async def update(
|
async def update(
|
||||||
self, db: Session, *, db_obj: User, obj_in: Union[UserUpdate, Dict[str, Any]]
|
self,
|
||||||
|
db: Session,
|
||||||
|
*,
|
||||||
|
db_obj: User,
|
||||||
|
obj_in: Union[UserUpdate, Dict[str, Any]]
|
||||||
) -> User:
|
) -> User:
|
||||||
|
|
||||||
if isinstance(obj_in, dict):
|
if isinstance(obj_in, dict):
|
||||||
@ -76,7 +80,9 @@ class CRUDUser(CRUDBase[User, UserCreate, UserUpdate]):
|
|||||||
|
|
||||||
return await super().update(db, db_obj=db_obj, obj_in=update_data)
|
return await super().update(db, db_obj=db_obj, obj_in=update_data)
|
||||||
|
|
||||||
async def authenticate(self, db: Session, *, email: str, password: str) -> Optional[User]:
|
async def authenticate(
|
||||||
|
self, db: Session, *, email: str, password: str
|
||||||
|
) -> Optional[User]:
|
||||||
user = await self.get_by_email(db, email=email)
|
user = await self.get_by_email(db, email=email)
|
||||||
|
|
||||||
if user is None:
|
if user is None:
|
||||||
@ -93,4 +99,5 @@ class CRUDUser(CRUDBase[User, UserCreate, UserUpdate]):
|
|||||||
async def is_superuser(self, user: User) -> bool:
|
async def is_superuser(self, user: User) -> bool:
|
||||||
return user.is_superuser
|
return user.is_superuser
|
||||||
|
|
||||||
|
|
||||||
user = CRUDUser(User)
|
user = CRUDUser(User)
|
@ -16,7 +16,11 @@ class Base:
|
|||||||
__name__: str
|
__name__: str
|
||||||
|
|
||||||
id: Any
|
id: Any
|
||||||
created_at = Column(DateTime(timezone=True), server_default=func.now(), nullable=False)
|
created_at = Column(
|
||||||
|
DateTime(timezone=True),
|
||||||
|
server_default=func.now(),
|
||||||
|
nullable=False
|
||||||
|
)
|
||||||
updated_at = Column(DateTime(timezone=True), onupdate=func.now())
|
updated_at = Column(DateTime(timezone=True), onupdate=func.now())
|
||||||
|
|
||||||
# Generate __tablename__ automatically
|
# Generate __tablename__ automatically
|
||||||
|
@ -1,2 +1,3 @@
|
|||||||
from .post import Post
|
from .post import Post
|
||||||
from .user import User
|
from .user import User
|
||||||
|
from . import post_events
|
@ -1,12 +1,4 @@
|
|||||||
from contextlib import contextmanager
|
|
||||||
from slugify import slugify
|
|
||||||
|
|
||||||
from sqlalchemy.orm.base import NO_VALUE
|
|
||||||
from sqlalchemy.orm import relationship
|
from sqlalchemy.orm import relationship
|
||||||
from sqlalchemy.event import (
|
|
||||||
listen,
|
|
||||||
listens_for
|
|
||||||
)
|
|
||||||
from sqlalchemy import (
|
from sqlalchemy import (
|
||||||
Column,
|
Column,
|
||||||
ForeignKey,
|
ForeignKey,
|
||||||
@ -26,44 +18,3 @@ class Post(Base):
|
|||||||
owner_id = Column(Integer(), ForeignKey("user.id"))
|
owner_id = Column(Integer(), ForeignKey("user.id"))
|
||||||
|
|
||||||
owner = relationship("User", back_populates="posts")
|
owner = relationship("User", back_populates="posts")
|
||||||
|
|
||||||
|
|
||||||
from app.views.depends import get_db
|
|
||||||
from app.utils.file_operations import remove_file
|
|
||||||
from app.core.config import settings
|
|
||||||
|
|
||||||
def generate_slug(target, value, oldvalue, initiator):
|
|
||||||
slug = slugify(value)
|
|
||||||
|
|
||||||
with contextmanager(get_db)() as db:
|
|
||||||
number = 1
|
|
||||||
temp_slug = slug
|
|
||||||
|
|
||||||
while db.query(Post).filter(Post.slug == temp_slug).first() is not None:
|
|
||||||
temp_slug = f'{slug}-{number}'
|
|
||||||
number += 1
|
|
||||||
|
|
||||||
target.slug = temp_slug
|
|
||||||
|
|
||||||
listen(Post.title, 'set', generate_slug)
|
|
||||||
|
|
||||||
|
|
||||||
def remove_old_image_on_update(target, value, oldvalue, initiator):
|
|
||||||
if oldvalue is not NO_VALUE:
|
|
||||||
remove_file(
|
|
||||||
settings.MEDIA_PATH /
|
|
||||||
settings.FILE_FOLDERS['post_images'] /
|
|
||||||
oldvalue
|
|
||||||
)
|
|
||||||
|
|
||||||
listen(Post.image_path, 'set', remove_old_image_on_update)
|
|
||||||
|
|
||||||
|
|
||||||
@listens_for(Post, 'before_delete')
|
|
||||||
def before_delete_listener(mapper, connection, target):
|
|
||||||
if target.image_path:
|
|
||||||
remove_file(
|
|
||||||
settings.MEDIA_PATH /
|
|
||||||
settings.FILE_FOLDERS['post_images'] /
|
|
||||||
target.image_path
|
|
||||||
)
|
|
54
src/app/models/post_events.py
Normal file
54
src/app/models/post_events.py
Normal file
@ -0,0 +1,54 @@
|
|||||||
|
from contextlib import contextmanager
|
||||||
|
from slugify import slugify
|
||||||
|
|
||||||
|
from sqlalchemy.orm.base import NO_VALUE
|
||||||
|
from sqlalchemy.event import (
|
||||||
|
listen,
|
||||||
|
listens_for
|
||||||
|
)
|
||||||
|
|
||||||
|
from app.views.depends import get_db
|
||||||
|
from app.utils.file_operations import remove_file
|
||||||
|
from app.core.config import settings
|
||||||
|
from .post import Post
|
||||||
|
|
||||||
|
|
||||||
|
def generate_slug(target, value, oldvalue, initiator):
|
||||||
|
slug = slugify(value)
|
||||||
|
|
||||||
|
with contextmanager(get_db)() as db:
|
||||||
|
number = 1
|
||||||
|
temp_slug = slug
|
||||||
|
|
||||||
|
while db.query(Post).filter(
|
||||||
|
Post.slug == temp_slug
|
||||||
|
).first() is not None:
|
||||||
|
temp_slug = f'{slug}-{number}'
|
||||||
|
number += 1
|
||||||
|
|
||||||
|
target.slug = temp_slug
|
||||||
|
|
||||||
|
|
||||||
|
listen(Post.title, 'set', generate_slug)
|
||||||
|
|
||||||
|
|
||||||
|
def remove_old_image_on_update(target, value, oldvalue, initiator):
|
||||||
|
if oldvalue is not NO_VALUE:
|
||||||
|
remove_file(
|
||||||
|
settings.MEDIA_PATH /
|
||||||
|
settings.FILE_FOLDERS['post_images'] /
|
||||||
|
oldvalue
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
|
listen(Post.image_path, 'set', remove_old_image_on_update)
|
||||||
|
|
||||||
|
|
||||||
|
@listens_for(Post, 'before_delete')
|
||||||
|
def before_delete_listener(mapper, connection, target):
|
||||||
|
if target.image_path:
|
||||||
|
remove_file(
|
||||||
|
settings.MEDIA_PATH /
|
||||||
|
settings.FILE_FOLDERS['post_images'] /
|
||||||
|
target.image_path
|
||||||
|
)
|
@ -13,7 +13,6 @@ from app.utils.custom_functions import html2text
|
|||||||
from app.core.config import settings
|
from app.core.config import settings
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
class PostBase(BaseModel):
|
class PostBase(BaseModel):
|
||||||
title: Optional[str] = Field(max_length=100)
|
title: Optional[str] = Field(max_length=100)
|
||||||
text: Optional[str] = None
|
text: Optional[str] = None
|
||||||
@ -26,7 +25,8 @@ class PostCreate(PostBase):
|
|||||||
image_path: str
|
image_path: str
|
||||||
|
|
||||||
|
|
||||||
class PostUpdate(PostBase): ...
|
class PostUpdate(PostBase):
|
||||||
|
...
|
||||||
|
|
||||||
|
|
||||||
class PostInTemplate(BaseModel):
|
class PostInTemplate(BaseModel):
|
||||||
|
@ -8,5 +8,7 @@ async def mkdir_if_not_exists(path: Path) -> None:
|
|||||||
|
|
||||||
|
|
||||||
def remove_file(file_path: str) -> None:
|
def remove_file(file_path: str) -> None:
|
||||||
try: remove(file_path)
|
try:
|
||||||
except FileNotFoundError: ...
|
remove(file_path)
|
||||||
|
except FileNotFoundError:
|
||||||
|
...
|
||||||
|
@ -98,7 +98,8 @@ async def get_current_user_or_none(
|
|||||||
)
|
)
|
||||||
) -> UserModel | None:
|
) -> UserModel | None:
|
||||||
|
|
||||||
if token is None: return None
|
if token is None:
|
||||||
|
return None
|
||||||
|
|
||||||
try:
|
try:
|
||||||
payload = jwt.decode(
|
payload = jwt.decode(
|
||||||
@ -132,7 +133,8 @@ async def get_current_active_user_or_none(
|
|||||||
current_user: UserModel | None = Depends(get_current_user_or_none),
|
current_user: UserModel | None = Depends(get_current_user_or_none),
|
||||||
) -> UserModel | None:
|
) -> UserModel | None:
|
||||||
|
|
||||||
if current_user is None: return None
|
if current_user is None:
|
||||||
|
return None
|
||||||
|
|
||||||
if current_user.is_active is False:
|
if current_user.is_active is False:
|
||||||
return None
|
return None
|
||||||
@ -154,7 +156,8 @@ async def get_current_active_superuser_or_none(
|
|||||||
current_user: UserModel | None = Depends(get_current_active_user_or_none),
|
current_user: UserModel | None = Depends(get_current_active_user_or_none),
|
||||||
) -> UserModel | None:
|
) -> UserModel | None:
|
||||||
|
|
||||||
if current_user is None: return None
|
if current_user is None:
|
||||||
|
return None
|
||||||
|
|
||||||
if current_user.is_superuser is False:
|
if current_user.is_superuser is False:
|
||||||
return None
|
return None
|
||||||
@ -194,7 +197,7 @@ async def handle_post_image_or_die(image: UploadFile) -> str:
|
|||||||
unique_image_name
|
unique_image_name
|
||||||
)
|
)
|
||||||
|
|
||||||
except Exception as e:
|
except Exception:
|
||||||
raise HTTPException(
|
raise HTTPException(
|
||||||
status_code=status.HTTP_422_UNPROCESSABLE_ENTITY,
|
status_code=status.HTTP_422_UNPROCESSABLE_ENTITY,
|
||||||
detail='Invalid image'
|
detail='Invalid image'
|
||||||
@ -204,12 +207,14 @@ async def handle_post_image_or_die(image: UploadFile) -> str:
|
|||||||
try:
|
try:
|
||||||
pil_image.close()
|
pil_image.close()
|
||||||
|
|
||||||
except: ...
|
except Exception:
|
||||||
|
...
|
||||||
return str(unique_image_name)
|
return str(unique_image_name)
|
||||||
|
|
||||||
|
|
||||||
async def handle_post_image_or_none(image: UploadFile = None) -> Optional[str]:
|
async def handle_post_image_or_none(image: UploadFile = None) -> Optional[str]:
|
||||||
if image is None: return None
|
if image is None:
|
||||||
|
return None
|
||||||
|
|
||||||
try:
|
try:
|
||||||
pil_image = Image.open(io.BytesIO(image.file.read()))
|
pil_image = Image.open(io.BytesIO(image.file.read()))
|
||||||
@ -230,7 +235,7 @@ async def handle_post_image_or_none(image: UploadFile = None) -> Optional[str]:
|
|||||||
unique_image_name
|
unique_image_name
|
||||||
)
|
)
|
||||||
|
|
||||||
except Exception as e:
|
except Exception:
|
||||||
raise HTTPException(
|
raise HTTPException(
|
||||||
status_code=status.HTTP_422_UNPROCESSABLE_ENTITY,
|
status_code=status.HTTP_422_UNPROCESSABLE_ENTITY,
|
||||||
detail='Invalid image'
|
detail='Invalid image'
|
||||||
@ -240,5 +245,6 @@ async def handle_post_image_or_none(image: UploadFile = None) -> Optional[str]:
|
|||||||
try:
|
try:
|
||||||
pil_image.close()
|
pil_image.close()
|
||||||
|
|
||||||
except: ...
|
except Exception:
|
||||||
|
...
|
||||||
return str(unique_image_name)
|
return str(unique_image_name)
|
@ -81,12 +81,17 @@ async def login(
|
|||||||
)
|
)
|
||||||
|
|
||||||
if user is None:
|
if user is None:
|
||||||
raise HTTPException(status_code=400, detail="Incorrect email or password")
|
raise HTTPException(
|
||||||
|
status_code=400,
|
||||||
|
detail="Incorrect email or password"
|
||||||
|
)
|
||||||
|
|
||||||
elif user.is_active is False:
|
elif user.is_active is False:
|
||||||
raise HTTPException(status_code=400, detail="Inactive user")
|
raise HTTPException(status_code=400, detail="Inactive user")
|
||||||
|
|
||||||
access_token_expires = timedelta(minutes=settings.ACCESS_TOKEN_EXPIRE_MINUTES)
|
access_token_expires = timedelta(
|
||||||
|
minutes=settings.ACCESS_TOKEN_EXPIRE_MINUTES
|
||||||
|
)
|
||||||
|
|
||||||
return {
|
return {
|
||||||
"access_token": security.create_access_token(
|
"access_token": security.create_access_token(
|
||||||
@ -130,7 +135,9 @@ async def create_post(
|
|||||||
image_path=image
|
image_path=image
|
||||||
)
|
)
|
||||||
|
|
||||||
post = await crud.post.create_with_owner(db, obj_in=obj_in, owner_id=user.id)
|
post = await crud.post.create_with_owner(
|
||||||
|
db, obj_in=obj_in, owner_id=user.id
|
||||||
|
)
|
||||||
|
|
||||||
return RedirectResponse(
|
return RedirectResponse(
|
||||||
str(request.url_for('get_update_post', slug=post.slug)),
|
str(request.url_for('get_update_post', slug=post.slug)),
|
||||||
|
@ -1,6 +1,3 @@
|
|||||||
from sys import path
|
|
||||||
path.append('/src')
|
|
||||||
|
|
||||||
from contextlib import contextmanager
|
from contextlib import contextmanager
|
||||||
from typing import Optional
|
from typing import Optional
|
||||||
|
|
51
src/poetry.lock
generated
51
src/poetry.lock
generated
@ -432,6 +432,22 @@ starlette = ">=0.24,<1.0"
|
|||||||
httpx = ["httpx[httpx] (>=0.23,<0.24)"]
|
httpx = ["httpx[httpx] (>=0.23,<0.24)"]
|
||||||
redis = ["redis[redis] (>=4.3,<5.0)"]
|
redis = ["redis[redis] (>=4.3,<5.0)"]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "flake8"
|
||||||
|
version = "6.1.0"
|
||||||
|
description = "the modular source code checker: pep8 pyflakes and co"
|
||||||
|
optional = false
|
||||||
|
python-versions = ">=3.8.1"
|
||||||
|
files = [
|
||||||
|
{file = "flake8-6.1.0-py2.py3-none-any.whl", hash = "sha256:ffdfce58ea94c6580c77888a86506937f9a1a227dfcd15f245d694ae20a6b6e5"},
|
||||||
|
{file = "flake8-6.1.0.tar.gz", hash = "sha256:d5b3857f07c030bdb5bf41c7f53799571d75c4491748a3adcd47de929e34cd23"},
|
||||||
|
]
|
||||||
|
|
||||||
|
[package.dependencies]
|
||||||
|
mccabe = ">=0.7.0,<0.8.0"
|
||||||
|
pycodestyle = ">=2.11.0,<2.12.0"
|
||||||
|
pyflakes = ">=3.1.0,<3.2.0"
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "greenlet"
|
name = "greenlet"
|
||||||
version = "2.0.2"
|
version = "2.0.2"
|
||||||
@ -670,6 +686,17 @@ files = [
|
|||||||
{file = "MarkupSafe-2.1.3.tar.gz", hash = "sha256:af598ed32d6ae86f1b747b82783958b1a4ab8f617b06fe68795c7f026abbdcad"},
|
{file = "MarkupSafe-2.1.3.tar.gz", hash = "sha256:af598ed32d6ae86f1b747b82783958b1a4ab8f617b06fe68795c7f026abbdcad"},
|
||||||
]
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "mccabe"
|
||||||
|
version = "0.7.0"
|
||||||
|
description = "McCabe checker, plugin for flake8"
|
||||||
|
optional = false
|
||||||
|
python-versions = ">=3.6"
|
||||||
|
files = [
|
||||||
|
{file = "mccabe-0.7.0-py2.py3-none-any.whl", hash = "sha256:6c2d30ab6be0e4a46919781807b4f0d834ebdd6c6e3dca0bda5a15f863427b6e"},
|
||||||
|
{file = "mccabe-0.7.0.tar.gz", hash = "sha256:348e0240c33b60bbdf4e523192ef919f28cb2c3d7d5c7794f74009290f236325"},
|
||||||
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "packaging"
|
name = "packaging"
|
||||||
version = "23.1"
|
version = "23.1"
|
||||||
@ -798,6 +825,17 @@ files = [
|
|||||||
{file = "pyasn1-0.5.0.tar.gz", hash = "sha256:97b7290ca68e62a832558ec3976f15cbf911bf5d7c7039d8b861c2a0ece69fde"},
|
{file = "pyasn1-0.5.0.tar.gz", hash = "sha256:97b7290ca68e62a832558ec3976f15cbf911bf5d7c7039d8b861c2a0ece69fde"},
|
||||||
]
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "pycodestyle"
|
||||||
|
version = "2.11.0"
|
||||||
|
description = "Python style guide checker"
|
||||||
|
optional = false
|
||||||
|
python-versions = ">=3.8"
|
||||||
|
files = [
|
||||||
|
{file = "pycodestyle-2.11.0-py2.py3-none-any.whl", hash = "sha256:5d1013ba8dc7895b548be5afb05740ca82454fd899971563d2ef625d090326f8"},
|
||||||
|
{file = "pycodestyle-2.11.0.tar.gz", hash = "sha256:259bcc17857d8a8b3b4a2327324b79e5f020a13c16074670f9c8c8f872ea76d0"},
|
||||||
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "pycparser"
|
name = "pycparser"
|
||||||
version = "2.21"
|
version = "2.21"
|
||||||
@ -962,6 +1000,17 @@ files = [
|
|||||||
pydantic = ">=2.0.1"
|
pydantic = ">=2.0.1"
|
||||||
python-dotenv = ">=0.21.0"
|
python-dotenv = ">=0.21.0"
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "pyflakes"
|
||||||
|
version = "3.1.0"
|
||||||
|
description = "passive checker of Python programs"
|
||||||
|
optional = false
|
||||||
|
python-versions = ">=3.8"
|
||||||
|
files = [
|
||||||
|
{file = "pyflakes-3.1.0-py2.py3-none-any.whl", hash = "sha256:4132f6d49cb4dae6819e5379898f2b8cce3c5f23994194c24b77d5da2e36f774"},
|
||||||
|
{file = "pyflakes-3.1.0.tar.gz", hash = "sha256:a0aae034c444db0071aa077972ba4768d40c830d9539fd45bf4cd3f8f6992efc"},
|
||||||
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "python-dotenv"
|
name = "python-dotenv"
|
||||||
version = "1.0.0"
|
version = "1.0.0"
|
||||||
@ -1316,4 +1365,4 @@ files = [
|
|||||||
[metadata]
|
[metadata]
|
||||||
lock-version = "2.0"
|
lock-version = "2.0"
|
||||||
python-versions = "^3.10"
|
python-versions = "^3.10"
|
||||||
content-hash = "2b3c19e4086c8115eff1b1cebe4d1db60dab98b6996cdd1c765f79f82dc7239d"
|
content-hash = "fd13e903aabf74c2a3811928381eddbd7b8e064a51fb4be5a954e7d9917cddc1"
|
||||||
|
@ -25,6 +25,7 @@ python-jose = {extras = ["cryptography"], version = "^3.3.0"}
|
|||||||
fastapi-mail = "^1.4.1"
|
fastapi-mail = "^1.4.1"
|
||||||
beautifulsoup4 = "^4.12.2"
|
beautifulsoup4 = "^4.12.2"
|
||||||
slowapi = "^0.1.8"
|
slowapi = "^0.1.8"
|
||||||
|
flake8 = "^6.1.0"
|
||||||
|
|
||||||
|
|
||||||
[build-system]
|
[build-system]
|
||||||
|
Loading…
x
Reference in New Issue
Block a user