spring-initializer

raw JSON →
1.0.3 verified Sat May 09 auth: no python

Download and extract Spring framework code templates from Spring Initializr. Current version 1.0.3, supports Python >=3.6. Low release cadence.

pip install spring-initializer==1.0.3
error ModuleNotFoundError: No module named 'spring_initializer'
cause Library not installed or imported incorrectly.
fix
Run pip install spring-initializer and use from spring_initializer import create_spring_project.
error requests.exceptions.ConnectionError: HTTPSConnectionPool(host='start.spring.io', port=443)
cause No internet access or proxy issues.
fix
Check your internet connection and ensure you can reach https://start.spring.io. If behind a proxy, configure environment variables HTTP_PROXY/HTTPS_PROXY.
gotcha The `create_spring_project` function requires an internet connection to access Spring Initializr. Without it, the function raises a ConnectionError.
fix Ensure your environment has outbound HTTPS access to start.spring.io.
gotcha All parameters to `create_spring_project` are positional-only and must be passed in the exact order unless using keyword arguments.
fix Always use keyword arguments for clarity: create_spring_project(name='MyApp', language='java', ...).

Download and extract a Spring Boot project into ./output/MyApp.

from spring_initializer import create_spring_project

create_spring_project(
    "MyApp",
    language="java",
    build="maven",
    spring_boot_version="3.2.0",
    group_id="com.example",
    output_dir="./output"
)