Skip to main content

The lib generates the template for Flask app with SoketIO configuration.

Project description

Flask-SocketIO-Generator

Flask-SocketIO-Generator is a tool for generating a template project structure for a Flask application with Socket.IO integration. The tool automatically sets up an initial folder structure, includes the necessary Docker files, a .gitignore, and a Socket.IO client in the HTML files.

With Flask-SocketIO-Generator, you can quickly bootstrap a Flask application with real-time capabilities, reducing the manual setup time and getting you started faster.

Features

  • Generates a basic Flask app template with Socket.IO configuration.
  • Automatically creates the folder structure for your Flask project.
  • Includes Docker configuration files for easy containerization.
  • Sets up a .gitignore for ignoring common unnecessary files.
  • Adds a Socket.IO client to the HTML for seamless communication with the server.

HOW TO INSTALL AND RUN

pip install flask_socketio_generator
Run command flask_socketio_generate

HOW TO RUN LOCALLY:

  • git clone https://github.com/airetOK/flask_socketio_generator.git
  • create virtual environment python -m venv venv
  • activate venv cd venv/Scripts, from Scripts folder execute activate
  • from the project's root execute pip install -r requirements.txt
  • from the project's root execute python -m flask_socket_generator_app.main

USAGE

The command python -m api.main will ask you to enter project name, include docker support and add .gitignore. Once you finished with that, the will create the Flask SocketIO the following project's structure:

example-project |
|---app
|    | --- __init__.py
|
|---static
|    | --- css
|    | --- img
|    | --- js
|
|---templates
|    | --- index.html
|
|---tests
|    | --- app
|            | --- __init__.py
|    | --- __init__.py
|
|--- .gitignore
|--- docker-compose.yaml
|--- Dockerfile
|--- main.py
|--- README.MD
|--- requirements.txt

Once the project was generated execute docker-compose up from your project's root. You can access the Flask application on localhost:5000.

Contributing

If you'd like to contribute to Flask-SocketIO-Generator, feel free to fork the repository, submit issues, or create pull requests. The repository url: https://github.com/airetOK/flask_socketio_generator Contributions are always welcome, I'll be happy to improve the lib with you!

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

flask_socketio_generator-1.0.0.tar.gz (6.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

flask_socketio_generator-1.0.0-py3-none-any.whl (9.1 kB view details)

Uploaded Python 3

File details

Details for the file flask_socketio_generator-1.0.0.tar.gz.

File metadata

  • Download URL: flask_socketio_generator-1.0.0.tar.gz
  • Upload date:
  • Size: 6.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.9.21

File hashes

Hashes for flask_socketio_generator-1.0.0.tar.gz
Algorithm Hash digest
SHA256 ba757a73a721fe9095abaf00c0358d26ea4160cdb2a00758339a03d2599a2117
MD5 b6f41faa23a7d3c40f8c05a154492b24
BLAKE2b-256 74a9e70511df87cf2be736a0b0fc59d624b0212993b953d2767104ac21b73624

See more details on using hashes here.

File details

Details for the file flask_socketio_generator-1.0.0-py3-none-any.whl.

File metadata

File hashes

Hashes for flask_socketio_generator-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 5f0e09696c0a64d23dfe19b3a53d9c6c7942c5b091413aa7d924e3b30d8ae4db
MD5 899acd2420e124fc8c5a0ed83ff56893
BLAKE2b-256 748bb455011e1e4e5daa4e4eef55f02b0cfbb8473c68244a3e0ed15dfffac2cf

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page