npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@suss/framework-fastapi

v0.11.0

Published

Pattern pack for extracting suss behavioral summaries from FastAPI routes, composing APIRouter prefixes one include hop deep.

Readme

@suss/framework-fastapi

Framework pack for FastAPI routes, read by the Python adapter.

What this package is

@suss/framework-fastapi returns a PythonPack object describing:

  • Discovery: a function decorated with a verb-named method on the app or on a router (@app.get(path), @router.post(path)), where the decorator's own attribute name is the HTTP verb (get, post, put, patch, delete, head, options). The app and router are recognized by construction: app = FastAPI(), router = APIRouter(), one assignment back from an import of fastapi.
  • Router prefix composition: a route on a router composes its path from the router's own prefix and the prefix at the single app.include_router(...) call that mounts it, when both are string literals and the mount reaches the router through one variable binding (same file, or imported from the file that constructed it). Beyond that, the pack abstains: it still discovers the route by name, with no path, and the summary's gap says why.
  • Boundary bindings: rest(method, path), with the declared response_model / status_code keywords and parameter / return annotations read as the route's contract.

Where it fits in suss

Depends only on @suss/adapter-python (for the PythonPack type and the Python-language extraction pipeline). Contains no analysis logic of its own.

What abstains

The pack never guesses a path. A route keeps its name and has no path when:

  • the decorator's path argument is not a string literal,
  • the router's own prefix or the mount call's prefix is not a string literal,
  • nothing mounts the router through a single variable binding in the files read,
  • the router is mounted more than once,
  • the router is mounted onto another router (a second hop), or
  • the router's variable name is assigned a second router construction (routes bind at decoration time, so which construction a decorator or mount saw depends on the order things run in, and the pack does not follow that).

Dependencies, middleware, and mounted sub-apps are not read in v0.

The wrapper-module option

A project that re-exports FastAPI's constructors from its own module lists that module alongside fastapi, which is always accepted:

import { fastapiFramework } from "@suss/framework-fastapi";

const pack = fastapiFramework({ wrapperModules: ["myapp.compat"] });

Coverage

coverage

License

Licensed under Apache 2.0. See LICENSE.