{"id":42655147,"url":"https://github.com/k1nky/pachca-client","last_synced_at":"2026-01-29T07:49:48.413Z","repository":{"id":245657002,"uuid":"818892425","full_name":"k1nky/pachca-client","owner":"k1nky","description":"Python client for pachca.com","archived":false,"fork":false,"pushed_at":"2025-01-07T20:26:16.000Z","size":61,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-10-27T06:59:07.439Z","etag":null,"topics":["client","pachca","pachka"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/k1nky.png","metadata":{"files":{"readme":"README.en.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-06-23T07:09:38.000Z","updated_at":"2025-08-08T12:14:52.000Z","dependencies_parsed_at":"2024-06-23T07:31:57.910Z","dependency_job_id":"021d4d15-c4dd-4eee-b93b-c64409a06f1d","html_url":"https://github.com/k1nky/pachca-client","commit_stats":null,"previous_names":["k1nky/pachca-client"],"tags_count":6,"template":false,"template_full_name":null,"purl":"pkg:github/k1nky/pachca-client","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/k1nky%2Fpachca-client","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/k1nky%2Fpachca-client/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/k1nky%2Fpachca-client/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/k1nky%2Fpachca-client/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/k1nky","download_url":"https://codeload.github.com/k1nky/pachca-client/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/k1nky%2Fpachca-client/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28870699,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-29T07:35:32.468Z","status":"ssl_error","status_checked_at":"2026-01-29T07:33:31.463Z","response_time":59,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["client","pachca","pachka"],"created_at":"2026-01-29T07:49:48.321Z","updated_at":"2026-01-29T07:49:48.404Z","avatar_url":"https://github.com/k1nky.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![RU](https://img.shields.io/badge/lang-RU-blue.svg)](https://github.com/k1nky/pachca-client/blob/main/README.md)\n[![EN](https://img.shields.io/badge/lang-EN-green.svg)](https://github.com/k1nky/pachca-client/blob/main/README.en.md)\n\n\n# Pachca Client\n\nThe package provides a client for **pachca.com**.\n\n## Supported features\n\n- [x] chats\n- [ ] chat members\n- [x] file upload\n- [x] messages\n- [x] reactions\n- [ ] status\n- [ ] tasks\n- [ ] tags\n- [x] threads\n- [ ] users\n\n## Installation\n\n```\npython -m pip install pachca-client\n```\n\nPachca Client requires Python 3.6 or higher.\n\n\n# Examples\n\n## Get the client\n\n```\nfrom pachca_client import get_pachca\n\n# default client\npachca =  get_pachca('MY_ACCESS_TOKEN')\n```\n\nAlternatively you can create the client like this:\n\n```\nfrom pachca_client import Client, Cache, Pachca\n\npachca = Pachca(Client('MY_ACCESS_TOKEN'), Cache())\n```\n\n## Messages\n\n### Send a message\n\n```\n# to chat by its ID\nmessage = pachca.new_message(chat_id=111111, content=\"My message\")\n\n# to chat by its Name\nmessage = pachca.new_message(chat_id='MyChatName', content=\"My message\")\n\n# to user by its ID\nmessage = pachca.new_message(chat_id=222222, chat_type='user', content=\"My message\")\n\n# to user by its Name\nmessage = pachca.new_message(chat_id='User Name', chat_type='user', content=\"My message\")\n\n# to thread by its ID\n# where 333333 is thread id created by `new_thread`\nmessage = pachca.new_message(chat_id=333333, chat_type='thread', content=\"My message\")\n```\n\n### Send a message to thread\n\n```\nmessage = pachca.new_message(chat_id=111111, content=\"My message\")\nthread = pachca.new_thread(message['id'])\nthread_message = pachca.new_message(chat_id=thread['id'], content=\"My message in the thread\", chat_type='thread')\n```\n\n### Send a message with files\n\n```\nfrom pachca_client import File\nfiles = [\n    File('file_a.txt'),\n    File('image_a.png', file_type='image')\n]\nmessage = pachca.new_message(chat_id=123456, content=\"Test message!\", files=files)\n```\n\n### Send a message with buttons\n\n```\nfrom pachca_client import Button\nbuttons = [\n  [Button.data('Yes', 'yes'), Button.data('No', 'no')],\n  [Button.url('Home', 'https://mycompany.org'),]\n]\nmessage = pachca.new_message(chat_id=123456, content=\"Test message!\", buttons=buttons)\n```\n\n### Pin/Unpin message\n```\nfrom pachca_client.api.exceptions import PachcaAlreadyExists\ntry:\n    pachca.pin_message(12345678)\nexcept PachcaAlreadyExists:\n    # the message has already pinned\n    pass\n\n# unpin message\npachca.unpin_message(12345678)\n```\n\n## HTTP/HTTPS Proxy\n\nIf you need to use a proxy, you can set `proxies` parameter or environment variables. For more information see https://docs.python-requests.org/en/latest/user/advanced/.\n\n```\nfrom pachca_client import get_pachca\n\nproxies = {\n  'http': 'http://10.10.1.10:3128',\n  'https': 'http://10.10.1.10:1080',\n}\npachca =  get_pachca('MY_ACCESS_TOKEN', proxies=proxies)\n\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fk1nky%2Fpachca-client","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fk1nky%2Fpachca-client","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fk1nky%2Fpachca-client/lists"}