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

Create virtual environment and activate it.
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.1.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.1-py3-none-any.whl (9.1 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: flask_socketio_generator-1.0.1.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.1.tar.gz
Algorithm Hash digest
SHA256 47638c6383522703fb0c93eda991312b9b6c534c16df34d952154576a818f633
MD5 9ce8251e1f726611d2f1204515b6cc3a
BLAKE2b-256 96506f8e9c9b3f836ab8ba1b48130f5ef65bad05065d5840122a9df677b37e78

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for flask_socketio_generator-1.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 29b6c9dbecf922a341434355ceb9291d56c5ad30476f02317e5d9a03e16ce350
MD5 0e025896d5fd64a9c89861e29c0e879a
BLAKE2b-256 f8cc71ec21169b7874fbcff08db6c447df5ac552bdff326cea28e0d3c21b08bf

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