mentortools/libs/: tech-support-connector-1.0.58697 metadata and description
Simple index
| author |
Mikhail Mamrov |
| author_email |
m.mamrov@abm-jsc.ru |
| classifiers |
- Programming Language :: Python :: 3
- Programming Language :: Python :: 3.11
|
| description_content_type |
text/markdown |
| requires_dist |
- dict-caster-abm (>=1.1.52868,<2.0.0)
- furl (>=2.1.3,<3.0.0)
- http-tools-abm (>=4.2.58055,<5.0.0)
|
| requires_python |
>=3.11,<4.0 |
Technical Support Connector
Asynchronous client to connect to technical support for asyncio and Python.
Library Installation
pip install --extra-index-url https://pypi.abm-jsc.ru tech-support-connector-abm
Quick Start and basic requests
import asyncio
from aiohttp import ClientSession
from tech_support_connector import TicketType
from tech_support_connector import TechSupportConnector
from tech_support_connector import TechSupportTicketsFacade
async def main():
session = ClientSession()
tech_support_connector = TechSupportConnector(
config=TechSupportConnector.Config(
username="username", password="password", location="https://*"
),
context=TechSupportConnector.Context(
session=session,
)
)
tech_support_facade = TechSupportTicketsFacade(
TechSupportTicketsFacade.Context(
tech_support_connector=tech_support_connector
)
)
tickets_with_limit = await tech_support_facade.load(fields=["ТекущийЭтап"],
filters={"Статус": {
"Тип": "EnumRef.itilprofСтатусыПроцессов",
"Значение": "Черновик",
"Наименование": "Новый"}},
limit=10,
since="0000-001357503")
first_ticket = await tech_support_facade.load_one_or_none(fields=["ТекущийЭтап"],
filters={"Статус": {
"Тип": "EnumRef.itilprofСтатусыПроцессов",
"Значение": "Черновик",
"Наименование": "Новый"}})
all_tickets = await tech_support_facade.load_all(fields=["ТекущийЭтап"],
filters={"Статус": {
"Тип": "EnumRef.itilprofСтатусыПроцессов",
"Значение": "Черновик",
"Наименование": "Новый"}})
ticket_info = await tech_support_facade.info("ticket_uuid", TicketType.MAINTENANCE)
ticket_stages = await tech_support_facade.load_stages("ticket_uuid", TicketType.MAINTENANCE)
ticket_update = await tech_support_facade.update("ticket_uuid",
TicketType.MAINTENANCE,
{"some_info_to_update": "some_info_to_update"})
create_update = await tech_support_facade.add({"canal": "ext",
"name": "Тема обращения",
"text": "Текст обращения",
"service_id": "service_id",
"email": "email",
"user_name": "ФИО"
})
await session.close()
asyncio.run(main())