Create social share component in Jinja2 template based on share.js.
Get Started
Installation is easy:
$ pip install flask-share
Initialize the extension:
from flask_share import Share
...
share = Share(app)
Also support for factory pattern:
from flask_share import Share
share = Share()
def create_app():
app = Flask(__name__)
...
share.init_app(app)
Example
Here is a simple demo to demonstrate how to create a share component in template:
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Flask-Share Demo</title>
{{ share.load() }}
</head>
<body>
<h1>Hello, Flask-Share!</h1>
<p>Maecenas tincidunt lacus at velit. Phasellus in felis. Praesent
id massa id nisl venenatis lacinia. Integer ac neque. Morbi ut odio.
Nullam varius. Sed vel enim sit amet nunc viverra dapibus. Nullam
varius. In hac habitasse platea dictumst.</p>
{{ share.create(title='Share with: ') }}
</body>
</html>
And here is what you get:
Before you ask, the share component is highly customizable.
Links
Development
We welcome all kinds of contributions. You can run test like this:
$ python setup.py test
License
This project is licensed under the MIT License (see the LICENSE file for details).
Metadata
Release files for Flask-Share 0.1.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| Flask-Share-0.1.1.tar.gz | 39.9 kB | Without provenance | Details for Flask-Share-0.1.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| Flask_Share-0.1.1-py2.py3-none-any.whl | Python 2, Python 3 | none | any | Details for Flask_Share-0.1.1-py2.py3-none-any.whl |
Total release size: 89.8 kB
Security for Flask-Share 0.1.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.