Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What's the difference between a django package and a python library?

Tags:

python

django

I'm new to django and I've been browsing around the djangopackages site. I'm wondering what is the difference between those "django" packages, and python libraries that are not django packages.

So for example sendgrid has a django package and also a few regular python libraries. If I want to use the sendgrid wrapper from a django app, what benefits do i get by using the django package rather than the other python libraries that are available and more frequently maintained?

like image 545
David Haddad Avatar asked Jul 11 '12 09:07

David Haddad


1 Answers

A Django package has the general structure of a Django app (models.py, views.py, et cetera) and it can have additional settings to define in your settings.py file. Using the Django package makes it easier to integrate the functionality into your Django web application rather than simply calling a Python library.

Usually the Python library provides all the functionality and a Django package provides additional functionality to use it (such as useful template tags, settings or context processors). You'll need to install both as the Django package won't work without the library. But this can vary so you'll need to look into the provided functionalities by the Django package.

like image 52
Simeon Visser Avatar answered Nov 13 '22 17:11

Simeon Visser