PluginBench
Rule

python flask json guide

via PatrickJS/awesome-cursorrules

Flask development guide for Drawscape Factorio module integration with JSON data handling.

What is python flask json guide?

This rule provides Flask development patterns for working with the custom Drawscape Factorio Python module. Use it when building Flask applications that need to import Factorio entity data from JSON and generate SVG output with configurable themes and layers.

  • Import and parse JSON entity data using the importFUE5 function
  • Create Factorio visualizations with createFactorio using theme and color scheme configuration
  • Configure visible layers (assets, belts, walls, rails, electrical, spaceship) in output
  • Generate and write SVG string output to files
  • Handle JSON file I/O for Factorio entity imports

Applies to

File patterns this rule matches.

**/*
Rule definition (reference)

Source of truth, from the repository.

This project is heavily reliant on our custom Drawscape Factorio python module.

Here is code examples of how to use the module:

from drawscape_factorio import create as createFactorio
from drawscape_factorio import importFUE5

with open('/path/to/exported-entities.json', 'r') as file:
    json_data = json.load(file)
    data = importFUE5(json_data)
    result = createFactorio(data, {
        'theme_name': 'default',
        'color_scheme': 'main',
        'show_layers': ['assets', 'belts', 'walls', 'rails', 'electrical', 'spaceship']
    })

with open(output_file_name, 'w') as f:
    f.write(result['svg_string'])

Related rules

Senior full-stack TypeScript, React, Node.js guidance with clean architecture, testing, and WHY-oriented reasoning.

**/*
41k
via PatrickJS/awesome-cursorrules

Quantitative factor research skills for designing, evaluating, and mining alpha factors in equities markets.

**/*
41k
via PatrickJS/awesome-cursorrules

Android development with Jetpack Compose, clean architecture, and Material Design 3.

**/*
41k
via PatrickJS/awesome-cursorrules

Angular development with Novo Elements UI library using standalone components.

**/*
41k
via PatrickJS/awesome-cursorrules

Expert Angular 18 + TypeScript development with Jest, emphasizing clean code and performance.

**/*
41k
via PatrickJS/awesome-cursorrules

Manage Kubernetes clusters, add-ons, stacks, and credentials via the Ankra CLI platform.

**/*.sh +5
41k
via PatrickJS/awesome-cursorrules