Open source · Developer tool

Postman collections, generated from your code.

routeman reads the routes, serializers and models already in your Django, Django REST framework, Flask or FastAPI project and writes a ready-to-import Postman collection — with auth, example bodies and environments. No OpenAPI schema required.

pip install routeman
4Frameworks
3.9+Python
MITFree & open source

Three steps, about a minute

routeman works from the code you already have. There is no decorator to add, no schema library to install and nothing to keep in sync by hand.

01 — Install

Add it to your virtualenv

Run pip install routeman in the environment your project already uses. It imports your app to read the routes, so it needs your dependencies.

02 — Generate

Run one command

From the project folder, run routeman generate. It detects the framework, the app, the auth scheme and the login route, and loads .env if present.

03 — Import

Open it in Postman

File → Import both files from postman/, select the environment and send the Login request. The token is saved and sent with everything else.

A collection you can use straight away

Not a list of bare URLs. Every request arrives with the body, parameters and auth it needs to work.

Organised folders

One folder per Django app, Flask blueprint or FastAPI tag, with sub-folders per resource. Admin and static routes are left out.

Real request bodies

JSON, urlencoded or multipart with file pickers. Example values respect choices, length and range limits, regex patterns and field names.

Auth that works

Detects Bearer/JWT, DRF Token, Knox, Basic, API key and session auth. The login request saves access and refresh tokens to the environment.

Typed parameters

Path variables are typed from your models. Pagination, search, ordering and filters are added, with optional ones disabled by default.

Built-in smoke tests

Every request checks that the response is not a 5xx, so Collection Runner or Newman can exercise the whole API in CI.

One file per server

Separate environments for local, staging and production, with secrets marked so they are not shared by accident.

Docs in every request

View docstrings and field tables — type, required, allowed values — appear in each request's description. WebSocket routes are listed too.

Stable IDs

Regenerate after an API change and re-import: the previous collection is replaced, not duplicated next to the old one.

Reads each framework the way it is written

If a view declares no serializer, form or schema, routeman infers fields from the view's source and marks those requests as inferred.

Django REST framework

3.12+

Routers, ViewSets, @action, APIViews and @api_view. Bodies come from serializers; parameters from pagination, search, ordering and django-filter.

Django

3.2 – 6

path, re_path and include. Fields come from forms, ModelForms and view code reading request.POST, GET, FILES or JSON.

Flask

2.0 – 3.x

The URL map, blueprints, MethodView and Flask-RESTful. Parameters from marshmallow, flask-smorest, Pydantic models and auth decorators.

FastAPI

0.95+

The built-in OpenAPI document, plus routes marked include_in_schema=False. Pydantic v1 and v2, Query/Form/File/Header and Depends-based security.

4
Frameworks supported
5
Auth schemes detected
0
Network requests sent
₹0
MIT licensed, free forever

Four commands, sensible defaults

Commands
routeman generate            # collection + environments → postman/
routeman generate --stdout   # print the collection instead
routeman routes              # method, path, auth, body fields
routeman init                # save settings to routeman.toml
routeman --version
Config file optional — settings can live in routeman.toml or under [tool.routeman] in pyproject.toml. Command-line flags override both.
CSRF handled — for Django session views, send a GET first; the collection copies csrftoken into the X-CSRFToken header.
Lightweight — no dependencies except tomli on Python below 3.11. Tested on Python 3.9 through 3.14.
Options
FlagPurpose
-C, --project DIRProject folder (default: current folder)
-f, --frameworkdjango, flask or fastapi
-a, --appDjango settings module, or Flask/FastAPI app such as main:app
-n, --nameCollection name
-o, --output DIROutput folder (default postman)
-b, --base-url URLBase URL of the local environment
-e, --env NAME=URLAdd an environment (repeatable)
-x, --exclude REGEXExclude matching paths (repeatable)
--auth TYPEForce none, bearer, token, basic, apikey or session
--login PATHThe POST route whose response contains the token
--env-file FILEEnvironment variables for settings (default .env)

Everyone who touches the API

Backend engineers

Ship an up-to-date collection with every pull request instead of maintaining one by hand.

Frontend & mobile

Get example bodies and working auth without reading the server code or waiting on a backend developer.

QA testers

Start exploratory or regression testing on day one, with every endpoint already in place.

DevOps

Run the collection through Newman after each deploy as a quick check for 5xx errors.

Read-only and offline

routeman imports your app to read its routes, then writes two JSON files. That is all it does.

Never touches your database — importing the app is read-only; no queries, no migrations.
Sends no requests — it does not call your API or any other server while generating.
Uploads nothing — your source code never leaves your machine.
Open source under MIT — free for personal and commercial use, and you can read every line it runs.

Questions or a framework we missed?

routeman is built and maintained by the Swastik engineering team. Tell us what your project uses and we will help you get a working collection.

Visit the routeman site

Common questions

routeman — common questions

Talk to an engineer

Yes. routeman is open source under the MIT licence, so it is free for personal and commercial projects alike. Install it from PyPI with pip install routeman. It has no runtime dependencies apart from tomli on Python versions older than 3.11.

No. routeman reads the routes, serializers, forms and models already in your Django, Django REST framework or Flask project, so there is no schema library to add. FastAPI is the one exception: there it starts from the OpenAPI document FastAPI already builds, plus any routes hidden from it.

No. It imports your app to discover routes, which is read-only, then writes the collection and environment files. It runs no queries, sends no HTTP requests and uploads nothing, which is why it has to run inside your project's own virtualenv.

routeman is tested with Django 3.2 to 6, Django REST framework 3.12 and later, Flask 2.0 to 3.x, and FastAPI 0.95 and later with Pydantic v1 or v2. It needs Python 3.9 or newer and is tested through Python 3.14.

routeman reads the view's source code instead and infers the fields it uses from request.POST, request.GET, request.FILES or the JSON body. Requests built this way are marked as inferred in the collection, so you know which example bodies to double-check.

Yes. Every request carries a test that fails on a 5xx response, so running the collection with Newman after a deploy gives you a quick check that no endpoint is crashing. Regenerate after API changes; stable IDs mean re-importing replaces the old collection.

Your next Postman collection is one command away

Free, open source and ready for Django, DRF, Flask and FastAPI.

pip install routeman