What makes a package useful? What is it about certain packages that makes them must-haves for any project?
We’ll go over topics like: purpose, structure, docs, tests, availability on PyPI and Github/Bitbucket, activity, and more.
We will visit some of the most useful grid categories on djangopackages.com and highlight our top package picks, showing examples of what makes the top packages so great and what could use improvement.
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Django Package Thunderdome by Audrey Roy & Daniel Greenfeld
1. by Audrey Roy and Daniel Greenfeld
@audreyr / @pydanny
1
2. Audrey Roy
• Python & Django developer
for Cartwheel Web / RevSys
• MIT ’04, EE/CS
• PyLadies,
djangopackages.com,
OpenComparison
Django Packages Thunderdome
(Packaginator)
•
@pydanny / @audreyr
Fiancée of Daniel
Greenfeld (pydanny) http://www.flickr.com/photos/chrisjrn/6102009780/
2
3. Daniel Greenfeld
• Python & Django developer for
Cartwheel Web / RevSys
• Learned Python at NASA
• djangopackages.com,
OpenComparison
(Packaginator), django-uni-form
Django Packages Thunderdome
http://www.flickr.com/photos/pydanny/4442245488/
• Fiancé of Audrey Roy (audreyr)
@pydanny / @audreyr
3
4. A Year+ of Package
Comparisons
• We launched
djangopackages.com
July 2010
• We’ve seen the
Django package
Django Packages Thunderdome
ecosystem grow and
change
@pydanny / @audreyr
4
5. Why a Thunderdome?
• Pattern: you hear about the “best” package for
X, and you use it
• Comparison grids on djangopackages.com help
• but not 100% effective/objective
• Why not a Consumer Reports-style analysis?
Django Packages Thunderdome
• This is what a Django community manager
@pydanny / @audreyr
would do
5
7. 1. Purpose
• The name tells you what it does
• “django-” prefix says it’s a Django package
• Even better if coupled with a related
Python package
Django Packages Thunderdome
• The package addresses a real need
@pydanny / @audreyr
7
9. 2. Scope
• Small scope, narrow focus is better
• Application logic will be tighter
• Patching/replacing the app will be
Django Packages Thunderdome
easier
@pydanny / @audreyr
9
10. Scoring: Scope
Range: -5 to +5
• Does one thing: +5
• Does two things: 0
• Does three or more things: -5
Django Packages Thunderdome
@pydanny / @audreyr
10
11. 3. Documentation
• No docs means your app is pre-alpha
• Doc strings do not suffice as
documentation
• If there are dependencies, they should be
in your docs
Django Packages Thunderdome
• Installation steps should be bulletproof
@pydanny / @audreyr
11
12. Scoring: Docs
Range: -5o to +15
• Docs folder in RST/Sphinx format: +10
• Displayed on http://rtfd.org: +5
• Lousy Docs (wiki for example): -5 to -20
• Only README + docstrings: -10
Django Packages Thunderdome
• No docs: -50
@pydanny / @audreyr
12
13. 4. Testing
• Tests improve reliability
• Tests make it easy to advance Python/
Django versions
• Tests make it easier for others to
Django Packages Thunderdome
contribute effectively
@pydanny / @audreyr
13
14. Scoring: Tests
Range: -50 to +15
• Public Jenkins site: +5
• django_coverage/coverage.py: +5
• Well done tests: +5
• No Tests: -10
Django Packages Thunderdome
• Placeholder tests: -50
@pydanny / @audreyr
14
15. 5. Activity
• When was the last commit?
• How frequent are commits?
• Are there periodic version updates?
Django Packages Thunderdome
@pydanny / @audreyr
15
16. Scoring: Activity
Range: 0 to +15
• Last commit up to 3 months ago: +15
• Last commit up to 6 months ago: +10
• Last commit up to 1 year ago: +5
Django Packages Thunderdome
@pydanny / @audreyr
16
17. 6. Community
• Active community leader(s)
• How many people are contributing?
• Proper attribution of authors?
• CONTRIBUTORS.txt?
Django Packages Thunderdome
• README
@pydanny / @audreyr
17
18. Scoring: Community
Range: 0 to +35
• Active community leader: +10
• Lots of divergent forks? Then no
• Number of contributors = # of points
• Maximum of 20 points
Django Packages Thunderdome
• Proper attribution: +5
@pydanny / @audreyr
18
19. 7. Modularity
• “Pluggability”
• Installation should be minimally invasive
• Do not confuse modularity with over
Django Packages Thunderdome
engineering
@pydanny / @audreyr
19
20. Scoring: Modularity
Range: -20 t0 +20
• Just add to up to these things:
• INSTALLED_APPS
• MIDDLEWARE
• urls.py
Django Packages Thunderdome
• models.py in a few cases
@pydanny / @audreyr
• A few custom settings
+20
20
21. Scoring: Modularity
• Having to write your own custom code/
backends from scratch
• Having to write your own templates
• Having to study the code to make it work
Django Packages Thunderdome
• More framework than pluggable
@pydanny / @audreyr
-5 for any of these violations
21
22. 8. Availability on PyPI
• Actually on PyPI
• Latest release on PyPI
• Should not have to go to repo for
working version
Django Packages Thunderdome
• Proper version numbers
@pydanny / @audreyr
22
23. Scoring: PyPI Availability
Range: 0 to +30
• Latest release download link on PyPI: +15
• Latest stable release +5
• Historical versions kept on PyPI: +5
Django Packages Thunderdome
• Good versioning scheme: +5
@pydanny / @audreyr
23
24. 9. VCS/Hosting
• Great: Github or BitBucket
• Okay: Launchpad or SourceForge
• Outdated: Google Project Hosting
Django Packages Thunderdome
• Poor: Your own site
@pydanny / @audreyr
24
25. Scoring: VCS/Hosting
Range: -20 t0 +20
• Github or BitBucket: +20
• Launchpad or SourceForge: +5
• Google Project Hosting: +0
Django Packages Thunderdome
• Hosting your own VCS: -20
@pydanny / @audreyr
25
26. 10. License
• You need a license
• Companies prefer BSD or MIT licenses
• http://opensource.org/licenses/category
Django Packages Thunderdome
@pydanny / @audreyr
26
27. Scoring: License
Range: -15 to +5
• BSD or MIT license: +5
• Any other formal license: 0
• Custom license: -5 to -15
Django Packages Thunderdome
• No license: -15
@pydanny / @audreyr
27
29. A quick warning
• We’re just kidding about the fighting
• Friendly, “constructive criticism”
• Use our feedback to help improve your
favorite package
Django Packages Thunderdome
• Think of us as your friendly Django
@pydanny / @audreyr
community managers (during the talk)
29
30. How packages were
chosen for this
• We sent out a survey and chose the:
★ most commonly-used packages
★ most interesting packages
Django Packages Thunderdome
• Not direct one-to-one comparisons
@pydanny / @audreyr
30
38. Winners: API Creation
1. djangorestframework: 162 out of 175
points
2. django-tastypie: 155 out of 175 points
Django Packages Thunderdome
@pydanny / @audreyr
38
45. Winners: Fundamentals
1. django-debug-toolbar: 120 out of 175 points
2. django-extensions: 115 out of 175 points
Note that this was obviously not a one-to-
Django Packages Thunderdome
one comparison, but a purely points-based
@pydanny / @audreyr
evaluation
45
51. django- Pinax django-
Registration registration (accounts)
django-userena
social-auth
Purpose 15 10 15 15
Popular
Scope unofficial 5
mirror -5 -5 5
with templates? If the
Documentation 10 10 15 10
original had templates,
Tests common fork5would
this 0 5 0
not be needed
Activity 15 10 15 15
Community 25 35 16 26
Modularity -15 -5 -10 -5
PyPI 15 20 25 25
Django Packages Thunderdome
VCS/Hosting 20 20 20 20
@pydanny / @audreyr
License 5 5 5 5
Totals 100 100 101 116
51
52. Winners: Registration
1. django-social-auth: 116 out of 175 points
2. django-userena: 101 out of 175 points
Interesting comment from survey:
Django Packages Thunderdome
“Site registration sucks and using Twitter, Facebook, or
@pydanny / @audreyr
Google auth is easier”
52
58. Winners: Profiles
1. idios: 111 out of 175 points
2. django-userena: 101 out of 175 points
Room for improvement:
Django Packages Thunderdome
Low point values.
Few surveyed users knew of a good Django
@pydanny / @audreyr
profiles app.
Some roll their own each time.
58
64. Winner: Blogs
1. django-blog-zinnia: 155 out of 175 points
Most points by a landslide.
So many blog packages exist that this gets buried.
Django Packages Thunderdome
Note that biblion is early/pre-alpha. With docs, it
@pydanny / @audreyr
could become a promising option for 1 blog per
profile sites.
64
69. Winner: Tagging
1. django-taggit: 146 out of 175 points
Sets the bar for the other packages. High points
for all compared.
Django Packages Thunderdome
“Stable API and responsive dev”
@pydanny / @audreyr
“Lots of magic under the hood, though”
69
74. Database Migrations South nashvegas
Purpose 5 5
Scope 5 5
Documentation 15 15
Tests 5 -10
Activity 15 10
Community If nashvegas 22 tests plus one
11 had
Modularity
other higher 15
20
sub-score, it could
have won!
PyPI 25 30
Django Packages Thunderdome
VCS/Hosting 20 20
@pydanny / @audreyr
License 0 5
Totals 140 117
74
75. Winners: DB Migrations
1. South: 140 out of 175 points
2. nashvegas: 117 out of 175 points
“I’m looking forward to someone else cha#enging this
space but South is by far the best that we currently have”
Django Packages Thunderdome
“South is the de facto standard...sti# run into more
@pydanny / @audreyr
%iction on managing DB changes than I care for, but it’s
a lot better than doing without.”
75
80. They also can’t live without
• celery & django-celery with redis
• django-haystack with pysolr, sometimes
whoosh
• django-fixture-generator, django-sorting,
Django Packages Thunderdome
django-pagination, django-uni-form,
django-floppy-forms
@pydanny / @audreyr
80
83. Score high on the base criteria
• Purpose (0 to +15) • Community (0 to +35)
• Scope (-5 to +5) • Modularity (-20 to +20)
• Docs (-50 to +15) • PyPI Availability (0 to +30)
• Tests (-50 to +15) • VCS/Hosting (-20 to +20)
• Activity (0 to +15) • License (-15 to +5)
Maximum Score: +175
83
84. Beyond the base criteria
• Run code through PEP8 checker
• Aim for 100% test coverage
• Elegant, clean, explicit ways of doing things
•
Django Packages Thunderdome
Minimize magical code
@pydanny / @audreyr
84
85. How to get more users for
your package
Use djangopackages.com to find similar packages
• Add a grid (if needed)
• Add your package to the grid
• Add grid features
Django Packages Thunderdome
• Make yours better than its competitors
@pydanny / @audreyr
85
86. • Tweet your self-calculated score at
@pydanny and @audreyr
• We’ll evaluate it ourselves
Django Packages Thunderdome
• If it ranks high, we’ll help spread the word
@pydanny / @audreyr
• (conference bandwidth-permitting)
86