This repository has been archived by the owner on Mar 11, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
/
setup.py
executable file
·107 lines (78 loc) · 2.65 KB
/
setup.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
"""
Flask-Generic-Views
===================
Flask-Generic-Views is a set of generic class-based views for the Flask
microframework inspired by the ones in Django.
.. code:: python
from flask import Flask
from flask.ext.generic_views import TemplateView
app = Flask(__name__)
index_view = TemplateView.as_view('index', template_file='index.html')
app.add_url_rule('/', index_view)
if __name__ == '__main__':
app.run()
Database Support
----------------
Currently Flask-Generic-Views supports use of Models created with SQLAlchemy.
Installation
------------
To install the basic views:
.. code:: bash
$ pip install flask-generic-views
To install optional SQLAlchemy support:
.. code:: bash
$ pip install flask-generic-views[sqlalchemy]
To install all optional packages:
.. code:: bash
$ pip install flask-generic-views[all]
Links
-----
* `Documentation <https://flask-generic-views.readthedocs.org/>`_
* `GitHub <https://github.com/artisanofcode/flask-generic-views>`_
"""
import ast
import re
from setuptools import setup
_version_re = re.compile(r'__version__\s+=\s+(.*)')
with open('flask_generic_views/__init__.py', 'rb') as f:
version = f.read().decode('utf-8')
version = str(ast.literal_eval(_version_re.search(version).group(1)))
extras_require = {
'sqlalchemy': ['flask-sqlalchemy>=2.1', 'wtforms-sqlalchemy>=0.1'],
}
extras_require['all'] = sum(extras_require.values(), [])
setup(
name='Flask-Generic-Views',
version=version,
url='http://github.com/artisanofcode/flask-generic-views',
license='BSD',
author='Daniel Knell',
author_email='[email protected]',
description='A set of generic class-based views for flask',
long_description=__doc__,
packages=['flask_generic_views'],
zip_safe=False,
platforms='any',
install_requires=[
'flask>=0.10',
'flask-wtf>=0.12',
'inflection>=0.3.1',
],
extras_require=extras_require,
classifiers=[
'Environment :: Web Environment',
'Intended Audience :: Developers',
'License :: OSI Approved :: BSD License',
'Operating System :: OS Independent',
'Programming Language :: Python',
'Programming Language :: Python :: 2',
'Programming Language :: Python :: 2.6',
'Programming Language :: Python :: 2.7',
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3.3',
'Programming Language :: Python :: 3.4',
'Programming Language :: Python :: 3.5',
'Topic :: Internet :: WWW/HTTP :: Dynamic Content',
'Topic :: Software Development :: Libraries :: Python Modules',
]
)