Skip to main content
rule

python-flask-json-guide-cursorrules-prompt-file — Cursor rule

Guides Cursor on using the drawscape_factorio module. Helps parse exported-entities.json and generate SVG blueprints.

Install into Cursor · Manually: put the files in place All methods and platforms ↓
.cursor/rules/python-flask-json-guide-cursorrules-prompt-file.mdc
Open on GitHub

What python-flask-json-guide-cursorrules-prompt-file does

This rule provides Cursor with an integration pattern for the internal drawscape_factorio library. It demonstrates loading entity structures from exported-entities.json, processing them with importFUE5, and converting them into vector drawings.

The output is written as an SVG string (result['svg_string']) into a destination file. Configuration parameters pass options for themes, the main color scheme, and specific layer toggles such as belts, rails, walls, and electrical.

Execution depends directly on having drawscape_factorio available in your Python environment. Because alwaysApply is set to false, Cursor does not inject these instructions into every prompt automatically.

What it helps with

  • parse Factorio JSON exports with importFUE5
  • render base layouts into SVG output
  • configure active layer rendering in createFactorio

Example prompts for the agent

  • Write a script to load exported-entities.json and export belts and walls as SVG
  • Show how to pass custom layers to createFactorio using drawscape_factorio

How to install python-flask-json-guide-cursorrules-prompt-file

Manually: put the files in place

.cursor/rules/python-flask-json-guide-cursorrules-prompt-file.mdc

Frontmatter: description, globs, alwaysApply

Step by step, with commands for each platform: Cursor rules: .mdc files, four modes and what replaced .cursorrules

Questions about python-flask-json-guide-cursorrules-prompt-file

How to install python-flask-json-guide-cursorrules-prompt-file in Cursor?

Save the rule file to .cursor/rules/python-flask-json-guide-cursorrules-prompt-file.mdc in your project root.

What does this rule do?

It instructs Cursor on how to interact with drawscape_factorio to convert Factorio map data into SVG graphics.

What layers can be displayed in the output?

The reference snippet includes assets, belts, walls, rails, electrical, and spaceship.

Source text

python-flask-json-guide-cursorrules-prompt-file.mdc · CC0-1.0
---
description: "Cursor rules for Python Flask development with JSON guide."
globs: **/*
alwaysApply: false
---
This project is heavily reliant on our custom Drawscape Factorio python module.

Here is code examples of how to use the module:

```python
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'])

© PatrickJS · CC0-1.0 · PatrickJS/awesome-cursorrules

Similar IDE rules

All IDE rules for Backend and APIs →

From the same set210

python A Cursor rule that sets project layout, code style and stack choices for Python work with Flask and SQLite. Useful when the agent edits files in your repo. ★ 41,024repo stars python-projects-guide-cursorrules-prompt-file Guides Cursor to write Python code following modular design, Rye dependency management, pytest suites, and Ruff formatting. ★ 41,024repo stars python-llm-ml-workflow-cursorrules-prompt-file This rule guides Cursor through Python, LLM, and ML work. Use it for API code, experiments, tests, and project structure. ★ 41,024repo stars python-github-setup-cursorrules-prompt-file Tells Cursor how to write and review Python code: style, tests, GitHub Pull Requests and GitHub Actions CI. Useful when the team has no shared rulebook. ★ 41,024repo stars python-fastapi-scalable-api-cursorrules-prompt-fil This rule sets coding and project-structure guidance for FastAPI and React apps. Use it when you want Cursor to follow shared conventions for implementation, tests, and deployment. ★ 41,024repo stars python-fastapi-best-practices-cursorrules-prompt-f A Cursor rule that sets the agent's coding style for Python and FastAPI: functional code, Pydantic v2, async operations. ★ 41,024repo stars python-django-best-practices-cursorrules-prompt-fi Directs Cursor to generate idiomatic Django code with clean MVT architecture and optimized ORM queries. ★ 41,024repo stars python-developer-cursorrules-prompt-file This rule gives Cursor a Python-focused development context for debugging, command-line work, and file operations. Use it for Python project tasks. ★ 41,024repo stars

Project sponsors

Companies that keep this analytics open
Gold sponsor

Impressions, clicks and code copies — open statistics. We keep the numbers public for the same reason NeBlask itself is public. Become a sponsor