Skip to content
Home About Services Work Notes Contact Start a project
Open source — Developer tools

routeman — Postman collections, generated from Django, Flask and FastAPI code

An open-source command-line tool that reads the routes, serializers and models already in a Python API project and writes a ready-to-import Postman collection — with auth, example bodies, parameters and environments — in one command. No OpenAPI schema or documentation library required.

routeman (open source) — Python command-line tool, published on PyPI
Client
routeman (open source)
Industry
Developer tools / API testing
Type
Python command-line tool, published on PyPI
Role
Author — design, implementation, packaging and release; built at Swastik Tech Solutions
Version
0.1.0 — released 8 Oct 2026
Licence
MIT — free, including commercial use

The problem

Every API team ends up maintaining a Postman collection by hand, and every hand-made collection drifts. A field gets renamed, an endpoint gets a new filter, auth moves from sessions to JWT — and the collection the frontend, mobile and QA teams depend on quietly stops matching the server.

The usual fix is to generate an OpenAPI schema first and convert it. That means adding a schema library, decorating views and keeping annotations accurate — which is the same maintenance problem moved somewhere else. Plenty of working Django and Flask projects simply do not have a schema.


Approach

routeman reads the project the way the framework itself does. It imports the app from inside its own virtualenv and walks the real URL configuration — Django URLconfs and DRF routers, Flask's URL map and blueprints, FastAPI's built-in OpenAPI document — then reads serializers, forms, marshmallow schemas and Pydantic models for the request shape.

Where a view declares nothing, it reads the view's source for request.POST, request.GET, request.FILES or JSON access and infers the fields, marking those requests as inferred so nobody mistakes a guess for a contract.

It is deliberately read-only and offline: it never touches the database, never sends a request and never uploads code. It has no dependencies beyond tomli on Python older than 3.11.


What it generates

  • Folders per Django app, Flask blueprint or FastAPI tag, with sub-folders per resource — admin and static routes excluded
  • Request bodies as JSON, urlencoded or multipart with file pickers; example values respect choices, length and range limits, regex patterns and field names
  • Auth detection for Bearer/JWT, DRF Token, Knox, Basic, API key and session, with a login script that saves access and refresh tokens
  • Typed path variables plus pagination, search, ordering and filter parameters, optional ones disabled by default
  • A not-5xx smoke test on every request, so Collection Runner or Newman can check the whole API in CI
  • One environment file per server — local, staging, production — with secrets marked
  • View docstrings and field tables in each request's description
  • Stable IDs, so re-importing after a change replaces the collection instead of duplicating it

Shipping it

routeman is published on PyPI under the MIT licence and tested against Django 3.2 to 6, Django REST framework 3.12+, Flask 2.0 to 3.x and FastAPI 0.95+ with Pydantic v1 and v2, on Python 3.9 through 3.14.

Four commands cover the workflow: routeman generate writes the collection and environments, routeman routes lists what was discovered, routeman init saves settings to routeman.toml, and --stdout prints the collection for piping. Settings can also live under [tool.routeman] in pyproject.toml.

More work

Other case studies

Darbhanga Medical College & Hospital — Hospital Management System (HMS)

Darbhanga Medical College & Hospital

An end-to-end hospital management system covering patient registration, OPD and IPD workflows, billing, pharmacy, pathology, radiology, blood bank and medical records — running in production on a government medical college campus.

Read the case study
We4Task — CRM and team productivity platform

We4Task

A customer relationship platform covering lead capture, pipeline stages, task assignment and team performance reporting.

Read the case study
Heavenera — Marketplace web app + Android application

Heavenera

A property rental marketplace pairing a web application with a companion Android app — listings, search, bookings and payments.

Read the case study
Next step

Building something similar?

Tell me what you are trying to ship. You get an approach, a timeline and a realistic estimate — usually within a working day.