forked from pallets/flask
/
extensions.py
577 lines (560 loc) · 20.1 KB
/
extensions.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
# -*- coding: utf-8 -*-
from urlparse import urlparse
from werkzeug import url_quote
from flask import Markup
class Extension(object):
def __init__(self, name, author, description,
github=None, bitbucket=None, docs=None, website=None,
approved=False, notes=None):
self.name = name
self.author = author
self.description = Markup(description)
self.github = github
self.bitbucket = bitbucket
self.docs = docs
self.website = website
self.approved = approved
self.notes = notes
def to_json(self):
rv = vars(self).copy()
rv['description'] = unicode(rv['description'])
return rv
@property
def pypi(self):
return 'http://pypi.python.org/pypi/%s' % url_quote(self.name)
@property
def docserver(self):
if self.docs:
return urlparse(self.docs)[1]
# This list contains all extensions that were approved as well as those which
# passed listing.
extensions = [
Extension('Flask-OAuth', 'Armin Ronacher',
description='''
<p>Adds <a href="http://oauth.net/">OAuth</a> support to Flask.
''',
github='mitsuhiko/flask-oauth',
docs='http://packages.python.org/Flask-OAuth/',
notes='''
Short long description, missing tests.
'''
),
Extension('Flask-OpenID', 'Armin Ronacher',
description='''
<p>Adds <a href="http://openid.net/">OpenID</a> support to Flask.
''',
github='mitsuhiko/flask-openid',
docs='http://packages.python.org/Flask-OpenID/',
notes='''
Short long description, missing tests.
'''
),
Extension('Flask-Babel', 'Armin Ronacher',
description='''
<p>Adds i18n/l10n support to Flask, based on
<a href=http://babel.edgewall.org/>babel</a> and
<a href=http://pytz.sourceforge.net/>pytz</a>.
''',
github='mitsuhiko/flask-babel',
docs='http://packages.python.org/Flask-Babel/',
approved=True,
notes='''
How to improve: add a better long description to the next release.
'''
),
Extension('Flask-SQLAlchemy', 'Armin Ronacher',
description='''
<p>Adds SQLAlchemy support to Flask. Quick and easy.
''',
github='mitsuhiko/flask-sqlalchemy',
docs='http://packages.python.org/Flask-SQLAlchemy/',
approved=True,
notes='''
How to improve: add a better long description to the next release.
'''
),
Extension('Flask-XML-RPC', 'Matthew Frazier',
description='''
<p>Adds <a href="http://www.xmlrpc.com/">XML-RPC</a> support to Flask.
''',
bitbucket='leafstorm/flask-xml-rpc',
docs='http://packages.python.org/Flask-XML-RPC/',
approved=True
),
Extension('Flask-CouchDB', 'Matthew Frazier',
description='''
<p>Adds <a href="http://couchdb.apache.org/">CouchDB</a> support to Flask.
''',
bitbucket='leafstorm/flask-couchdb',
docs='http://packages.python.org/Flask-CouchDB/',
approved=True,
notes='''
There is also Flask-CouchDBKit. Both are fine because they are
doing different things, but the latter is not yet approved.
'''
),
Extension('Flask-Uploads', 'Matthew Frazier',
description='''
<p>Flask-Uploads allows your application to flexibly and
efficiently handle file uploading and serving the uploaded files.
You can create different sets of uploads - one for document
attachments, one for photos, etc.
''',
bitbucket='leafstorm/flask-uploads',
docs='http://packages.python.org/Flask-Uploads/',
approved=True
),
Extension('Flask-Themes', 'Matthew Frazier',
description='''
<p>Flask-Themes makes it easy for your application to support
a wide range of appearances.
''',
bitbucket='leafstorm/flask-themes',
docs='http://packages.python.org/Flask-Themes/',
approved=True
),
Extension('Flask-CouchDBKit', 'Kridsada Thanabulpong',
description='''
<p>Adds <a href="http://www.couchdbkit.org/">CouchDBKit</a> support to Flask.
''',
github='sirn/flask-couchdbkit',
docs='http://packages.python.org/Flask-CouchDBKit/'
),
Extension('Flask-Genshi', 'Dag Odenhall',
description='''
<p>Adds support for the <a href="http://genshi.edgewall.org/">Genshi</a>
templating language to Flask applications.
''',
github='dag/flask-genshi',
docs='http://packages.python.org/Flask-Genshi/',
approved=True,
notes='''
This is the first template engine extension. When others come
around it would be a good idea to decide on a common interface.
'''
),
Extension('Flask-Mail', 'Dan Jacob',
description='''
<p>Makes sending mails from Flask applications very easy and
has also support for unittesting.
''',
bitbucket='danjac/flask-mail',
docs='http://packages.python.org/flask-mail/',
approved=True
),
Extension('Flask-WTF', 'Dan Jacob',
description='''
<p>Flask-WTF offers simple integration with WTForms. This
integration includes optional CSRF handling for greater security.
''',
bitbucket='danjac/flask-wtf',
docs='http://packages.python.org/Flask-WTF/',
approved=True
),
Extension('Flask-Testing', 'Dan Jacob',
description='''
<p>The Flask-Testing extension provides unit testing utilities for Flask.
''',
bitbucket='danjac/flask-testing',
docs='http://packages.python.org/Flask-Testing/',
approved=True
),
Extension('Flask-Script', 'Dan Jacob',
description='''
<p>The Flask-Script extension provides support for writing external
scripts in Flask. It uses argparse to parse command line arguments.
''',
bitbucket='danjac/flask-script',
docs='http://packages.python.org/Flask-Script/',
approved=True,
notes='''
Flask-Actions has some overlap. Consider that when approving
Flask-Actions or similar packages.
'''
),
Extension('flask-csrf', 'Steve Losh',
description='''
<p>A small Flask extension for adding
<a href=http://en.wikipedia.org/wiki/CSRF>CSRF</a> protection.
''',
docs='http://sjl.bitbucket.org/flask-csrf/',
bitbucket='sjl/flask-csrf',
notes='''
Will not be approved because this is functionality that should be
handled in the form handling systems which is for Flask-WTF already
the case. Also, this implementation only supports one open tab
with forms.
Name is not following Flask extension naming rules.
Considered for unlisting.
'''
),
Extension('flask-lesscss', 'Steve Losh',
description='''
<p>
A small Flask extension that makes it easy to use
<a href=http://lesscss.org/>LessCSS</a> with your
Flask application.
''',
docs='http://sjl.bitbucket.org/flask-lesscss/',
bitbucket='sjl/flask-lesscss',
notes='''
Broken package description, nonconforming package name, does not
follow standard API rules (init_lesscss instead of lesscss).
Considered for unlisting, improved version should release as
"Flask-LessCSS" with a conforming API and fixed packages indices,
as well as a testsuite.
'''
),
Extension('Flask-Creole', 'Ali Afshar',
description='''
<p>Creole parser filters for Flask.
''',
docs='http://packages.python.org/Flask-Creole',
bitbucket='aafshar/flask-creole-main',
approved=True,
notes='''
Flask-Markdown and this should share API, consider that when
approving Flask-Markdown
'''
),
Extension('Flask-Cache', 'Thadeus Burgess',
description='''
<p>Adds cache support to your Flask application.
''',
docs='http://packages.python.org/Flask-Cache',
github='thadeusb/flask-cache',
),
Extension('Flask-Principal', 'Ali Afshar',
description='''
<p>Identity management for Flask.
''',
docs='http://packages.python.org/Flask-Principal',
bitbucket='aafshar/flask-principal-main',
approved=False
),
Extension('Flask-Zen', 'Noah Kantrowitz',
description='''
<p>Flask-Zen allows you to use PyZen via Flask-Script commands.
''',
docs='http://packages.python.org/Flask-Zen/',
github='coderanger/flask-zen',
approved=False
),
Extension('Flask-Assets', u'Michael Elsdörfer',
description='''
<p>
Integrates the webassets library with Flask, adding support for
merging, minifying and compiling CSS and Javascript files.
''',
docs='http://elsdoerfer.name/docs/flask-assets/',
github='miracle2k/flask-assets',
approved=False
),
Extension('Flask-AutoIndex', 'Heungsub Lee',
description='''
<p>
An extension that generates an index page for your Flask
application automatically
''',
docs='http://packages.python.org/Flask-AutoIndex/',
github='sublee/flask-autoindex',
approved=False
),
Extension('Flask-Celery', 'Ask Solem',
description='''
<p>
Celery integration for Flask
''',
docs='http://ask.github.com/celery/',
github='ask/flask-celery',
approved=False
),
Extension('Frozen-Flask', 'Simon Sapin',
description='''
<p>
Freezes a Flask application into a set of static files.
The result can be hosted without any server-side software
other than a traditional web server.
''',
docs='http://packages.python.org/Frozen-Flask/',
github='SimonSapin/Frozen-Flask',
approved=True
),
Extension('Flask-FlatPages', 'Simon Sapin',
description='''
<p>
Provides flat static pages to a Flask application, based on text
files as opposed to a relational database.
''',
docs='http://packages.python.org/Flask-FlatPages/',
github='SimonSapin/Flask-FlatPages',
approved=True
),
Extension('Flask-FluidDB', 'Ali Afshar',
description='''
<p>
FluidDB access for Flask.
''',
docs='http://packages.python.org/Flask-FluidDB/',
bitbucket='aafshar/flask-fluiddb-main',
approved=False
),
Extension('Flask-fillin', 'Christoph Heer',
description='''
<p>The Flask-fillin extension provides simple utilities for testing your forms in Flask application..
''',
github='jarus/flask-fillin',
docs='http://packages.python.org/Flask-fillin/',
),
Extension('Flask-Gravatar', 'Zelenyak Aleksandr',
description='''
<p>
Small extension for Flask to make using Gravatar easy.
''',
docs='http://packages.python.org/Flask-Gravatar/',
github='zzzsochi/Flask-Gravatar',
approved=False
),
Extension('Flask-HTMLBuilder', 'Zahari Petkov',
description='''
<p>
Flask-HTMLBuilder is an extension that allows flexible and easy
Python-only generation of HTML snippets and full HTML documents
using a robust syntax.
''',
docs='http://majorz.github.com/flask-htmlbuilder/',
github='majorz/flask-htmlbuilder',
approved=False
),
Extension('Flask-MongoAlchemy', 'Francisco Souza',
description='''
<p>
Add Flask support for MongoDB using MongoAlchemy.
''',
docs='http://packages.python.org/Flask-MongoAlchemy/',
github='cobrateam/flask-mongoalchemy',
approved=False
),
Extension('Flask-DebugToolbar', 'Matt Good',
description='''
<p>
A port of the Django debug toolbar to Flask
''',
docs='https://github.com/mgood/flask-debugtoolbar',
github='mgood/flask-debugtoolbar',
approved=False
),
Extension('Flask-Login', 'Matthew Frazier',
description='''
<p>
Flask-Login provides user session management for Flask. It
handles the common tasks of logging in, logging out, and
remembering your users' sessions over extended periods of time.
''',
bitbucket='leafstorm/flask-login',
docs='http://packages.python.org/Flask-Login/',
approved=True
),
Extension('Flask-Exceptional', 'Jonathan Zempel',
description='''
<p>
Adds Exceptional support to Flask applications
''',
docs='http://packages.python.org/Flask-Exceptional/',
github='jzempel/flask-exceptional',
approved=True,
),
Extension('Flask-Bcrypt', 'Max Countryman',
description='''
<p>
Bcrypt support for hashing passwords
''',
github='maxcountryman/flask-bcrypt',
),
Extension('Flask-MongoKit', 'Christoph Heer',
description='''
<p>
Flask extension to better integrate MongoKit into Flask
''',
docs='http://packages.python.org/Flask-MongoKit/',
github='jarus/flask-mongokit'
),
Extension('Flask-GAE-Mini-Profiler', 'Pascal Hartig',
description='''
<p>
Flask integration of gae_mini_profiler for Google App Engine.
''',
docs='http://packages.python.org/Flask-GAE-Mini-Profiler',
github='passy/flask-gae-mini-profiler'
),
Extension('Flask-Admin', 'Andy Wilson',
description='''
<p>
Flask extenstion module that provides an admin interface
''',
docs='http://packages.python.org/Flask-Admin/',
github='wilsaj/flask-admin'
),
Extension('Flask-ZODB', 'Dag Odenhall',
description='''
<p>
Use the ZODB with Flask
''',
docs='http://packages.python.org/Flask-ZODB/',
github='dag/flask-zodb',
approved=True
),
Extension('Flask-Peewee', 'Charles Leifer',
description='''
<p>
Integrates Flask and the peewee orm
''',
docs='http://charlesleifer.com/docs/flask-peewee/index.html',
github='coleifer/flask-peewee',
approved=False
),
Extension('Flask-Lettuce', 'Daniel, Dao Quang Minh',
description='''
<p>
Add Lettuce support for Flask
''',
# docs='http://packages.python.org/Flask-Lettuce/',
github='dqminh/flask-lettuce',
approved=False
),
Extension('Flask-Sijax', 'Slavi Pantaleev',
description='''
<p>
Flask integration for Sijax,
a Python/jQuery library that makes AJAX easy to use
''',
docs='http://packages.python.org/Flask-Sijax/',
github='spantaleev/flask-sijax',
approved=False
),
Extension('Flask-Dashed', 'Jean-Philippe Serafin',
description='''
<p>
Flask-Dashed provides tools for building
simple and extensible admin interfaces.
''',
docs='http://jeanphix.github.com/Flask-Dashed/',
github='jeanphix/Flask-Dashed',
approved=False
),
Extension('Flask-SeaSurf', 'Max Countryman',
description='''
<p>
SeaSurf is a Flask extension for preventing
cross-site request forgery (CSRF).
''',
docs='http://packages.python.org/Flask-SeaSurf/',
github='maxcountryman/flask-seasurf',
),
Extension('Flask-PyMongo', 'Dan Crosta',
description='''
<p>
Flask-PyMongo bridges Flask and PyMongo.
''',
docs='http://readthedocs.org/docs/flask-pymongo/',
github='dcrosta/flask-pymongo',
),
]
# This is a list of extensions that is currently rejected from listing and with
# that also not approved. If an extension ends up here it should improved to
# be listed.
unlisted = [
Extension('Flask-Actions', 'Young King',
description='''
<p>
Flask-actions provide some management comands for flask based
project.
''',
docs='http://packages.python.org/Flask-Actions/',
bitbucket='youngking/flask-actions',
approved=False,
notes='''
Rejected because of missing description in PyPI, formatting issues
with the documentation (missing headlines, scrollbars etc.) and a
general clash of functionality with the Flask-Script package.
Latter should not be a problem, but the documentation should
improve. For listing, the extension developer should probably
discuss the extension on the mailinglist with others.
Futhermore it also has an egg registered with an invalid filename.
'''
),
Extension('Flask-Jinja2Extender', 'Dan Colish',
description='''
<p>
''',
docs=None,
github='dcolish/flask-jinja2extender',
approved=False,
notes='''
Appears to be discontinued.
Usecase not obvious, hacky implementation, does not solve a problem
that could not be solved with Flask itself. I suppose it is to aid
other extensions, but that should be discussed on the mailinglist.
'''
),
Extension('Flask-Markdown', 'Dan Colish',
description='''
<p>
This is a small module to a markdown processing filter into your
flask.
''',
docs='http://packages.python.org/Flask-Markdown/',
github='dcolish/flask-markdown',
approved=False,
notes='''
Would be great for enlisting but it should follow the API of
Flask-Creole. Besides that, the docstrings are not valid rst (run
through rst2html to see the issue) and it is missing tests.
Otherwise fine :)
'''
),
Extension('flask-urls', 'Steve Losh',
description='''
<p>
A collection of URL-related functions for Flask applications.
''',
docs='http://sjl.bitbucket.org/flask-urls/',
bitbucket='sjl/flask-urls',
approved=False,
notes='''
Broken PyPI index and non-conforming extension name. Due to the
small featureset this was also delisted from the list. It was
there previously before the approval process was introduced.
'''
),
Extension('Flask-Coffee', 'Col Wilson',
description='''
<p>
Automatically compile CoffeeScript files while developing with
the Flask framework.
''',
docs=None,
approved=False,
notes='''
On the mailing list, author claims it's flask-lesscss with a
different label. No sphinx-based docs, just a blog post. No
publicly accessible repository -- requires login on
bettercodes.org.
'''
),
Extension('Flask-Solr', 'Ron DuPlain',
description='''
<p>
Add Solr support to Flask using pysolr.
''',
docs=None,
github='willowtreeapps/flask-solr',
notes='''
Fully exposes pysolr API in Flask extension pattern, and code is
production-ready. It lacks documentation and tests because the
author has yet to find the time.
'''
),
]
extensions.sort(key=lambda x: x.name.lower())
unlisted.sort(key=lambda x: x.name.lower())