elukjanovica 2024-04-28 08:30:39 +03:00
parent 07cd5069db
commit 8fcc0ea7d0
2496 changed files with 84911 additions and 575 deletions

33
main.py
View File

@ -2,19 +2,33 @@ from flask import Flask, render_template, redirect, request, session, url_for
from flask_sqlalchemy import SQLAlchemy
from flask_admin import Admin
from flask_admin.contrib.sqla import ModelView
from werkzeug.security import generate_password_hash, check_password_hash
from flask_security import Security, SQLAlchemyUserDatastore, UserMixin, RoleMixin
app = Flask(__name__)
app.secret_key = 'bebra'
app.config['SQLALCHEMY_DATABASE_URI'] = 'sqlite:///Picture_Puzzle_web.db'
app.config['SECURITY_PASSWORD_SALT'] = app.config['SECRET_KEY']
db = SQLAlchemy(app)
class User(db.Model):
# Define models for Flask-Security
roles_users = db.Table('roles_users',
db.Column('user_id', db.Integer(), db.ForeignKey('user.id')),
db.Column('role_id', db.Integer(), db.ForeignKey('role.id'))
)
class Role(db.Model, RoleMixin):
id = db.Column(db.Integer(), primary_key=True)
name = db.Column(db.String(80), unique=True)
class User(db.Model, UserMixin):
id = db.Column(db.Integer, primary_key=True)
username = db.Column(db.String(100), unique=True, nullable=False)
password = db.Column(db.String(100), nullable=False)
email = db.Column(db.String(100), unique=True, nullable=False)
username = db.Column(db.String(255), unique=True)
email = db.Column(db.String(255), unique=True)
password = db.Column(db.String(255))
active = db.Column(db.Boolean())
roles = db.relationship('Role', secondary=roles_users,
backref=db.backref('users', lazy='dynamic'))
class Post(db.Model):
id = db.Column(db.Integer, primary_key=True)
date_created = db.Column(db.String(100), unique=False, nullable=False)
@ -22,6 +36,13 @@ class Post(db.Model):
title = db.Column(db.String(100), nullable=False)
image = db.Column(db.String(100), nullable=False)
user_datastore = SQLAlchemyUserDatastore(db, User, Role)
security = Security(app, user_datastore)
admin = Admin(app, name='Admin Panel', template_mode='bootstrap3')
admin.add_view(ModelView(User, db.session))
admin.add_view(ModelView(Role, db.session))
def create_tables():
with app.app_context():
db.create_all()

View File

@ -0,0 +1,27 @@
Copyright (c) 2013-2023 by the Babel Team, see AUTHORS for more information.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
are met:
1. Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in
the documentation and/or other materials provided with the
distribution.
3. Neither the name of the copyright holder nor the names of its
contributors may be used to endorse or promote products derived
from this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

View File

@ -0,0 +1,37 @@
Metadata-Version: 2.1
Name: Babel
Version: 2.14.0
Summary: Internationalization utilities
Home-page: https://babel.pocoo.org/
Author: Armin Ronacher
Author-email: armin.ronacher@active-4.com
Maintainer: Aarni Koskela
Maintainer-email: akx@iki.fi
License: BSD-3-Clause
Project-URL: Source, https://github.com/python-babel/babel
Classifier: Development Status :: 5 - Production/Stable
Classifier: Environment :: Web Environment
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: BSD License
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3 :: Only
Classifier: Programming Language :: Python :: 3.7
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: Implementation :: CPython
Classifier: Programming Language :: Python :: Implementation :: PyPy
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Requires-Python: >=3.7
License-File: LICENSE
Requires-Dist: pytz >=2015.7 ; python_version < "3.9"
Provides-Extra: dev
Requires-Dist: pytest >=6.0 ; extra == 'dev'
Requires-Dist: pytest-cov ; extra == 'dev'
Requires-Dist: freezegun ~=1.0 ; extra == 'dev'
A collection of tools for internationalizing Python applications.

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,5 @@
Wheel-Version: 1.0
Generator: bdist_wheel (0.42.0)
Root-Is-Purelib: true
Tag: py3-none-any

View File

@ -0,0 +1,20 @@
[babel.checkers]
num_plurals = babel.messages.checkers:num_plurals
python_format = babel.messages.checkers:python_format
[babel.extractors]
ignore = babel.messages.extract:extract_nothing
javascript = babel.messages.extract:extract_javascript
python = babel.messages.extract:extract_python
[console_scripts]
pybabel = babel.messages.frontend:main
[distutils.commands]
compile_catalog = babel.messages.setuptools_frontend:compile_catalog
extract_messages = babel.messages.setuptools_frontend:extract_messages
init_catalog = babel.messages.setuptools_frontend:init_catalog
update_catalog = babel.messages.setuptools_frontend:update_catalog
[distutils.setup_keywords]
message_extractors = babel.messages.setuptools_frontend:check_message_extractors

View File

@ -0,0 +1 @@
babel

View File

@ -0,0 +1,31 @@
Copyright (c) 2013 by Serge S. Koval, Armin Ronacher and contributors.
Some rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are
met:
* Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above
copyright notice, this list of conditions and the following
disclaimer in the documentation and/or other materials provided
with the distribution.
* The names of the contributors may not be used to endorse or
promote products derived from this software without specific
prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

View File

@ -0,0 +1,49 @@
Metadata-Version: 2.1
Name: Flask-BabelEx
Version: 0.9.4
Summary: Adds i18n/l10n support to Flask applications
Home-page: http://github.com/mrjoes/flask-babelex
Author: Serge S. Koval
Author-email: serge.koval+github@gmail.com
License: BSD
Platform: any
Classifier: Development Status :: 4 - Beta
Classifier: Environment :: Web Environment
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: BSD License
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python
Classifier: Programming Language :: Python :: 3
Classifier: Topic :: Internet :: WWW/HTTP :: Dynamic Content
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Requires-Dist: Flask
Requires-Dist: Babel (>=1.0)
Requires-Dist: speaklater (>=1.2)
Requires-Dist: Jinja2 (>=2.5)
Flask-BabelEx
-------------
Adds i18n/l10n support to Flask applications with the help of the
`Babel`_ library.
This is fork of official Flask-Babel extension with following features:
1. It is possible to use multiple language catalogs in one Flask application;
2. Localization domains: your extension can package localization file(s) and use them
if necessary;
3. Does not reload localizations for each request.
Links
`````
* `documentation <http://packages.python.org/Flask-BabelEx>`_
* `development version
<http://github.com/mrjoes/flask-babelex/zipball/master#egg=Flask-BabelEx-dev>`_
* `original Flask-Babel extension <https://pypi.python.org/pypi/Flask-Babel>`_.
.. _Babel: http://babel.edgewall.org/

View File

@ -0,0 +1,10 @@
Flask_BabelEx-0.9.4.dist-info/INSTALLER,sha256=zuuue4knoyJ-UwPPXg8fezS7VCrXJQrAP7zeNuwvFQg,4
Flask_BabelEx-0.9.4.dist-info/LICENSE,sha256=ddAMnohycQ6AB7oPJc5ub8wBXPTHoREsY9gS6k3o5BE,1490
Flask_BabelEx-0.9.4.dist-info/METADATA,sha256=7Ucgrn0yksLvIX_i1atNyxdK-O2G-vVQnYeElrIr_gU,1545
Flask_BabelEx-0.9.4.dist-info/RECORD,,
Flask_BabelEx-0.9.4.dist-info/WHEEL,sha256=g4nMs7d-Xl9-xC9XovUrsDHGXt-FT0E17Yqo92DEfvY,92
Flask_BabelEx-0.9.4.dist-info/top_level.txt,sha256=AqbfDJxlPas3yrFqQ60dYfNeWBDrShj9T0EMPZhmIDc,14
flask_babelex/__init__.py,sha256=JwnmgbU_WKVx1a1L0qYaE0XeW2kaQ4I58wjW6_B8kEg,22676
flask_babelex/__pycache__/__init__.cpython-312.pyc,,
flask_babelex/__pycache__/_compat.cpython-312.pyc,,
flask_babelex/_compat.py,sha256=VjIWQF9U44ZEa3ZvTDGRRM2KgUdv3aijTVrLS3m8nr8,362

View File

@ -0,0 +1,5 @@
Wheel-Version: 1.0
Generator: bdist_wheel (0.34.2)
Root-Is-Purelib: true
Tag: py3-none-any

View File

@ -0,0 +1 @@
flask_babelex

View File

@ -0,0 +1,22 @@
Copyright (c) 2011 Matthew Frazier
Permission is hereby granted, free of charge, to any person
obtaining a copy of this software and associated documentation
files (the "Software"), to deal in the Software without
restriction, including without limitation the rights to use,
copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the
Software is furnished to do so, subject to the following
conditions:
The above copyright notice and this permission notice shall be
included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
OTHER DEALINGS IN THE SOFTWARE.

View File

@ -0,0 +1,183 @@
Metadata-Version: 2.1
Name: Flask-Login
Version: 0.6.3
Summary: User authentication and session management for Flask.
Home-page: https://github.com/maxcountryman/flask-login
Author: Matthew Frazier
Author-email: leafstormrush@gmail.com
Maintainer: Max Countryman
License: MIT
Project-URL: Documentation, https://flask-login.readthedocs.io/
Project-URL: Changes, https://github.com/maxcountryman/flask-login/blob/main/CHANGES.md
Project-URL: Source Code, https://github.com/maxcountryman/flask-login
Project-URL: Issue Tracker, https://github.com/maxcountryman/flask-login/issues
Classifier: Development Status :: 4 - Beta
Classifier: Environment :: Web Environment
Classifier: Framework :: Flask
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python
Classifier: Topic :: Internet :: WWW/HTTP :: Dynamic Content
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Requires-Python: >=3.7
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: Flask >=1.0.4
Requires-Dist: Werkzeug >=1.0.1
# Flask-Login
![Tests](https://github.com/maxcountryman/flask-login/workflows/Tests/badge.svg)
[![coverage](https://coveralls.io/repos/maxcountryman/flask-login/badge.svg?branch=main&service=github)](https://coveralls.io/github/maxcountryman/flask-login?branch=main)
[![Software License](https://img.shields.io/badge/license-MIT-brightgreen.svg)](LICENSE)
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.
Flask-Login is not bound to any particular database system or permissions
model. The only requirement is that your user objects implement a few methods,
and that you provide a callback to the extension capable of loading users from
their ID.
## Installation
Install the extension with pip:
```sh
$ pip install flask-login
```
## Usage
Once installed, the Flask-Login is easy to use. Let's walk through setting up
a basic application. Also please note that this is a very basic guide: we will
be taking shortcuts here that you should never take in a real application.
To begin we'll set up a Flask app:
```python
import flask
app = flask.Flask(__name__)
app.secret_key = 'super secret string' # Change this!
```
Flask-Login works via a login manager. To kick things off, we'll set up the
login manager by instantiating it and telling it about our Flask app:
```python
import flask_login
login_manager = flask_login.LoginManager()
login_manager.init_app(app)
```
To keep things simple we're going to use a dictionary to represent a database
of users. In a real application, this would be an actual persistence layer.
However it's important to point out this is a feature of Flask-Login: it
doesn't care how your data is stored so long as you tell it how to retrieve it!
```python
# Our mock database.
users = {'foo@bar.tld': {'password': 'secret'}}
```
We also need to tell Flask-Login how to load a user from a Flask request and
from its session. To do this we need to define our user object, a
`user_loader` callback, and a `request_loader` callback.
```python
class User(flask_login.UserMixin):
pass
@login_manager.user_loader
def user_loader(email):
if email not in users:
return
user = User()
user.id = email
return user
@login_manager.request_loader
def request_loader(request):
email = request.form.get('email')
if email not in users:
return
user = User()
user.id = email
return user
```
Now we're ready to define our views. We can start with a login view, which will
populate the session with authentication bits. After that we can define a view
that requires authentication.
```python
@app.route('/login', methods=['GET', 'POST'])
def login():
if flask.request.method == 'GET':
return '''
<form action='login' method='POST'>
<input type='text' name='email' id='email' placeholder='email'/>
<input type='password' name='password' id='password' placeholder='password'/>
<input type='submit' name='submit'/>
</form>
'''
email = flask.request.form['email']
if email in users and flask.request.form['password'] == users[email]['password']:
user = User()
user.id = email
flask_login.login_user(user)
return flask.redirect(flask.url_for('protected'))
return 'Bad login'
@app.route('/protected')
@flask_login.login_required
def protected():
return 'Logged in as: ' + flask_login.current_user.id
```
Finally we can define a view to clear the session and log users out:
```python
@app.route('/logout')
def logout():
flask_login.logout_user()
return 'Logged out'
```
We now have a basic working application that makes use of session-based
authentication. To round things off, we should provide a callback for login
failures:
```python
@login_manager.unauthorized_handler
def unauthorized_handler():
return 'Unauthorized', 401
```
Documentation for Flask-Login is available on [ReadTheDocs](https://flask-login.readthedocs.io/en/latest/).
For complete understanding of available configuration, please refer to the [source code](https://github.com/maxcountryman/flask-login).
## Contributing
We welcome contributions! If you would like to hack on Flask-Login, please
follow these steps:
1. Fork this repository
2. Make your changes
3. Install the dev requirements with `pip install -r requirements/dev.txt`
4. Submit a pull request after running `tox` (ensure it does not error!)
Please give us adequate time to review your submission. Thanks!

View File

@ -0,0 +1,22 @@
Flask_Login-0.6.3.dist-info/INSTALLER,sha256=zuuue4knoyJ-UwPPXg8fezS7VCrXJQrAP7zeNuwvFQg,4
Flask_Login-0.6.3.dist-info/LICENSE,sha256=ep37nF2iBO0TcPO2LBPimSoS2h2nB_R-FWiX7rQ0Tls,1059
Flask_Login-0.6.3.dist-info/METADATA,sha256=AUSHR5Po6-Cwmz1KBrAZbTzR-iVVFvtb2NQKYl7UuAU,5799
Flask_Login-0.6.3.dist-info/RECORD,,
Flask_Login-0.6.3.dist-info/WHEEL,sha256=Xo9-1PvkuimrydujYJAjF7pCkriuXBpUPEjma1nZyJ0,92
Flask_Login-0.6.3.dist-info/top_level.txt,sha256=OuXmIpiFnXLvW-iBbW2km7ZIy5EZvwSBnYaOC3Kt7j8,12
flask_login/__about__.py,sha256=Kkp5e9mV9G7vK_FqZof-g9RFmyyBzq1gge5aKXgvilE,389
flask_login/__init__.py,sha256=wYQiQCikT_Ndp3PhOD-1gRTGCrUPIE-FrjQUrT9aVAg,2681
flask_login/__pycache__/__about__.cpython-312.pyc,,
flask_login/__pycache__/__init__.cpython-312.pyc,,
flask_login/__pycache__/config.cpython-312.pyc,,
flask_login/__pycache__/login_manager.cpython-312.pyc,,
flask_login/__pycache__/mixins.cpython-312.pyc,,
flask_login/__pycache__/signals.cpython-312.pyc,,
flask_login/__pycache__/test_client.cpython-312.pyc,,
flask_login/__pycache__/utils.cpython-312.pyc,,
flask_login/config.py,sha256=YAocv18La7YGQyNY5aT7rU1GQIZnX6pvchwqx3kA9p8,1813
flask_login/login_manager.py,sha256=h20F_iv3mqc6rIJ4-V6_XookzOUl8Rcpasua-dCByQY,20073
flask_login/mixins.py,sha256=gPd7otMRljxw0eUhUMbHsnEBc_jK2cYdxg5KFLuJcoI,1528
flask_login/signals.py,sha256=xCMoFHKU1RTVt1NY-Gfl0OiVKpiyNt6YJw_PsgkjY3w,2464
flask_login/test_client.py,sha256=6mrjiBRLGJpgvvFlLypXPTBLiMp0BAN-Ft-uogqC81g,517
flask_login/utils.py,sha256=Y1wxjCVxpYohBaQJ0ADLypQ-VvBNycwG-gVXFF7k99I,14021

View File

@ -0,0 +1,5 @@
Wheel-Version: 1.0
Generator: bdist_wheel (0.41.3)
Root-Is-Purelib: true
Tag: py3-none-any

View File

@ -0,0 +1 @@
flask_login

View File

@ -0,0 +1,31 @@
Copyright (c) 2010 by danjac.
Some rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are
met:
* Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above
copyright notice, this list of conditions and the following
disclaimer in the documentation and/or other materials provided
with the distribution.
* The names of the contributors may not be used to endorse or
promote products derived from this software without specific
prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

View File

@ -0,0 +1,35 @@
Metadata-Version: 2.1
Name: Flask-Mail
Version: 0.9.1
Summary: Flask extension for sending email
Home-page: https://github.com/rduplain/flask-mail
Author: Dan Jacob
Author-email: danjac354@gmail.com
Maintainer: Ron DuPlain
Maintainer-email: ron.duplain@gmail.com
License: BSD
Platform: any
Classifier: Development Status :: 4 - Beta
Classifier: Environment :: Web Environment
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: BSD License
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python
Classifier: Topic :: Internet :: WWW/HTTP :: Dynamic Content
Classifier: Topic :: Software Development :: Libraries :: Python Modules
License-File: LICENSE
Requires-Dist: Flask
Requires-Dist: blinker
Flask-Mail
----------
A Flask extension for sending email messages.
Please refer to the online documentation for details.
Links
`````
* `documentation <http://packages.python.org/Flask-Mail>`_

View File

@ -0,0 +1,8 @@
Flask_Mail-0.9.1.dist-info/INSTALLER,sha256=zuuue4knoyJ-UwPPXg8fezS7VCrXJQrAP7zeNuwvFQg,4
Flask_Mail-0.9.1.dist-info/LICENSE,sha256=4Rm-c4W3yEpsCANoWqvmytM2PUSFd7btDLd_SpVbEFQ,1449
Flask_Mail-0.9.1.dist-info/METADATA,sha256=AllY2oEzc2vbZVrVjUpLq56-vHrqzCaemsVMQeWZPS8,995
Flask_Mail-0.9.1.dist-info/RECORD,,
Flask_Mail-0.9.1.dist-info/WHEEL,sha256=GJ7t_kWBFywbagK5eo9IoUwLW6oyOeTKmQ-9iHFVNxQ,92
Flask_Mail-0.9.1.dist-info/top_level.txt,sha256=DXVYMmoZEmH0LMYIpymMBM-ekAlhlAu1TCcWn2GM9OE,11
__pycache__/flask_mail.cpython-312.pyc,,
flask_mail.py,sha256=IHsiylgTIXOu6i0MQQcVGqBArCl9pR2XzkBMxj1_lr8,17950

View File

@ -0,0 +1,5 @@
Wheel-Version: 1.0
Generator: bdist_wheel (0.43.0)
Root-Is-Purelib: true
Tag: py3-none-any

View File

@ -0,0 +1 @@
flask_mail

View File

@ -0,0 +1,36 @@
Metadata-Version: 2.1
Name: Flask-Principal
Version: 0.4.0
Summary: Identity management for flask
Home-page: http://packages.python.org/Flask-Principal/
Author: Ali Afshar
Author-email: aafshar@gmail.com
Maintainer: Matt Wright
Maintainer-email: matt@nobien.net
License: MIT
Platform: any
Classifier: Development Status :: 4 - Beta
Classifier: Environment :: Web Environment
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python
Classifier: Topic :: Internet :: WWW/HTTP :: Dynamic Content
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Requires-Dist: Flask
Requires-Dist: blinker
Flask Principal
---------------
Identity management for Flask.
Links
`````
* `documentation <http://packages.python.org/Flask-Principal/>`_
* `source <https://github.com/mattupstate/flask-principal>`_
* `development version
<https://github.com/mattupstate/flask-principal/raw/master#egg=Flask-Principal-dev>`_

View File

@ -0,0 +1,7 @@
Flask_Principal-0.4.0.dist-info/INSTALLER,sha256=zuuue4knoyJ-UwPPXg8fezS7VCrXJQrAP7zeNuwvFQg,4
Flask_Principal-0.4.0.dist-info/METADATA,sha256=8eUbgL4RZ7o1VIa0OeW7U2w5OA35XNKyR3ji80NTyQU,1092
Flask_Principal-0.4.0.dist-info/RECORD,,
Flask_Principal-0.4.0.dist-info/WHEEL,sha256=GJ7t_kWBFywbagK5eo9IoUwLW6oyOeTKmQ-9iHFVNxQ,92
Flask_Principal-0.4.0.dist-info/top_level.txt,sha256=OvvQEFZouL0A8O9TdIg_v6TAOLNnvaFr34Zr28AqBGY,16
__pycache__/flask_principal.cpython-312.pyc,,
flask_principal.py,sha256=H-6ZuSY_nAYfWd-VdojVZuwVLV_tXkUwTwThKdnHunQ,13860

View File

@ -0,0 +1,5 @@
Wheel-Version: 1.0
Generator: bdist_wheel (0.43.0)
Root-Is-Purelib: true
Tag: py3-none-any

View File

@ -0,0 +1 @@
flask_principal

View File

@ -0,0 +1,30 @@
Flask-Security
===================
.. image:: https://img.shields.io/travis/mattupstate/flask-security.svg
:target: https://travis-ci.org/mattupstate/flask-security
.. image:: https://img.shields.io/coveralls/mattupstate/flask-security.svg
:target: https://coveralls.io/r/mattupstate/flask-security
.. image:: https://img.shields.io/github/tag/mattupstate/flask-security.svg
:target: https://github.com/mattupstate/flask-security/releases
.. image:: https://img.shields.io/pypi/dm/flask-security.svg
:target: https://pypi.python.org/pypi/flask-security
:alt: Downloads
.. image:: https://img.shields.io/github/license/mattupstate/flask-security.svg
:target: https://github.com/mattupstate/flask-security/blob/master/LICENSE
:alt: License
It quickly adds security features to your Flask application.
Resources
---------
- `Documentation <https://flask-security.readthedocs.io/>`_
- `Issue Tracker <https://github.com/mattupstate/flask-security/issues>`_
- `Code <https://github.com/mattupstate/flask-security/>`_

View File

@ -0,0 +1,130 @@
Metadata-Version: 2.0
Name: Flask-Security
Version: 3.0.0
Summary: Simple security for Flask apps.
Home-page: https://github.com/mattupstate/flask-security
Author: Matt Wright
Author-email: matt@nobien.net
License: MIT
Keywords: flask security
Platform: any
Classifier: Environment :: Web Environment
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python
Classifier: Topic :: Internet :: WWW/HTTP :: Dynamic Content
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Classifier: Programming Language :: Python :: 2
Classifier: Programming Language :: Python :: 2.7
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.5
Classifier: Programming Language :: Python :: 3.6
Classifier: Programming Language :: Python :: Implementation :: CPython
Classifier: Programming Language :: Python :: Implementation :: PyPy
Classifier: Development Status :: 4 - Beta
Requires-Dist: Flask (>=0.11)
Requires-Dist: Flask-Login (>=0.3.0)
Requires-Dist: Flask-Mail (>=0.7.3)
Requires-Dist: Flask-Principal (>=0.3.3)
Requires-Dist: Flask-WTF (>=0.13.1)
Requires-Dist: Flask-BabelEx (>=0.9.3)
Requires-Dist: itsdangerous (>=0.21)
Requires-Dist: passlib (>=1.7)
Provides-Extra: all
Requires-Dist: Flask-Sphinx-Themes (>=1.0.1); extra == 'all'
Requires-Dist: Sphinx (>=1.4.2); extra == 'all'
Requires-Dist: Flask-CLI (>=0.4.0); extra == 'all'
Requires-Dist: Flask-Mongoengine (>=0.7.0); extra == 'all'
Requires-Dist: Flask-Peewee (>=0.6.5); extra == 'all'
Requires-Dist: Flask-SQLAlchemy (>=1.0); extra == 'all'
Requires-Dist: bcrypt (>=1.0.2); extra == 'all'
Requires-Dist: check-manifest (>=0.25); extra == 'all'
Requires-Dist: coverage (>=4.0); extra == 'all'
Requires-Dist: isort (>=4.2.2); extra == 'all'
Requires-Dist: mock (>=1.3.0); extra == 'all'
Requires-Dist: mongoengine (>=0.10.0); extra == 'all'
Requires-Dist: pony (>=0.7.1); extra == 'all'
Requires-Dist: pydocstyle (>=1.0.0); extra == 'all'
Requires-Dist: pytest-cache (>=1.0); extra == 'all'
Requires-Dist: pytest-cov (>=2.4.0); extra == 'all'
Requires-Dist: pytest-flakes (>=1.0.1); extra == 'all'
Requires-Dist: pytest-pep8 (>=1.0.6); extra == 'all'
Requires-Dist: pytest-translations (>=1.0.4); extra == 'all'
Requires-Dist: pytest (>=3.0.5); extra == 'all'
Requires-Dist: sqlalchemy (>=0.8.0); extra == 'all'
Requires-Dist: Flask-Sphinx-Themes (>=1.0.1); extra == 'all'
Requires-Dist: Sphinx (>=1.4.2); extra == 'all'
Requires-Dist: Flask-CLI (>=0.4.0); extra == 'all'
Requires-Dist: Flask-Mongoengine (>=0.7.0); extra == 'all'
Requires-Dist: Flask-Peewee (>=0.6.5); extra == 'all'
Requires-Dist: Flask-SQLAlchemy (>=1.0); extra == 'all'
Requires-Dist: bcrypt (>=1.0.2); extra == 'all'
Requires-Dist: check-manifest (>=0.25); extra == 'all'
Requires-Dist: coverage (>=4.0); extra == 'all'
Requires-Dist: isort (>=4.2.2); extra == 'all'
Requires-Dist: mock (>=1.3.0); extra == 'all'
Requires-Dist: mongoengine (>=0.10.0); extra == 'all'
Requires-Dist: pony (>=0.7.1); extra == 'all'
Requires-Dist: pydocstyle (>=1.0.0); extra == 'all'
Requires-Dist: pytest-cache (>=1.0); extra == 'all'
Requires-Dist: pytest-cov (>=2.4.0); extra == 'all'
Requires-Dist: pytest-flakes (>=1.0.1); extra == 'all'
Requires-Dist: pytest-pep8 (>=1.0.6); extra == 'all'
Requires-Dist: pytest-translations (>=1.0.4); extra == 'all'
Requires-Dist: pytest (>=3.0.5); extra == 'all'
Requires-Dist: sqlalchemy (>=0.8.0); extra == 'all'
Provides-Extra: docs
Requires-Dist: Flask-Sphinx-Themes (>=1.0.1); extra == 'docs'
Requires-Dist: Sphinx (>=1.4.2); extra == 'docs'
Provides-Extra: tests
Requires-Dist: Flask-CLI (>=0.4.0); extra == 'tests'
Requires-Dist: Flask-Mongoengine (>=0.7.0); extra == 'tests'
Requires-Dist: Flask-Peewee (>=0.6.5); extra == 'tests'
Requires-Dist: Flask-SQLAlchemy (>=1.0); extra == 'tests'
Requires-Dist: bcrypt (>=1.0.2); extra == 'tests'
Requires-Dist: check-manifest (>=0.25); extra == 'tests'
Requires-Dist: coverage (>=4.0); extra == 'tests'
Requires-Dist: isort (>=4.2.2); extra == 'tests'
Requires-Dist: mock (>=1.3.0); extra == 'tests'
Requires-Dist: mongoengine (>=0.10.0); extra == 'tests'
Requires-Dist: pony (>=0.7.1); extra == 'tests'
Requires-Dist: pydocstyle (>=1.0.0); extra == 'tests'
Requires-Dist: pytest-cache (>=1.0); extra == 'tests'
Requires-Dist: pytest-cov (>=2.4.0); extra == 'tests'
Requires-Dist: pytest-flakes (>=1.0.1); extra == 'tests'
Requires-Dist: pytest-pep8 (>=1.0.6); extra == 'tests'
Requires-Dist: pytest-translations (>=1.0.4); extra == 'tests'
Requires-Dist: pytest (>=3.0.5); extra == 'tests'
Requires-Dist: sqlalchemy (>=0.8.0); extra == 'tests'
Flask-Security
===================
.. image:: https://img.shields.io/travis/mattupstate/flask-security.svg
:target: https://travis-ci.org/mattupstate/flask-security
.. image:: https://img.shields.io/coveralls/mattupstate/flask-security.svg
:target: https://coveralls.io/r/mattupstate/flask-security
.. image:: https://img.shields.io/github/tag/mattupstate/flask-security.svg
:target: https://github.com/mattupstate/flask-security/releases
.. image:: https://img.shields.io/pypi/dm/flask-security.svg
:target: https://pypi.python.org/pypi/flask-security
:alt: Downloads
.. image:: https://img.shields.io/github/license/mattupstate/flask-security.svg
:target: https://github.com/mattupstate/flask-security/blob/master/LICENSE
:alt: License
It quickly adds security features to your Flask application.
Resources
---------
- `Documentation <https://flask-security.readthedocs.io/>`_
- `Issue Tracker <https://github.com/mattupstate/flask-security/issues>`_
- `Code <https://github.com/mattupstate/flask-security/>`_

View File

@ -0,0 +1,72 @@
Flask_Security-3.0.0.dist-info/DESCRIPTION.rst,sha256=9OtuUa-1Ewj1G8_82qaLqXuAq0PN8PPbyiiQYxIv6wE,1050
Flask_Security-3.0.0.dist-info/INSTALLER,sha256=zuuue4knoyJ-UwPPXg8fezS7VCrXJQrAP7zeNuwvFQg,4
Flask_Security-3.0.0.dist-info/METADATA,sha256=t3rYzTxjK-3F2pa2lARHGi3GN9oBitZfGynjWxEqbAk,5785
Flask_Security-3.0.0.dist-info/RECORD,,
Flask_Security-3.0.0.dist-info/REQUESTED,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
Flask_Security-3.0.0.dist-info/WHEEL,sha256=AvR0WeTpDaxT645bl5FQxUK6NPsTls2ttpcGJg3j1Xg,110
Flask_Security-3.0.0.dist-info/metadata.json,sha256=FoVIlT27xu0eLLD2t9OWzgiK5flSZPsZCwFuqWjA3HI,3534
Flask_Security-3.0.0.dist-info/top_level.txt,sha256=32qbHJfRj6C-_wcbEzQlmEZq9lpS9hdLErS8F5DNQ38,15
flask_security/__init__.py,sha256=fhIDyA3WZHSZytealFjE44pArzblF5ddP_f1QAsRCH4,1765
flask_security/__pycache__/__init__.cpython-312.pyc,,
flask_security/__pycache__/babel.cpython-312.pyc,,
flask_security/__pycache__/changeable.cpython-312.pyc,,
flask_security/__pycache__/cli.cpython-312.pyc,,
flask_security/__pycache__/confirmable.cpython-312.pyc,,
flask_security/__pycache__/core.cpython-312.pyc,,
flask_security/__pycache__/datastore.cpython-312.pyc,,
flask_security/__pycache__/decorators.cpython-312.pyc,,
flask_security/__pycache__/forms.cpython-312.pyc,,
flask_security/__pycache__/passwordless.cpython-312.pyc,,
flask_security/__pycache__/recoverable.cpython-312.pyc,,
flask_security/__pycache__/registerable.cpython-312.pyc,,
flask_security/__pycache__/script.cpython-312.pyc,,
flask_security/__pycache__/signals.cpython-312.pyc,,
flask_security/__pycache__/utils.cpython-312.pyc,,
flask_security/__pycache__/views.cpython-312.pyc,,
flask_security/babel.py,sha256=DaxZvUQWWq-waiSk_IEex7r0mL1SEul-jfSLy08O7ss,542
flask_security/changeable.py,sha256=U4512ekI1qncrj6lZChztTLpCP6OMlusTdGH5T9d_HE,1318
flask_security/cli.py,sha256=tZUKndP16ouvXqBi0cRcsq-Cj4Dn0agyb6Wk-pftS0c,4424
flask_security/confirmable.py,sha256=UOwW-u1K9kNHUa4B3PDWG8d3haxMRdeOglI5KCZmbds,2741
flask_security/core.py,sha256=Q9RpTd1YcnStjU6NO9NY5G_TxDw8RyKLHM0ko0dSF9w,18347
flask_security/datastore.py,sha256=-fQeMAMbjjyWH8pFVOEdmPQOLde37ISQ5-rq20MzBUg,14935
flask_security/decorators.py,sha256=OVfbqby7P4SuM5kOn0_TeCNxFjhTDlw71zhwR79lASw,7289
flask_security/forms.py,sha256=wx3zg-Rh1aF_VJZMVLsyAy7dsNBMVBKd-yGfK1UlRmk,9698
flask_security/passwordless.py,sha256=pPEaMJJAO8siFpjzG7WGIoYiH39ArazqZ8Iaw1r00eo,1645
flask_security/recoverable.py,sha256=ER83mDJRCY8pkTQ09oTmP82uRMBWK3cQPMGFuEi-qj8,2869
flask_security/registerable.py,sha256=TcwHWlCCywl0Sjytlcxj6XaeyJnbkw421Ww0s0XOdSE,1309
flask_security/script.py,sha256=4y-98Ze_4aLLD2pF-x5YMpEZnywMfKyNPhy2hLwXEZ4,3687
flask_security/signals.py,sha256=SyYtY3Ow-iPAQLp5j0ZId5rYYbRu-e3AzaL81MWzMzg,703
flask_security/templates/security/_macros.html,sha256=3PGt7xOxiMeQi-aDqkawz29DHHKrdoMs_j64_6OruE4,356
flask_security/templates/security/_menu.html,sha256=IruII8fjARKAgWELxhZGKz-q7lNgXfAjafTwUCdnK3s,782
flask_security/templates/security/_messages.html,sha256=elk2DVV7ov1M7r8LFal14ecmMiZzUlxBRUM6VMwfKig,264
flask_security/templates/security/change_password.html,sha256=wb_eOd4-TAQIaVYUWOcp3Q61yU6toAPiB3CIuJwtEew,566
flask_security/templates/security/email/change_notice.html,sha256=FatHl_C1f4Q5VlffzmtzzKMHCcrhJic-PyGEhtshiIM,254
flask_security/templates/security/email/change_notice.txt,sha256=XCRF1hWcSiDbJSYZPlsVrV2yfHhQ-wvEKyFpdnjivgE,224
flask_security/templates/security/email/confirmation_instructions.html,sha256=3POCqPWooXy9dLudMcjEaKOs-teN5Ej0Pd2WDhpFWaM,144
flask_security/templates/security/email/confirmation_instructions.txt,sha256=gk87AYfW89Tr_-0aepBF1agG5PuuZQtM89lbo22wlRc,86
flask_security/templates/security/email/login_instructions.html,sha256=saUWiCUrZCHLNAW__LBts3CYiGAnZ9iZQv5TcFcPtd4,188
flask_security/templates/security/email/login_instructions.txt,sha256=1HWUFrQPu0fS1p-0LcS_CWJKg1beZ7_WwhDkuYf87LM,132
flask_security/templates/security/email/reset_instructions.html,sha256=hOP59QBIVM2Y8yUJtnq9Nl4P9DHZIO4sQIZA8EXhOpY,83
flask_security/templates/security/email/reset_instructions.txt,sha256=xYROIFrBC4ELw6BDWn3mJPQlvV527E7_eeG1bNC3iak,74
flask_security/templates/security/email/reset_notice.html,sha256=j-bN_Km62UPp4ih-E4wgrklrVv-29zrRUEsDpEuetgg,47
flask_security/templates/security/email/reset_notice.txt,sha256=OpJS5IHdq8wh_eawnnSFZmvXWWO6k9PIDfv5GjVhBXc,40
flask_security/templates/security/email/welcome.html,sha256=FbIAhb6Le68f9DdSb4H--G3PFKBpat6ppNnACOYreL8,243
flask_security/templates/security/email/welcome.txt,sha256=WxfmkJuARsVx72YEpSs-lBtSbX2Doj0LJG0XgcEqF4o,178
flask_security/templates/security/forgot_password.html,sha256=DEUq0RrH4CH4xY4Xo2OpLo3uYLlRzwJgW5VOLrmUV0w,472
flask_security/templates/security/login_user.html,sha256=hc8-ugysz9G8G_Bgk7liRAPsLQA7hYISOQvHffiO44o,575
flask_security/templates/security/register_user.html,sha256=tZCLa9xocOjgzueZDVDYN9-1blkoxXaovuMKCDKP4ow,627
flask_security/templates/security/reset_password.html,sha256=c9XaA5hcFb9S_qkDn8a5vFjp1Xrh95Qi_2FhiW1sJtc,550
flask_security/templates/security/send_confirmation.html,sha256=9glFGv92-0TI7TwwYYVlLxniIjFxWhufxCRj5EMG-KQ,481
flask_security/templates/security/send_login.html,sha256=dAbScuQg8YHH0wL5XBiRRygsj1dKYsPtG4Z5kUBVznQ,414
flask_security/translations/da_DK/LC_MESSAGES/flask_security.mo,sha256=oassV9JpocMrXMSYKvdE3AmmFir_zSdu6nehmt0XrZc,6188
flask_security/translations/da_DK/LC_MESSAGES/flask_security.po,sha256=3y_nbQoChNsycKFtT8kzJGkRu_rGvW62zHZa7xp-f1w,9834
flask_security/translations/de_DE/LC_MESSAGES/flask_security.mo,sha256=gApTtgk6-8pGMhLb1dRJ0wEfuth5zQhzy6Tc5L6qErY,6425
flask_security/translations/de_DE/LC_MESSAGES/flask_security.po,sha256=j_8phnK-1Qz7ObqaAQxApz97vFtecglNOVbN7BsgVyU,10101
flask_security/translations/flask_security.pot,sha256=_IO9Ba6sdXnHPsa6ng7vzCtA_kYOFSWJ-wF83sasc6M,7411
flask_security/translations/fr_FR/LC_MESSAGES/flask_security.mo,sha256=2vtdHhViQU7_7bOpGfZNRVjuKpPrch9YEpuJvLPpSYA,6792
flask_security/translations/fr_FR/LC_MESSAGES/flask_security.po,sha256=Rzpwmip9VxGtVlKNH0aV8QDlRHGwkp9xMRxAhKuQXqQ,10438
flask_security/translations/nl_NL/LC_MESSAGES/messages.po,sha256=92JsGajoZJ2kpRZPb3zRTIvbp9RMLRjJL3IBg7eWnCs,9959
flask_security/translations/ru_RU/LC_MESSAGES/flask_security.mo,sha256=NS8UVh6eUY_ByyY5wxdthAuCtKhmscO-AeItOkRZY3E,8122
flask_security/translations/ru_RU/LC_MESSAGES/flask_security.po,sha256=1mRY9_OicQh950Yjt1TdjdSph2c12z-X_k3eIBhL1oo,11749
flask_security/utils.py,sha256=bUT--9qaA3A5iW1Y3KXNGK-W9Gfn2MLqnqjloCB9X9Y,15083
flask_security/views.py,sha256=ZDTzIRXi8516hRY-FvhxRUUaCHIiKIo1Vcw09_k1o3k,12129

View File

@ -0,0 +1,6 @@
Wheel-Version: 1.0
Generator: bdist_wheel (0.24.0)
Root-Is-Purelib: true
Tag: py2-none-any
Tag: py3-none-any

View File

@ -0,0 +1 @@
{"license": "MIT", "name": "Flask-Security", "metadata_version": "2.0", "generator": "bdist_wheel (0.24.0)", "test_requires": [{"requires": ["Flask-CLI (>=0.4.0)", "Flask-Mongoengine (>=0.7.0)", "Flask-Peewee (>=0.6.5)", "Flask-SQLAlchemy (>=1.0)", "bcrypt (>=1.0.2)", "check-manifest (>=0.25)", "coverage (>=4.0)", "isort (>=4.2.2)", "mock (>=1.3.0)", "mongoengine (>=0.10.0)", "pony (>=0.7.1)", "pydocstyle (>=1.0.0)", "pytest-cache (>=1.0)", "pytest-cov (>=2.4.0)", "pytest-flakes (>=1.0.1)", "pytest-pep8 (>=1.0.6)", "pytest-translations (>=1.0.4)", "pytest (>=3.0.5)", "sqlalchemy (>=0.8.0)"]}], "summary": "Simple security for Flask apps.", "platform": "any", "run_requires": [{"requires": ["Flask-Sphinx-Themes (>=1.0.1)", "Sphinx (>=1.4.2)"], "extra": "docs"}, {"requires": ["Flask-CLI (>=0.4.0)", "Flask-Mongoengine (>=0.7.0)", "Flask-Peewee (>=0.6.5)", "Flask-SQLAlchemy (>=1.0)", "bcrypt (>=1.0.2)", "check-manifest (>=0.25)", "coverage (>=4.0)", "isort (>=4.2.2)", "mock (>=1.3.0)", "mongoengine (>=0.10.0)", "pony (>=0.7.1)", "pydocstyle (>=1.0.0)", "pytest-cache (>=1.0)", "pytest-cov (>=2.4.0)", "pytest-flakes (>=1.0.1)", "pytest-pep8 (>=1.0.6)", "pytest-translations (>=1.0.4)", "pytest (>=3.0.5)", "sqlalchemy (>=0.8.0)"], "extra": "tests"}, {"requires": ["Flask-Sphinx-Themes (>=1.0.1)", "Sphinx (>=1.4.2)", "Flask-CLI (>=0.4.0)", "Flask-Mongoengine (>=0.7.0)", "Flask-Peewee (>=0.6.5)", "Flask-SQLAlchemy (>=1.0)", "bcrypt (>=1.0.2)", "check-manifest (>=0.25)", "coverage (>=4.0)", "isort (>=4.2.2)", "mock (>=1.3.0)", "mongoengine (>=0.10.0)", "pony (>=0.7.1)", "pydocstyle (>=1.0.0)", "pytest-cache (>=1.0)", "pytest-cov (>=2.4.0)", "pytest-flakes (>=1.0.1)", "pytest-pep8 (>=1.0.6)", "pytest-translations (>=1.0.4)", "pytest (>=3.0.5)", "sqlalchemy (>=0.8.0)", "Flask-Sphinx-Themes (>=1.0.1)", "Sphinx (>=1.4.2)", "Flask-CLI (>=0.4.0)", "Flask-Mongoengine (>=0.7.0)", "Flask-Peewee (>=0.6.5)", "Flask-SQLAlchemy (>=1.0)", "bcrypt (>=1.0.2)", "check-manifest (>=0.25)", "coverage (>=4.0)", "isort (>=4.2.2)", "mock (>=1.3.0)", "mongoengine (>=0.10.0)", "pony (>=0.7.1)", "pydocstyle (>=1.0.0)", "pytest-cache (>=1.0)", "pytest-cov (>=2.4.0)", "pytest-flakes (>=1.0.1)", "pytest-pep8 (>=1.0.6)", "pytest-translations (>=1.0.4)", "pytest (>=3.0.5)", "sqlalchemy (>=0.8.0)"], "extra": "all"}, {"requires": ["Flask (>=0.11)", "Flask-Login (>=0.3.0)", "Flask-Mail (>=0.7.3)", "Flask-Principal (>=0.3.3)", "Flask-WTF (>=0.13.1)", "Flask-BabelEx (>=0.9.3)", "itsdangerous (>=0.21)", "passlib (>=1.7)"]}], "version": "3.0.0", "extensions": {"python.details": {"project_urls": {"Home": "https://github.com/mattupstate/flask-security"}, "document_names": {"description": "DESCRIPTION.rst"}, "contacts": [{"role": "author", "email": "matt@nobien.net", "name": "Matt Wright"}]}}, "keywords": ["flask", "security"], "classifiers": ["Environment :: Web Environment", "Intended Audience :: Developers", "License :: OSI Approved :: MIT License", "Operating System :: OS Independent", "Programming Language :: Python", "Topic :: Internet :: WWW/HTTP :: Dynamic Content", "Topic :: Software Development :: Libraries :: Python Modules", "Programming Language :: Python :: 2", "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.5", "Programming Language :: Python :: 3.6", "Programming Language :: Python :: Implementation :: CPython", "Programming Language :: Python :: Implementation :: PyPy", "Development Status :: 4 - Beta"], "extras": ["all", "docs", "tests"]}

View File

@ -0,0 +1 @@
flask_security

View File

@ -0,0 +1,37 @@
"""
babel
~~~~~
Integrated collection of utilities that assist in internationalizing and
localizing applications.
This package is basically composed of two major parts:
* tools to build and work with ``gettext`` message catalogs
* a Python interface to the CLDR (Common Locale Data Repository), providing
access to various locale display names, localized number and date
formatting, etc.
:copyright: (c) 2013-2023 by the Babel Team.
:license: BSD, see LICENSE for more details.
"""
from babel.core import (
Locale,
UnknownLocaleError,
default_locale,
get_locale_identifier,
negotiate_locale,
parse_locale,
)
__version__ = '2.14.0'
__all__ = [
'Locale',
'UnknownLocaleError',
'default_locale',
'get_locale_identifier',
'negotiate_locale',
'parse_locale',
]

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

Binary file not shown.

View File

@ -0,0 +1,72 @@
from __future__ import annotations
from babel.core import get_global
def get_official_languages(territory: str, regional: bool = False, de_facto: bool = False) -> tuple[str, ...]:
"""
Get the official language(s) for the given territory.
The language codes, if any are known, are returned in order of descending popularity.
If the `regional` flag is set, then languages which are regionally official are also returned.
If the `de_facto` flag is set, then languages which are "de facto" official are also returned.
.. warning:: Note that the data is as up to date as the current version of the CLDR used
by Babel. If you need scientifically accurate information, use another source!
:param territory: Territory code
:type territory: str
:param regional: Whether to return regionally official languages too
:type regional: bool
:param de_facto: Whether to return de-facto official languages too
:type de_facto: bool
:return: Tuple of language codes
:rtype: tuple[str]
"""
territory = str(territory).upper()
allowed_stati = {"official"}
if regional:
allowed_stati.add("official_regional")
if de_facto:
allowed_stati.add("de_facto_official")
languages = get_global("territory_languages").get(territory, {})
pairs = [
(info['population_percent'], language)
for language, info in languages.items()
if info.get('official_status') in allowed_stati
]
pairs.sort(reverse=True)
return tuple(lang for _, lang in pairs)
def get_territory_language_info(territory: str) -> dict[str, dict[str, float | str | None]]:
"""
Get a dictionary of language information for a territory.
The dictionary is keyed by language code; the values are dicts with more information.
The following keys are currently known for the values:
* `population_percent`: The percentage of the territory's population speaking the
language.
* `official_status`: An optional string describing the officiality status of the language.
Known values are "official", "official_regional" and "de_facto_official".
.. warning:: Note that the data is as up to date as the current version of the CLDR used
by Babel. If you need scientifically accurate information, use another source!
.. note:: Note that the format of the dict returned may change between Babel versions.
See https://www.unicode.org/cldr/charts/latest/supplemental/territory_language_information.html
:param territory: Territory code
:type territory: str
:return: Language information dictionary
:rtype: dict[str, dict]
"""
territory = str(territory).upper()
return get_global("territory_languages").get(territory, {}).copy()

View File

@ -0,0 +1,94 @@
"""
babel.lists
~~~~~~~~~~~
Locale dependent formatting of lists.
The default locale for the functions in this module is determined by the
following environment variables, in that order:
* ``LC_ALL``, and
* ``LANG``
:copyright: (c) 2015-2023 by the Babel Team.
:license: BSD, see LICENSE for more details.
"""
from __future__ import annotations
from collections.abc import Sequence
from typing import TYPE_CHECKING
from babel.core import Locale, default_locale
if TYPE_CHECKING:
from typing_extensions import Literal
DEFAULT_LOCALE = default_locale()
def format_list(lst: Sequence[str],
style: Literal['standard', 'standard-short', 'or', 'or-short', 'unit', 'unit-short', 'unit-narrow'] = 'standard',
locale: Locale | str | None = DEFAULT_LOCALE) -> str:
"""
Format the items in `lst` as a list.
>>> format_list(['apples', 'oranges', 'pears'], locale='en')
u'apples, oranges, and pears'
>>> format_list(['apples', 'oranges', 'pears'], locale='zh')
u'apples\u3001oranges\u548cpears'
>>> format_list(['omena', 'peruna', 'aplari'], style='or', locale='fi')
u'omena, peruna tai aplari'
These styles are defined, but not all are necessarily available in all locales.
The following text is verbatim from the Unicode TR35-49 spec [1].
* standard:
A typical 'and' list for arbitrary placeholders.
eg. "January, February, and March"
* standard-short:
A short version of an 'and' list, suitable for use with short or abbreviated placeholder values.
eg. "Jan., Feb., and Mar."
* or:
A typical 'or' list for arbitrary placeholders.
eg. "January, February, or March"
* or-short:
A short version of an 'or' list.
eg. "Jan., Feb., or Mar."
* unit:
A list suitable for wide units.
eg. "3 feet, 7 inches"
* unit-short:
A list suitable for short units
eg. "3 ft, 7 in"
* unit-narrow:
A list suitable for narrow units, where space on the screen is very limited.
eg. "3 7″"
[1]: https://www.unicode.org/reports/tr35/tr35-49/tr35-general.html#ListPatterns
:param lst: a sequence of items to format in to a list
:param style: the style to format the list with. See above for description.
:param locale: the locale
"""
locale = Locale.parse(locale)
if not lst:
return ''
if len(lst) == 1:
return lst[0]
if style not in locale.list_patterns:
raise ValueError(
f'Locale {locale} does not support list formatting style {style!r} '
f'(supported are {sorted(locale.list_patterns)})',
)
patterns = locale.list_patterns[style]
if len(lst) == 2:
return patterns['2'].format(*lst)
result = patterns['start'].format(lst[0], lst[1])
for elem in lst[2:-1]:
result = patterns['middle'].format(result, elem)
result = patterns['end'].format(result, lst[-1])
return result

Some files were not shown because too many files have changed in this diff Show More