Skip to content

chore: Add networkx, fastapi, uvicorn to requirements.txt and pyproject.toml #30

@Neal006

Description

@Neal006

Background

Three new features in v0.4 require new dependencies:

  • GraphMemorynetworkx
  • FastAPI serverfastapi + uvicorn

These must be declared explicitly in requirements.txt and pyproject.toml so that pip install is reproducible and contributors don't hit missing-package errors.

This is a quick, beginner-friendly change — about 8 lines across 2 files.

What to change

requirements.txt

Add these three lines (keep alphabetical order within the file):

fastapi>=0.110.0
networkx>=3.0
uvicorn[standard]>=0.29.0

pyproject.toml

In [project]dependencies = [...], add:

"networkx>=3.0",

Add a new optional-dependency group after the existing ones:

[project.optional-dependencies]
api = ["fastapi>=0.110.0", "uvicorn[standard]>=0.29.0"]

This allows users to install only the API deps when needed:

pip install memorylens[api]      # installs fastapi + uvicorn
pip install memorylens[all-providers]   # existing group — unchanged

Acceptance criteria

  • requirements.txt includes networkx>=3.0, fastapi>=0.110.0, uvicorn[standard]>=0.29.0
  • pyproject.toml dependencies includes networkx>=3.0
  • pyproject.toml has [project.optional-dependencies] api = [...]
  • pip install -r requirements.txt completes without conflicts
  • pip install -e ".[api]" installs fastapi and uvicorn
  • All existing tests still pass after the install

Technical hints

  • Check for version conflicts: pip install networkx fastapi "uvicorn[standard]" in a fresh venv before committing
  • The existing optional groups in pyproject.toml are groq, openai, anthropic, all-providers, dev — add api to this list
  • uvicorn[standard] installs the recommended extras (websockets, watchfiles for --reload)

Getting started

# In a fresh venv or with pip's dry-run:
pip install networkx fastapi "uvicorn[standard]" --dry-run

# After making the changes:
pip install -r requirements.txt
pytest tests/ -v

This is a great first issue — just editing two config files and verifying the install works.

Metadata

Metadata

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions