Knowledgebase

Building APIs With Flask Print

  • backenddevelopment, backend, database, errors, guide, howto, solution, zillionkinghost
  • 0

The minimal framework.

WHAT IT PROVIDES

Routing Request and response handling Templating Little else

WHAT THAT MEANS

You choose everything: data access, validation, authentication, structure.

WHAT IT SUITS

Small services Applications with unusual requirements Teams wanting control

WHAT IT DOES NOT SUIT

Large applications, without imposing structure yourself.

WHAT TO ADD FIRST

A validation library A database layer Configuration handling Error handling Logging

WHAT THE APPLICATION FACTORY PATTERN PROVIDES

Creating the application in a function, configured per environment.

WHY IT MATTERS

It makes testing straightforward and avoids import-time side effects.

WHAT BLUEPRINTS PROVIDE

Grouping routes into modules.

WHAT TO BE CAREFUL WITH

Global state, which behaves unexpectedly across requests The development server, which must never serve production traffic Growing beyond what your structure supports

WHAT TO RUN IN PRODUCTION

A production server, behind a reverse proxy.

WHAT TO ESTABLISH EARLY

A structure, before the application grows.


Was this answer helpful?
Back

Are you happy with your experience? Leave us a review on Trustpilot.


Trustpilot