Gchat SDK for managing and closing conversations
Project description
GCHAT Close Conversations
This project automates sending alerts and closing inactive conversations on the GCHAT platform, using API integration.
Features
- Automatically sends alert messages to inactive contacts.
- Automatically closes conversations based on configurable criteria.
- Flexible configuration via environment variables.
Project Structure
.
├── gchat_sdk/
│ ├── controllers/
│ ├── entities/
│ ├── factories/
│ ├── providers/
│ ├── tests/
│ ├── main.py
│ ├── settings.py
│ └── utils.py
├── examples/
│ └── finish_chats.py
├── .env
├── requirements.txt
└── LICENSE
Installation
-
Clone the repository:
git clone https://github.com/your-username/GCHAT-Encerrar-conversas.git cd GCHAT-Encerrar-conversas
-
Create and activate a virtual environment:
python3 -m venv venv source venv/bin/activate
-
Install dependencies:
pip install -r requirements.txt
-
Configure environment variables in the
.envfile:URL_API=https://api.gchat.app.br TOKEN_API=your_token END_CHATS_WITH_ATTENDANTS_LAST_MESSAGE=True END_CHATS_WITH_CONTACTS_LAST_MESSAGE=True TIMEOUT=1 ALERT_TIME=0.1
Usage
Run the example to send alerts and close inactive conversations:
python examples/finish_chats.py
Testing
Unit tests are located in gchat_sdk/tests/. To run the tests using unittest:
python -m unittest discover gchat_sdk/tests/
License
This project is licensed under the MIT License. See the LICENSE file for details.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file gchat_sdk-0.0.1-py3-none-any.whl.
File metadata
- Download URL: gchat_sdk-0.0.1-py3-none-any.whl
- Upload date:
- Size: 17.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8c50f1ba5f62107a3806fa2f7a3c33aca60fb8bbf8defcdd7135055e6d6edce1
|
|
| MD5 |
eac40027e1c6c1e92fcc4b2a3696dcc2
|
|
| BLAKE2b-256 |
c2fa111b66271f8c83fb5df86fd5fb69096e647cd17aebde0241d209558e21e7
|