gengineapi 0.2.1__py3-none-any.whl → 0.2.2__py3-none-any.whl

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.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: gengineapi
3
- Version: 0.2.1
3
+ Version: 0.2.2
4
4
  Summary: G-Engine API Client
5
5
  Requires-Python: >=3.13
6
6
  Description-Content-Type: text/markdown
@@ -39,6 +39,47 @@ pip install aiohttp-socks
39
39
 
40
40
  ## Использование
41
41
 
42
+ ### Быстрый старт
43
+
44
+ ```python
45
+ import os
46
+ import asyncio
47
+ import logging
48
+ from gengineapi import ClientFarm
49
+ from dotenv import load_dotenv
50
+
51
+ load_dotenv()
52
+
53
+ GTOKEN = os.getenv("GTOKEN")
54
+
55
+ # Настройка логирования
56
+ logging.basicConfig(
57
+ level=logging.INFO,
58
+ format='%(asctime)s - %(name)s - %(levelname)s - %(message)s'
59
+ )
60
+ logger = logging.getLogger("gengine")
61
+
62
+ gfarm = ClientFarm(logger=logger)
63
+
64
+ gfarm.create_config(name="base",
65
+ base_url="https://b2b-api.ggsel.com/api/v2",
66
+ jwt_token=GTOKEN,
67
+ timeout=60,
68
+ max_retries=5,
69
+ proxy="socks5://username:password@host:port") # Прокси опциональные
70
+
71
+ async def main():
72
+ client = await gfarm.get_client("base")
73
+
74
+ async with client:
75
+ me = await client.users.get_me()
76
+
77
+ logger.info(me)
78
+
79
+
80
+ if __name__ == "__main__":
81
+ asyncio.run(main())
82
+ ```
42
83
  ### Инициализация с существующим токеном
43
84
 
44
85
  ```python
@@ -12,7 +12,7 @@ gengineapi/modules/finances.py,sha256=fwOWo1LI56ZC3qlTG-tv_cqbI7RyCPYQSNOT5r6VzT
12
12
  gengineapi/modules/payments.py,sha256=dwOqQcwsq256OQKzXJUn8a0H6krsf3Rb73KdAaRcEnw,4634
13
13
  gengineapi/modules/transactions.py,sha256=QUtTxzTFsLesqog9Da6H-pdq5DP0sgh9w2cIlZQiKCk,2932
14
14
  gengineapi/modules/users.py,sha256=WQyI37MVBAzqDE3i1LPpV2G5g_1cGvQh0vLomTF4vkI,4291
15
- gengineapi-0.2.1.dist-info/METADATA,sha256=71x8AJT5gNd2w6ULVBR_APLwpBiYpKFMAkqVdW_5xoc,10261
16
- gengineapi-0.2.1.dist-info/WHEEL,sha256=0CuiUZ_p9E4cD6NyLD6UG80LBXYyiSYZOKDm5lp32xk,91
17
- gengineapi-0.2.1.dist-info/top_level.txt,sha256=mYdcVWOxFzj4EzoczGzeT-ccVrNEjNI98w2JW51wnfk,11
18
- gengineapi-0.2.1.dist-info/RECORD,,
15
+ gengineapi-0.2.2.dist-info/METADATA,sha256=ctCyxDB5_RgW3ADHhu8C-leYpIdAyWTdEhuSVsCyOwE,11184
16
+ gengineapi-0.2.2.dist-info/WHEEL,sha256=DnLRTWE75wApRYVsjgc6wsVswC54sMSJhAEd4xhDpBk,91
17
+ gengineapi-0.2.2.dist-info/top_level.txt,sha256=mYdcVWOxFzj4EzoczGzeT-ccVrNEjNI98w2JW51wnfk,11
18
+ gengineapi-0.2.2.dist-info/RECORD,,
@@ -1,5 +1,5 @@
1
1
  Wheel-Version: 1.0
2
- Generator: setuptools (80.3.1)
2
+ Generator: setuptools (80.4.0)
3
3
  Root-Is-Purelib: true
4
4
  Tag: py3-none-any
5
5