Previous Article Next Article What is the difference between a Framework and a Python Library?
Posted in Python

What is the difference between a Framework and a Python Library?

What is the difference between a Framework and a Python Library? Posted on May 16, 20187 Comments

Ask your questions here:
Up vote your favorites.

Suggest a project, tutorial, or topic:

The long term goal: build a search engine of technical and non-technical questions with concise video responses. The more questions that we get, the more answers we can research and respond with.

Check out our projects:


  1. so, all frameworks are the library but a library is not framework ? in python library is also called API that makes it super confusing, let me clear out what i'm asking: in framework things i had to build using library is easily available as already available, so my reach to library has been shortened and framework did that but still frameworks uses libraries to work on their own to reach libraries right?

  2. It seems this leaves the distinction between framework and package somewhat fuzzy (and maybe that's the way it should be). E.g., is matplotlib a framework? Most would say no, but why, exactly? It gives you a bunch of coherent code that speeds up development for plotting. I think one thing is clear: all python frameworks are packages, but not all packages are frameworks. There are issues of scale (e.g., a three-function package that computes derivatives of polynomials is not a framework). I think also that core libraries are not frameworks, they are just part of Python (I guess you could say Python is a framework but that would be weird). Django unleased book defines a framework as "a large codebase, or collection of code, meant to provide universal, reusable behavior for a targeted project….Frameworks are different from other external codebases, such as libraries, because they feature *inversion of control*…Without a framework, the developer controls the flow of a program…By contrast, when using a framework, the developer adds or extends code in specific ways which is essentially the base of the program…In this way, the framework, not the developer, dictates control flow." I'm frankly not happy with this definition as it isn't actually that clear what this inversion of control amounts to. I think it is largely a matter of degree, and it is sort of like a lot of things: I can't define it, but I know it when I see it. But there are also grey areas.

  3. thank you for this explication it was very clear. i have some question, please reply to me. there are many functions in python but i know only some of basics, so how can i begin my application using python? how do i to know if a function exist or i have to develop it? and also a different new syntaxies that i meet in programs python?

  4. I really appreciate your videos but can I politely suggest some daily exercise and a non-alcohol non-drug lifestyle? You seem to be under a lot of stress.

Leave a Reply

Your email address will not be published. Required fields are marked *