cent
Advanced tools
@@ -85,6 +85,9 @@ from typing import Optional, Any, cast | ||
| """ | ||
| :param api_url: Centrifugo API URL | ||
| :param api_key: Centrifugo API key | ||
| :param timeout: Base timeout for all requests | ||
| :param session: Custom `aiohttp` session | ||
| Creates new AsyncClient instance. | ||
| Args: | ||
| api_url (str): Centrifugo API URL. | ||
| api_key (str): Centrifugo API key. | ||
| timeout (float): Base timeout for all requests in seconds. | ||
| session (aiohttp.ClientSession): Custom `aiohttp` session. | ||
| """ | ||
@@ -91,0 +94,0 @@ self._api_key = api_key |
@@ -84,6 +84,9 @@ from typing import Optional, Any, cast | ||
| """ | ||
| :param api_url: Centrifugo API URL | ||
| :param api_key: Centrifugo API key | ||
| :param timeout: Base timeout for all requests. | ||
| :param session: Custom `requests` session. | ||
| Creates new Client instance. | ||
| Args: | ||
| api_url (str): Centrifugo API URL. | ||
| api_key (str): Centrifugo API key. | ||
| timeout (float): Base timeout for all requests in seconds. | ||
| session (requests.Session): Custom `requests` session. | ||
| """ | ||
@@ -90,0 +93,0 @@ |
+17
-17
@@ -175,4 +175,4 @@ import json | ||
| offset: int | ||
| epoch: str | ||
| offset: int = 0 | ||
| epoch: str = "" | ||
@@ -700,4 +700,4 @@ | ||
| user: str | ||
| active: Optional[int] = None | ||
| online: Optional[int] = None | ||
| active: int = 0 | ||
| online: int = 0 | ||
@@ -836,3 +836,3 @@ | ||
| timezone: Optional[str] = None | ||
| language: Optional[str] = None | ||
| locale: Optional[str] = None | ||
| meta: Optional[Dict[str, str]] = None | ||
@@ -858,8 +858,8 @@ topics: Optional[List[str]] = None | ||
| class DeviceLanguageUpdate(NestedModel): | ||
| class DeviceLocaleUpdate(NestedModel): | ||
| """ | ||
| Device language update. | ||
| Device locale update. | ||
| """ | ||
| language: str | ||
| locale: str | ||
@@ -902,3 +902,3 @@ | ||
| timezone_update: Optional[DeviceTimezoneUpdate] = None | ||
| language_update: Optional[DeviceLanguageUpdate] = None | ||
| locale_update: Optional[DeviceLocaleUpdate] = None | ||
| meta_update: Optional[DeviceMetaUpdate] = None | ||
@@ -944,8 +944,8 @@ topics_update: Optional[DeviceTopicsUpdate] = None | ||
| id: str | ||
| platform: str | ||
| provider: str | ||
| token: str | ||
| platform: str = "" | ||
| provider: str = "" | ||
| token: str = "" | ||
| user: str = "" | ||
| created_at: int | ||
| updated_at: int | ||
| created_at: int = 0 | ||
| updated_at: int = 0 | ||
| meta: Optional[Dict[str, str]] = None | ||
@@ -1045,3 +1045,3 @@ topics: Optional[List[str]] = None | ||
| id: str | ||
| user: str | ||
| user: str = "" | ||
| topic: str | ||
@@ -1181,3 +1181,3 @@ | ||
| policies: List[RateLimitPolicy] | ||
| drop_if_rate_limited: bool = False | ||
| drop_if_rate_limited: Optional[bool] = False | ||
@@ -1188,3 +1188,3 @@ | ||
| send_before_time: str # use "%H:%M:%S" format, ex. "18:00:00" | ||
| no_tz_send_now: bool = False | ||
| no_tz_send_now: Optional[bool] = False | ||
@@ -1191,0 +1191,0 @@ |
+3
-3
| Metadata-Version: 2.1 | ||
| Name: cent | ||
| Version: 5.0.0b1 | ||
| Version: 5.0.0 | ||
| Summary: Python library to communicate with Centrifugo v5 server HTTP API | ||
| License: MIT | ||
| Author: Alexandr Emelin | ||
| Author: Alexander Emelin | ||
| Requires-Python: >=3.9,<4.0 | ||
@@ -262,5 +262,5 @@ Classifier: Development Status :: 5 - Production/Stable | ||
| * Client constructor slightly changed, refer to the examples above. | ||
| * To call desired API import and construct a request object (inherited from Pydantic `BaseModel`) and pass it to `send` method of the client. | ||
| * To call desired API import and construct a request object (inherited from Pydantic `BaseModel`) and then call corresponding method of client. This should feel very similar to how GRPC is usually structured. | ||
| * Base exception class is now `CentError` instead of `CentException`, exceptions SDK raises were refactored. | ||
| * To send multiple commands in one HTTP request SDK provides `batch` method. | ||
+2
-2
| [tool.poetry] | ||
| name = "cent" | ||
| version = "5.0.0b1" | ||
| version = "5.0.0" | ||
| description = "Python library to communicate with Centrifugo v5 server HTTP API" | ||
| authors = ["Alexandr Emelin", "Katant Savelev"] | ||
| authors = ["Alexander Emelin", "Katant Savelev", "Bogdan Evstratenko"] | ||
| license = "MIT" | ||
@@ -7,0 +7,0 @@ readme = 'README.md' |
+1
-1
@@ -231,4 +231,4 @@ Python SDK to communicate with Centrifugo v5 HTTP API. Python >= 3.9 supported. | ||
| * Client constructor slightly changed, refer to the examples above. | ||
| * To call desired API import and construct a request object (inherited from Pydantic `BaseModel`) and pass it to `send` method of the client. | ||
| * To call desired API import and construct a request object (inherited from Pydantic `BaseModel`) and then call corresponding method of client. This should feel very similar to how GRPC is usually structured. | ||
| * Base exception class is now `CentError` instead of `CentException`, exceptions SDK raises were refactored. | ||
| * To send multiple commands in one HTTP request SDK provides `batch` method. |
Alert delta unavailable
Currently unable to show alert delta for PyPI packages.
82520
0.45%1915
0.21%