diff --git a/kenar/addon.py b/kenar/addon.py index 13e6486..0f55c5b 100644 --- a/kenar/addon.py +++ b/kenar/addon.py @@ -17,7 +17,7 @@ class CreatePostAddonRequest(BaseModel): @field_serializer("widgets") def serialize_widgets(self, widgets, _info): - return {"widget_list": [w.serialize_model() for w in widgets]} + return [w.serialize_model() for w in widgets] class CreatePostAddonResponse(BaseModel): @@ -71,19 +71,22 @@ class PostAddon(BaseModel): semantic: Dict[str, str] = None semantic_sensitives: List[str] = None + class Config: + exclude= {"semantic_sensitives"} + + @field_validator("widgets", mode="before") @classmethod def deserialize_model(cls, widgets: Dict): - widget_list = widgets.get("widget_list", []) return [ - get_widget_class(w["widget_type"]).deserialize_model(w) for w in widget_list + get_widget_class(w.keys()).deserialize_model(w) for w in widgets ] @field_serializer("widgets") def serialize_widgets(self, widgets, _info): if widgets: p = [w.serialize_model() for w in widgets] - return {"widget_list": p} + return p return None @@ -121,11 +124,23 @@ class CreateUserAddonRequest(BaseModel): categories: List[str] ticket_uuid: Optional[str] = None verification_cost: Optional[int] = None + cost: Optional[int] = None + + @field_validator("cost", mode="before") + @classmethod + def set_cost_from_verification(cls, cost: Optional[int], values): + if cost is None and values.get("verification_cost") is not None: + return values.get("verification_cost") + return cost + + class Config: + exclude = {"verification_cost", "management_permalink", + "notes", "removal_permalink", "semantic_sensitives"} @field_serializer("widgets") def serialize_widgets(self, widgets, _info): p = [w.serialize_model() for w in widgets] - return {"widget_list": p} + return p class CreateUserAddonResponse(BaseModel): @@ -160,16 +175,15 @@ class UserAddon(BaseModel): @field_validator("widgets", mode="before") @classmethod def deserialize_model(cls, widgets: Dict): - widget_list = widgets.get("widget_list", []) return [ - get_widget_class(w["widget_type"]).deserialize_model(w) for w in widget_list + get_widget_class(w.keys()).deserialize_model(w) for w in widgets ] @field_serializer("widgets") def serialize_widgets(self, widgets, _info): if widgets: p = [w.serialize_model() for w in widgets] - return {"widget_list": p} + return p return None diff --git a/kenar/app.py b/kenar/app.py index 0554992..66779cb 100644 --- a/kenar/app.py +++ b/kenar/app.py @@ -188,8 +188,8 @@ def create_user_addon( @retry(max_retries=max_retry, delay=retry_delay) def send_request(): return self._client.post( - url=f"/v1/open-platform/addons/user/{data.phone}", - content=data.json(), + url=f"/v2/open-platform/addons/user/{data.phone}", + content=data.model_dump_json(), headers={ACCESS_TOKEN_HEADER_NAME: access_token}, ) @@ -222,7 +222,7 @@ def get_user_addons( def send_request(): return self._client.get( url=f"/v1/open-platform/addons/user/{data.phone}", - params=data.json(), + params=data.model_dump_json(), ) rsp = send_request() @@ -238,8 +238,8 @@ def create_post_addon( @retry(max_retries=max_retry, delay=retry_delay) def send_request(): return self._client.post( - url=f"/v1/open-platform/addons/post/{data.token}", - content=data.json(), + url=f"/v2/open-platform/addons/post/{data.token}", + content=data.model_dump_json(exclude={"token"}), headers={ACCESS_TOKEN_HEADER_NAME: access_token}, ) diff --git a/kenar/widgets/__init__.py b/kenar/widgets/__init__.py index eeac179..808dc98 100644 --- a/kenar/widgets/__init__.py +++ b/kenar/widgets/__init__.py @@ -4,7 +4,6 @@ from .event_row import EventRow from .group_info_row import GroupInfo from .image_carousel_row import ImageCarouselRow -from .legend_title_row import LegendTitleRow from .score_row import ScoreRow from .selector_row import SelectorRow from .subtitle_row import SubtitleRow diff --git a/kenar/widgets/action.py b/kenar/widgets/action.py index 847db3a..8fdbe24 100644 --- a/kenar/widgets/action.py +++ b/kenar/widgets/action.py @@ -5,12 +5,7 @@ def get_action(link: str) -> Dict: return ( { "action": { - "type": "LOAD_WEB_VIEW_PAGE", - "fallback_link": link, - "payload": { - "@type": "type.googleapis.com/widgets.LoadWebViewPagePayload", - "url": link, - }, + "open_direct_link": link, } } if len(link) > 0 @@ -19,4 +14,4 @@ def get_action(link: str) -> Dict: def get_link_from_action(action: Dict) -> str: - return action["payload"]["url"] + return action.get("open_direct_link", "") diff --git a/kenar/widgets/color.py b/kenar/widgets/color.py index 5c59328..23b9187 100644 --- a/kenar/widgets/color.py +++ b/kenar/widgets/color.py @@ -2,17 +2,9 @@ class Color(Enum): + COLOR_UNSPECIFIED = "COLOR_UNSPECIFIED" SUCCESS_PRIMARY = "SUCCESS_PRIMARY" SUCCESS_SECONDARY = "SUCCESS_SECONDARY" WARNING_PRIMARY = "WARNING_PRIMARY" WARNING_SECONDARY = "WARNING_SECONDARY" ERROR_PRIMARY = "ERROR_PRIMARY" - TEXT_PRIMARY = "TEXT_PRIMARY" - TEXT_SECONDARY = "TEXT_SECONDARY" - TEXT_HINT = "TEXT_HINT" - TEXT_DIVIDER = "TEXT_DIVIDER" - ICON_PRIMARY = "ICON_PRIMARY" - ICON_SECONDARY = "ICON_SECONDARY" - ICON_HINT = "ICON_HINT" - ICON_DIVIDER = "ICON_DIVIDER" - WHITE_PRIMARY = "WHITE_PRIMARY" diff --git a/kenar/widgets/description_row.py b/kenar/widgets/description_row.py index ca1dc37..4bd2abe 100644 --- a/kenar/widgets/description_row.py +++ b/kenar/widgets/description_row.py @@ -9,7 +9,7 @@ class DescriptionRow(BaseModel, BaseWidget): text: str has_divider: bool = False - is_primary: bool + is_primary: bool = False expandable: bool = False padded: bool = False preview_max_line: int = 0 @@ -26,13 +26,10 @@ def check_preview_max_line(self) -> Self: def serialize_model(self) -> dict: return { - "widget_type": "DESCRIPTION_ROW", - "data": {"@type": "type.googleapis.com/widgets.DescriptionRowData"} - | self.model_dump(), + "description_row": self.model_dump(exclude={"is_primary", "padded"}), } @classmethod def deserialize_model(cls, data: Dict): - widget_data = data.get("data", {}) - widget_data.pop("@type", None) - return cls.parse_obj(widget_data) + widget_data = data.get("description_row", {}) + return cls.model_validate(widget_data) diff --git a/kenar/widgets/evaluation_row.py b/kenar/widgets/evaluation_row.py index a073917..fe0d0f2 100644 --- a/kenar/widgets/evaluation_row.py +++ b/kenar/widgets/evaluation_row.py @@ -2,7 +2,7 @@ from pydantic import BaseModel, field_validator -from kenar.icons import Icon +from kenar.icons import Icon, IconName from kenar.widgets.base import BaseWidget from kenar.widgets.color import Color @@ -10,15 +10,19 @@ class EvaluationRow(BaseModel, BaseWidget): class Section(BaseModel): text: str - text_color: Color + text_color: Color = Color.COLOR_UNSPECIFIED section_color: Color + class Config: + exclude = {"text_color"} + + indicator_text: str indicator_percentage: int - indicator_icon: Icon + indicator_icon: Icon = Icon(icon_name=IconName.UNKNOWN) - indicator_color: Color + indicator_color: Color = Color.COLOR_UNSPECIFIED left: Section middle: Section @@ -33,13 +37,15 @@ def check_indicator_percentage(cls, indicator_percentage: int) -> int: def serialize_model(self) -> dict: return { - "widget_type": "EVALUATION_ROW", - "data": {"@type": "type.googleapis.com/widgets.EvaluationRowData"} - | self.model_dump(), + "evaluation_row": self.model_dump(exclude={"indicator_color", "indicator_icon"}) + | self.indicator_icon.model_dump() , } @classmethod def deserialize_model(cls, data: Dict): - widget_data = data.get("data", {}) - widget_data.pop("@type", None) - return cls.parse_obj(widget_data) + widget_data = data.get("evaluation_row", {}) + + widget_data["icon"] = { + "icon_name": "UNKNOWN" + } + return cls.model_validate(widget_data) diff --git a/kenar/widgets/event_row.py b/kenar/widgets/event_row.py index a70fded..c429168 100644 --- a/kenar/widgets/event_row.py +++ b/kenar/widgets/event_row.py @@ -3,7 +3,7 @@ from pydantic import BaseModel -from kenar.icons import Icon +from kenar.icons import Icon, IconName from kenar.widgets.action import get_action, get_link_from_action from kenar.widgets.base import BaseWidget @@ -17,21 +17,27 @@ class EventRow(BaseModel, BaseWidget): has_divider: bool = False link: str = "" padded: bool = False - icon: Icon + icon: Icon = Icon(icon_name=IconName.UNKNOWN) def serialize_model(self) -> dict: return { - "widget_type": "EVENT_ROW", - "data": {"@type": "type.googleapis.com/widgets.EventRowData"} - | self.dict(exclude={"link"}) - | get_action(link=self.link), + "event_row": self.model_dump(exclude={"link", "icon", "image_url"}) + | get_action(link=self.link) | {"image_id": self.image_url} | self.icon.model_dump() } + class Config: + exclude = {"padded", "has_indicator"} + @classmethod def deserialize_model(cls, data: Dict): - widget_data = data.get("data", {}) - widget_data.pop("@type", None) + widget_data = data.get("event_row", {}) if "action" in widget_data: widget_data["link"] = get_link_from_action(widget_data["action"]) widget_data.pop("action", None) - return cls.parse_obj(widget_data) + widget_data["image_url"] = widget_data.pop("image_id", "") + + widget_data["icon"] = { + "icon_name": widget_data.pop("icon_name", "UNKNOWN") + } + + return cls.model_validate(widget_data) diff --git a/kenar/widgets/group_info_row.py b/kenar/widgets/group_info_row.py index ea361cf..b650327 100644 --- a/kenar/widgets/group_info_row.py +++ b/kenar/widgets/group_info_row.py @@ -22,12 +22,10 @@ def check_items_length(cls, items: List[GroupInfoItem]) -> List[GroupInfoItem]: def serialize_model(self) -> dict: return { - "widget_type": "GROUP_INFO_ROW", - "data": {"@type": "type.googleapis.com/widgets.GroupInfoRow"} | self.dict(), + "group_info_row": self.model_dump(), } @classmethod def deserialize_model(cls, data: Dict): - widget_data = data.get("data", {}) - widget_data.pop("@type", None) + widget_data = data.get("group_info_row", {}) return cls.parse_obj(widget_data) diff --git a/kenar/widgets/image_carousel_row.py b/kenar/widgets/image_carousel_row.py index cc7e0b2..ded011b 100644 --- a/kenar/widgets/image_carousel_row.py +++ b/kenar/widgets/image_carousel_row.py @@ -11,18 +11,22 @@ class ImageCarouselRowItem(BaseModel): image_url: str description: str + def serialize_model(self) -> dict: + return { + "image_id" : self.image_url, + "description": self.description + } + items: List[ImageCarouselRowItem] has_divider: bool = False def serialize_model(self) -> dict: return { - "widget_type": "IMAGE_CAROUSEL_ROW", - "data": {"@type": "type.googleapis.com/widgets.ImageCarouselRowData"} | self.dict(), + "image_carousel_row": self.model_dump(), } @classmethod def deserialize_model(cls, data: Dict): - widget_data = data.get("data", {}) - widget_data.pop("@type", None) - return cls.parse_obj(widget_data) + widget_data = data.get("image_carousel_row", {}) + return cls.model_validate(widget_data) diff --git a/kenar/widgets/legend_title_row.py b/kenar/widgets/legend_title_row.py deleted file mode 100644 index 65f57eb..0000000 --- a/kenar/widgets/legend_title_row.py +++ /dev/null @@ -1,38 +0,0 @@ -from enum import Enum -from typing import List, Dict - -from pydantic import BaseModel, Field - -from kenar.icons import Icon -from kenar.widgets.base import BaseWidget - - -class LegendTitleRow(BaseModel, BaseWidget): - class Tag(BaseModel): - class BackgroundColor(str, Enum): - TRANSPARENT = "TRANSPARENT" - GRAY = "GRAY" - RED = "RED" - - text: str - icon: Icon - bg_color: BackgroundColor - - title: str - subtitle: str - has_divider: bool = False - image_url: str = Field(..., min_length=1) - tags: List[Tag] - - def serialize_model(self) -> dict: - return { - "widget_type": "LEGEND_TITLE_ROW", - "data": {"@type": "type.googleapis.com/widgets.LegendTitleRowData"} - | self.dict(), - } - - @classmethod - def deserialize_model(cls, data: Dict): - widget_data = data.get("data", {}) - widget_data.pop("@type", None) - return cls.parse_obj(widget_data) diff --git a/kenar/widgets/score_row.py b/kenar/widgets/score_row.py index 8802f17..eb99912 100644 --- a/kenar/widgets/score_row.py +++ b/kenar/widgets/score_row.py @@ -6,7 +6,7 @@ from kenar.widgets.base import BaseWidget from kenar.widgets.color import Color from kenar.widgets.action import get_action, get_link_from_action -from kenar.icons import Icon +from kenar.icons import Icon, IconName class ScoreRow(BaseModel, BaseWidget): @@ -18,7 +18,7 @@ class ScoreRow(BaseModel, BaseWidget): score_color: Color link: str has_divider: bool = False - icon: Icon = None + icon: Icon = Icon(icon_name=IconName.UNKNOWN) @model_validator(mode="after") def check_score(self) -> Self: @@ -33,17 +33,20 @@ def check_score(self) -> Self: def serialize_model(self) -> dict: return { - "widget_type": "SCORE_ROW", - "data": {"@type": "type.googleapis.com/widgets.ScoreRowData"} - | self.dict(exclude={"link"}) + "score_row": self.model_dump(exclude={"link", "icon"}) + | self.icon.model_dump() | get_action(link=self.link), } @classmethod def deserialize_model(cls, data: Dict): - widget_data = data.get("data", {}) - widget_data.pop("@type", None) + widget_data = data.get("score_row", {}) if "action" in widget_data: widget_data["link"] = get_link_from_action(widget_data["action"]) widget_data.pop("action", None) - return cls.parse_obj(widget_data) + + widget_data["icon"] = { + "icon_name": widget_data.pop("icon_name", "UNKNOWN") + } + + return cls.model_validate(widget_data) diff --git a/kenar/widgets/selector_row.py b/kenar/widgets/selector_row.py index 95b9a02..efd120f 100644 --- a/kenar/widgets/selector_row.py +++ b/kenar/widgets/selector_row.py @@ -2,7 +2,7 @@ from pydantic import BaseModel -from kenar.icons import Icon +from kenar.icons import Icon, IconName from kenar.widgets.action import get_action, get_link_from_action from kenar.widgets.base import BaseWidget @@ -13,7 +13,7 @@ class SelectorRow(BaseModel, BaseWidget): has_divider: bool = False has_notification: bool = False - icon: Icon + icon: Icon = Icon(icon_name=IconName.UNKNOWN) has_arrow: bool = False @@ -21,18 +21,19 @@ class SelectorRow(BaseModel, BaseWidget): def serialize_model(self) -> dict: return { - "widget_type": "SELECTOR_ROW", - "data": {"@type": "type.googleapis.com/widgets.SelectorRowData"} - | self.dict(exclude={"link"}) - | {"small": True} - | get_action(link=self.link), + "selector_row": self.model_dump(exclude={"link", "icon"}) + | get_action(link=self.link) | self.icon.model_dump(), } + class Config: + exclude = {"has_arrow"} + @classmethod def deserialize_model(cls, data: Dict): - widget_data = data.get("data", {}) - widget_data.pop("@type", None) + widget_data = data.get("selector_row", {}) if "action" in widget_data: widget_data["link"] = get_link_from_action(widget_data["action"]) widget_data.pop("action", None) - return cls.parse_obj(widget_data) + if "icon_name" in widget_data: + widget_data["icon"] = Icon(icon_name=widget_data.pop("icon_name")) + return cls.model_validate(widget_data) diff --git a/kenar/widgets/subtitle_row.py b/kenar/widgets/subtitle_row.py index 6d16813..616c530 100644 --- a/kenar/widgets/subtitle_row.py +++ b/kenar/widgets/subtitle_row.py @@ -11,13 +11,10 @@ class SubtitleRow(BaseModel, BaseWidget): def serialize_model(self) -> dict: return { - "widget_type": "SUBTITLE_ROW", - "data": {"@type": "type.googleapis.com/widgets.SubtitleRowData"} - | self.dict(), + "subtitle_row": self.model_dump() } @classmethod def deserialize_model(cls, data: Dict): - widget_data = data.get("data", {}) - widget_data.pop("@type", None) - return cls.parse_obj(widget_data) + widget_data = data.get("subtitle_row", {}) + return cls.model_validate(widget_data) diff --git a/kenar/widgets/title_row.py b/kenar/widgets/title_row.py index 7533e70..7648f2d 100644 --- a/kenar/widgets/title_row.py +++ b/kenar/widgets/title_row.py @@ -8,17 +8,17 @@ class TitleRow(BaseModel, BaseWidget): text: str - text_color: Color = Color.TEXT_PRIMARY + text_color: Color = Color.COLOR_UNSPECIFIED def serialize_model(self) -> dict: return { - "widget_type": "TITLE_ROW", - "data": {"@type": "type.googleapis.com/widgets.TitleRowData"} - | self.model_dump(), + "title_row": self.model_dump() } + class Config: + exclude = {"text_color"} + @classmethod def deserialize_model(cls, data: Dict): - widget_data = data.get("data", {}) - widget_data.pop("@type", None) - return cls.parse_obj(widget_data) + widget_data = data.get("title_row", {}) + return cls.model_validate(widget_data) diff --git a/kenar/widgets/wide_button_bar.py b/kenar/widgets/wide_button_bar.py index be7afb0..419f4cc 100644 --- a/kenar/widgets/wide_button_bar.py +++ b/kenar/widgets/wide_button_bar.py @@ -27,14 +27,12 @@ def deserialize_button(cls, data: Dict) -> Dict: def serialize_model(self) -> dict: return { - "widget_type": "WIDE_BUTTON_BAR", - "data": {"@type": "type.googleapis.com/widgets.WideButtonBarWidgetData"} - | self.dict(exclude={"style"}) - | {"style": "SECONDARY"}, + "button_bar": self.button.model_dump(), } @classmethod def deserialize_model(cls, data: Dict): - widget_data = data.get("data", {}) - widget_data.pop("@type", None) - return cls.parse_obj(widget_data) + widget_data = data.get("button_bar", {}) + return cls.model_validate({ + "button": widget_data, + }) diff --git a/kenar/widgets/widget_type.py b/kenar/widgets/widget_type.py index b1c0df3..dae47ac 100644 --- a/kenar/widgets/widget_type.py +++ b/kenar/widgets/widget_type.py @@ -1,11 +1,11 @@ -from typing import Optional, Type, Union +from typing import List, Type, Union + from kenar.widgets.description_row import DescriptionRow from kenar.widgets.evaluation_row import EvaluationRow from kenar.widgets.event_row import EventRow from kenar.widgets.group_info_row import GroupInfo from kenar.widgets.image_carousel_row import ImageCarouselRow -from kenar.widgets.legend_title_row import LegendTitleRow from kenar.widgets.score_row import ScoreRow from kenar.widgets.selector_row import SelectorRow from kenar.widgets.subtitle_row import SubtitleRow @@ -18,7 +18,6 @@ EventRow, GroupInfo, ImageCarouselRow, - LegendTitleRow, ScoreRow, SelectorRow, SubtitleRow, @@ -27,21 +26,21 @@ ] -def get_widget_class(widget_type: str) -> Optional[Type[WidgetTypesUnion]]: +def get_widget_class(keys: List[str]) -> Type[WidgetTypesUnion]: widget_type_to_class = { - "DESCRIPTION_ROW": DescriptionRow, - "EVALUATION_ROW": EvaluationRow, - "EVENT_ROW": EventRow, - "GROUP_INFO_ROW": GroupInfo, - "LEGEND_TITLE_ROW": LegendTitleRow, - "SCORE_ROW": ScoreRow, - "SELECTOR_ROW": SelectorRow, - "SUBTITLE_ROW": SubtitleRow, - "TITLE_ROW": TitleRow, - "WIDE_BUTTON_BAR": WideButtonBar, - "IMAGE_CAROUSEL_ROW": ImageCarouselRow, + "description_row": DescriptionRow, + "evaluation_row": EvaluationRow, + "event_row": EventRow, + "group_info_row": GroupInfo, + "score_row": ScoreRow, + "selector_row": SelectorRow, + "subtitle_row": SubtitleRow, + "title_row": TitleRow, + "button_bar": WideButtonBar, + "image_carousel_row": ImageCarouselRow, } - widget_class = widget_type_to_class.get(widget_type) - if not widget_class: - raise ValueError(f"Unsupported widget_type {widget_type}") - return widget_class + + for k in keys: + if k in widget_type_to_class: + return widget_type_to_class[k] + raise ValueError("Unsupported widget") diff --git a/sample.jpg b/sample.jpg new file mode 100644 index 0000000..f87c517 Binary files /dev/null and b/sample.jpg differ diff --git a/samples/sample_addon.py b/samples/sample_addon.py index 8898e4f..38b6c0b 100644 --- a/samples/sample_addon.py +++ b/samples/sample_addon.py @@ -11,7 +11,6 @@ SubtitleRow, SelectorRow, ScoreRow, - LegendTitleRow, GroupInfo, EventRow, EvaluationRow, @@ -29,7 +28,7 @@ # create widgets for addon title_row = TitleRow( - text="این یک نمونه تایتل میباشد", text_color=Color.TEXT_SECONDARY + text="این یک نمونه تایتل میباشد", text_color=Color.COLOR_UNSPECIFIED ) subtitle_row = SubtitleRow(text="این یک سابتایتل میباشد") @@ -49,18 +48,18 @@ indicator_color=Color.SUCCESS_PRIMARY, left=EvaluationRow.Section( text="سمت چپ", - text_color=Color.TEXT_SECONDARY, + text_color=Color.COLOR_UNSPECIFIED, section_color=Color.SUCCESS_PRIMARY, ), middle=EvaluationRow.Section( text="وسط", - text_color=Color.TEXT_SECONDARY, - section_color=Color.TEXT_PRIMARY, + text_color=Color.COLOR_UNSPECIFIED, + section_color=Color.WARNING_PRIMARY, ), right=EvaluationRow.Section( text="سمت راستی", - text_color=Color.TEXT_SECONDARY, - section_color=Color.TEXT_SECONDARY, + text_color=Color.COLOR_UNSPECIFIED, + section_color=Color.COLOR_UNSPECIFIED, ), ) @@ -85,34 +84,10 @@ ], ) - legend_title_row = LegendTitleRow( - title="ارائه خدمت با کنار دیوار", - subtitle="", - has_divider=True, - image_url="logo", - tags=[ - LegendTitleRow.Tag( - text="احراز", - icon=Icon(icon_name=IconName.VERIFIED), - bg_color=LegendTitleRow.Tag.BackgroundColor.GRAY, - ), - LegendTitleRow.Tag( - text="کارشناسی", - icon=Icon(icon_name=IconName.CAR_INSPECTED), - bg_color=LegendTitleRow.Tag.BackgroundColor.TRANSPARENT, - ), - LegendTitleRow.Tag( - text="پرداخت امن", - icon=Icon(icon_name=IconName.ADD), - bg_color=LegendTitleRow.Tag.BackgroundColor.RED, - ), - ], - ) - score_row_1 = ScoreRow( title="مدل امتیاز کیفی", descriptive_score="بسیار عالی", - score_color=Color.TEXT_SECONDARY, + score_color=Color.COLOR_UNSPECIFIED, link="", has_divider=True, icon=Icon(icon_name=IconName.ADD), @@ -121,7 +96,7 @@ score_row_2 = ScoreRow( title="مدل امتیاز درصدی", percentage_score=100, - score_color=Color.TEXT_SECONDARY, + score_color=Color.COLOR_UNSPECIFIED, link="", has_divider=True, icon=Icon(icon_name=IconName.ADD), diff --git a/samples/sample_app.py b/samples/sample_app.py index 6f89d70..d8f3354 100644 --- a/samples/sample_app.py +++ b/samples/sample_app.py @@ -1,12 +1,8 @@ import logging import os -from dotenv import load_dotenv - from kenar import ClientConfig, Client -load_dotenv() - logging.basicConfig(level=logging.INFO) client_conf = ClientConfig( diff --git a/setup.py b/setup.py index 8c0b948..2ea6337 100644 --- a/setup.py +++ b/setup.py @@ -2,9 +2,9 @@ setup( name='Kenar', - version='0.5.9', - author='Nastaran Alipour', - author_email='nastaran.alipour78@gmail.com', + version='0.6.0', + author='Kenar', + author_email='kenar@divar.ir', description='facilitate using kenar divar APIs', long_description=open('README.md').read(), long_description_content_type='text/markdown',