Code Monkey home page Code Monkey logo

async_chat's Introduction

Async chat

Async char reader/writer

How to install

Python version required: 3.7+

  1. Recomended use venv or virtualenv for better isolation.
    Venv setup example:
    python3 -m venv myenv
    source myenv/bin/activate
  2. Install requirements:
    pip3 install -r requirements.txt (alternatively try add sudo before command)
  3. cp env/.env env/.env_file. If it need setup env file(or use default settings): - HOST - chat host.
    - READ_PORT - port for read messages from chat.
    - WRITE_PORT - port for write messages to chat.
    - ATTEMPTS_COUNT - connection attempts before 3 sec timeout.
    - HISTORY_LOG_DIR_PATH - path to folder where will be created history_log.txt file with chat messages history.
    Additional vars (for message writing):
    - TOKEN - unique token (issued after registration) for chat.
    - USERNAME - desirable username for chat registration.
    - MESSAGE - message for sending(required set here or in argparse).

How to launch

Instead environ vars you can use arguments. For more info use python3 chat_reader.py --help for reading script and python3 chat_writer.py --help for sending script.

  1. For reading chat run python3 chat_reader.py
  2. For sending message run python3 chat_writer.py

Project Goals

The code is written for educational purposes. Training course for web-developers - DVMN.org

async_chat's People

Contributors

ranc58 avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.