PluginBench
Rule

python flask json guide

via PatrickJS/awesome-cursorrules

Flask development guide with custom Drawscape Factorio module integration for JSON-based entity processing.

What is python flask json guide?

Provides code examples for using the custom Drawscape Factorio Python module within Flask projects. Use this rule when building Flask applications that need to import and transform JSON entity data into Factorio visualizations with configurable themes and layer rendering.

  • Import JSON entity data using the importFUE5 function
  • Create Factorio visualizations with the createFactorio function
  • Configure theme, color scheme, and visible layers for rendering
  • Generate SVG output from processed Factorio data
  • Handle file I/O for JSON input and SVG output

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

Python development standards with GitHub integration, testing, and security best practices.

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

Python LLM & ML development guide with modern tooling, type safety, and workflow best practices.

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

Structured Python development guide emphasizing modular design, testing, and AI-friendly coding practices.

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

PyTorch and scikit-learn for chemistry ML with best practices for molecular data.

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

Standardized QA bug report template with reproduction steps and environmental context.

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

TypeScript and Vite setup guide for Qwik functional component development.

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