RubigramClient 1.2.0__tar.gz → 1.3.1__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of RubigramClient might be problematic. Click here for more details.

@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: RubigramClient
3
- Version: 1.2.0
3
+ Version: 1.3.1
4
4
  Summary: A simple and flexible Python library for building advanced Rubika bots with powerful message handling, inline buttons, and custom filters.
5
5
  Author-email: Javad RZ <Javad.Py1385@gmail.com>
6
6
  Classifier: Programming Language :: Python :: 3
@@ -9,16 +9,18 @@ Classifier: Operating System :: OS Independent
9
9
  Requires-Python: >=3.7
10
10
  Description-Content-Type: text/markdown
11
11
  License-File: LICENSE
12
+ Requires-Dist: aiohttp>=3.8.0
13
+ Requires-Dist: pydantic<3.0,>=2.0
12
14
  Dynamic: license-file
13
15
 
14
16
  # Rubigram
15
-
16
17
  A lightweight Python library to build Rubika bots easily.
17
18
 
18
19
  ## Installation
19
20
  ```bash
20
21
  pip install RubigramClient
21
-
22
+ ```
23
+ ## Example
22
24
  ```python
23
25
  from rubigram import Client, filters
24
26
  from rubigram.types import Update
@@ -1,11 +1,11 @@
1
1
  # Rubigram
2
-
3
2
  A lightweight Python library to build Rubika bots easily.
4
3
 
5
4
  ## Installation
6
5
  ```bash
7
6
  pip install RubigramClient
8
-
7
+ ```
8
+ ## Example
9
9
  ```python
10
10
  from rubigram import Client, filters
11
11
  from rubigram.types import Update
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: RubigramClient
3
- Version: 1.2.0
3
+ Version: 1.3.1
4
4
  Summary: A simple and flexible Python library for building advanced Rubika bots with powerful message handling, inline buttons, and custom filters.
5
5
  Author-email: Javad RZ <Javad.Py1385@gmail.com>
6
6
  Classifier: Programming Language :: Python :: 3
@@ -9,16 +9,18 @@ Classifier: Operating System :: OS Independent
9
9
  Requires-Python: >=3.7
10
10
  Description-Content-Type: text/markdown
11
11
  License-File: LICENSE
12
+ Requires-Dist: aiohttp>=3.8.0
13
+ Requires-Dist: pydantic<3.0,>=2.0
12
14
  Dynamic: license-file
13
15
 
14
16
  # Rubigram
15
-
16
17
  A lightweight Python library to build Rubika bots easily.
17
18
 
18
19
  ## Installation
19
20
  ```bash
20
21
  pip install RubigramClient
21
-
22
+ ```
23
+ ## Example
22
24
  ```python
23
25
  from rubigram import Client, filters
24
26
  from rubigram.types import Update
@@ -4,6 +4,7 @@ pyproject.toml
4
4
  RubigramClient.egg-info/PKG-INFO
5
5
  RubigramClient.egg-info/SOURCES.txt
6
6
  RubigramClient.egg-info/dependency_links.txt
7
+ RubigramClient.egg-info/requires.txt
7
8
  RubigramClient.egg-info/top_level.txt
8
9
  rubigram/__init__.py
9
10
  rubigram/client.py
@@ -0,0 +1,2 @@
1
+ aiohttp>=3.8.0
2
+ pydantic<3.0,>=2.0
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "RubigramClient"
3
- version = "1.2.0"
3
+ version = "1.3.1"
4
4
  description = "A simple and flexible Python library for building advanced Rubika bots with powerful message handling, inline buttons, and custom filters."
5
5
  readme = "README.md"
6
6
  requires-python = ">=3.7"
@@ -12,4 +12,8 @@ classifiers = [
12
12
  "Programming Language :: Python :: 3",
13
13
  "License :: OSI Approved :: MIT License",
14
14
  "Operating System :: OS Independent",
15
+ ]
16
+ dependencies = [
17
+ "aiohttp>=3.8.0",
18
+ "pydantic>=2.0,<3.0"
15
19
  ]
@@ -5,16 +5,15 @@ import aiofiles
5
5
 
6
6
 
7
7
  class Client:
8
- def __init__(self, token: str, webhook_url: str = "0.0.0.0", port: int = 5000):
8
+ def __init__(self, token: str):
9
9
  self.token = token
10
- self.webhook = webhook_url
11
- self.port = port
12
10
  self.messages_handler = []
13
- self.api = "https://botapi.rubika.ir/v3"
11
+ self.api = f"https://botapi.rubika.ir/v3/{self.token}"
14
12
 
15
13
  async def request(self, method: str, data: dict):
16
14
  async with ClientSession() as session:
17
- async with session.post(f"{self.api}/{self.token}/{method}", json=data) as response:
15
+ async with session.post(f"{self.api}/{method}", json=data) as response:
16
+ response.raise_for_status()
18
17
  return await response.json()
19
18
 
20
19
  def on_message(self, *filters):
@@ -315,4 +314,4 @@ class Client:
315
314
  return web.json_response({"status": "ok"})
316
315
  app = web.Application()
317
316
  app.add_routes(routes)
318
- web.run_app(app, host=self.webhook, port=self.port)
317
+ web.run_app(app, host="0.0.0.0", port=8000)
File without changes
File without changes