Skip to main content

A simple Scraper template creator

Project description

Flask Ignite

A simple Flask app creator that automatically generates a basic Flask project structure including models, routes, services, configuration, and more.

Getting Started

This repository contains a utility package that, once installed, provides a CLI command to create a Flask project structure automatically. The command is registered as a console script named flask-admin.

Prerequisites

Setup and Usage

  1. Clone the Repository

    Clone this repository to your local machine.

  2. Install the Package

    From the root of the repository, install the package locally:

    pip install flask-ignite
    
  3. Run the Project Setup Command

    Execute the following command to generate the Flask project structure:

    flask-ignite --project <your_project_name> # defaults to flask_app
    

    This will create a project structure similar to the following:

    • flask_app/
      • app/
        • models/
          • __init__.py
          • user.py
          • post.py
        • routes/
          • __init__.py
          • user_routes.py
          • post_routes.py
        • services/
          • __init__.py
          • user_service.py
        • config/
          • __init__.py
          • settings.py
        • extensions.py
        • __init__.py
      • migrations/
      • .env
      • config.py
      • requirements.txt
      • wsgi.py
      • run.py
  4. Next Steps

    After generating the project, follow these steps:

    • Navigate into the generated project directory:

      cd flask_app
      
    • Create a virtual environment:

      python -m venv venv
      
    • Activate the virtual environment:

      • Windows:
        venv\Scripts\activate
        
      • Mac/Linux:
        source venv/bin/activate
        
    • Install the project dependencies:

      pip install -r requirements.txt
      
    • Initialize the database:

      flask db init && flask db migrate -m "Initial migration" && flask db upgrade
      
    • Run the app:

      python run.py
      

Project Structure Overview

  • app/models: Contains database models (e.g., User and Post defined in user.py and post.py).
  • app/routes: Defines routes using Blueprints for handling API endpoints (in user_routes.py and post_routes.py).
  • app/services: Holds service functions for data manipulation or retrieval (in user_service.py).
  • app/config: Stores configuration settings and environment-specific variables (in settings.py).
  • app/extensions.py: Initializes Flask extensions like SQLAlchemy and Migrate.
  • app/init.py: Creates and configures the Flask application.

License

This project is licensed under the MIT License.

Author

Nahom D
Email: nahom@nahom.eu.org

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

scraper_ignite-0.1.0.tar.gz (5.7 kB view details)

Uploaded Source

Built Distribution

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

scraper_ignite-0.1.0-py3-none-any.whl (5.7 kB view details)

Uploaded Python 3

File details

Details for the file scraper_ignite-0.1.0.tar.gz.

File metadata

  • Download URL: scraper_ignite-0.1.0.tar.gz
  • Upload date:
  • Size: 5.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.1

File hashes

Hashes for scraper_ignite-0.1.0.tar.gz
Algorithm Hash digest
SHA256 b879452d53d8d29c41728bac96dd884d5608263ae56e8fe8f7bcd43c84981b51
MD5 93eb95577fe9f6d0eee778638a2afea1
BLAKE2b-256 11359cb37174e617d8259231553ae8f26141d3675ee47ba006159f7b3a0b124c

See more details on using hashes here.

File details

Details for the file scraper_ignite-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: scraper_ignite-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 5.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.1

File hashes

Hashes for scraper_ignite-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 2ba97fba1bd467c8738170753a37c037e9ed437ad235c57af6c31e0459d59aba
MD5 e8b3b30b5070a697204b03998115d43f
BLAKE2b-256 49d29c37f288447a0a96b4d4e806bf219c7aee72eb834409e8ad3428ef23f6fd

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