Skip to content

Create API module structure #90

@wklumpen

Description

@wklumpen

Description

Set up new api/ module in SPUR repo to provide HTTP API wrapper around the simulation engine.

Tasks

  • Create spur/api/ directory
  • Create __init__.py, server.py, session.py, schemas.py
  • Update main spur/__init__.py to expose api if installed
  • Add Flask to optional dependencies in setup.py with [api] extra
  • Test that pip install -e .[api] installs Flask dependencies

Acceptance Criteria

  • Can import from spur.api import create_app
  • Module structure matches design
  • pip install spur-sim[api] installs Flask dependencies
  • Import works even without Flask installed (graceful fail)

Time Estimate

1 hour

Dependencies

None

Files Changed

  • spur/api/__init__.py (new)
  • spur/api/server.py (new)
  • spur/api/session.py (new)
  • spur/api/schemas.py (new)
  • spur/__init__.py (modified)
  • setup.py (modified)

Metadata

Metadata

Assignees

No one assigned

    Labels

    apiTo add to the Flask APIenhancementmvpMinimum Viable Product

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions