Skip to content

Latest commit

 

History

History
155 lines (75 loc) · 4.52 KB

README_en.md

File metadata and controls

155 lines (75 loc) · 4.52 KB

秘密聊天室 - SecretChat

中文 README.md | English README_en.md

Recently I find Leancloud has many free functions can be used.So wanted to write a chat program.After readingofficial document,I thought there was a lot of freedom here.Every program I've written before looks like crap.So I want to make this program to be useful and formally.

The only reason it's called "secret" is because the data can be viewed on the console.(no reason)。Actually, there's no security。 This program is by design to just use the free serves of Leancloud(Free is the best?)。Once you have registered your Leancloud app, you can use the API provided by leancloud.

Actually Leancloud officially provides a Python library,but I don't know how to use. So I use REST api to make a new class.


HOW TO USE

Clone this project

Click Download or use git command git clone https://github.com/Lkhsss/SecretChat.git

Install python dependencies

Run commands in the project home directory: pip install -r requirements.txt

The python virtual environment is recommended here for easy packaging later


Get any keys of LeanCloud

Register a LeanCloud account

Go to Leancloud console(World edition or North China | East China), register a LeanCloud account

Create app

Create app

Configuration Settings

Configuration Settings

Choose Settings

Choose Settings

Choose[Settings]>[App keys]

选择应用凭证

Get keys

Keek the keys of name AppID, AppKey, MasterKey以及REST API Server URL.We will use it soon.


Configuration keys

Open the file named leancloud.py Fill keys REST_API, AppID, AppKey, MasterKey with the keys you get in the Leancloud console. Like this

Look out the name of the key!

You'd better use 复制键to copy.


Run

And it cruns like this 运行

Manage conversation

Use file admin.py to manage conversations

Other actions

I made a detailed function introduction in class file leancloud.py. CHANGELOG also has a single introduction


About security

Since many operations in the REST api require the master key, I'll use the master key instead I'll try to figure out a way to solve this problem. When you package your application, it's best to be anti-decompile-proof to prevent key leaks. If the masterkey is leaked, you can go to the webpage where you obtained the masterkey and reset it.


CHANGELOG

CHANGELOG.md


TODO

  • Add icons --> v1.0.1
  • Made a administration to manage conversations --> v1.1.3
  • Update English version README and CHANGELOG(Practice English(bushi
  • Resolve the problems of api permission
  • Use github api to check update
  • Add the function of delete users
  • Add the function of rename conversation to admin.py

development environments

  • Python 3.9.5 64-bit
    • PyQt5 - 5.15.4
    • requests - 2.28.1

LICENSE

Apache-2.0 license

Author:Lkhsss


PS

Welcome issues and pr

Can someone teach me how to beautify PyQt5? The default interface is tooooooooo ugly. Thanks.