Flash messaging for fresco web applications
fresco-flash provides a mechanism for displaying messages to end users in a web application. Messages can be sent across requests: you can generate a message in a view that returns a redirect response and the message will display on the next page loaded.
Example usage:
from fresco import FrescoApp
from fresco_flash import FlashMiddleware, flash
# Create a fresco app with the flash messaging middleware enabled
app = FrescoApp()
app.add_middleware(FlashMiddleware)
# Create some flash messages to be shown to the user
flash.info('Thanks for signing up!')
flash.warn('Did you remember to feed the cat?')
flash.error('Too many elephants: increase bun supply before proceeding.')
# Display messages to the user
<py:for each="level, item in flash.messages()">
<div class="message $level">$item</div>
</py:for>
Including HTML in messages
Messages are automatically escaped for HTML using MarkupSafe. If you want to include unescaped HTML in flash messages, wrap them in markupsafe.Markup first:
from markupsafe include Markup
flash.info(Markup('<blink>Insert coin for new game</blink>'))
1.0.0 (released 2020-06-21)
Dropped support for Python 2, added support for Python 3.7, 3.8
0.1
Initial release
Metadata
Release files for fresco-flash 1.0.0
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 |
|---|---|---|---|---|
| fresco-flash-1.0.0.tar.gz | 5.1 kB | Without provenance | Details for fresco-flash-1.0.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| fresco_flash-1.0.0-py3-none-any.whl | Python 3 | none | any | Details for fresco_flash-1.0.0-py3-none-any.whl |
Total release size: 12.1 kB
Release files / fresco-flash-1.0.0.tar.gz
| Download URL | fresco-flash-1.0.0.tar.gz |
|---|---|
| Size | 5.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
e3541d77b6b947a47802572da87e8249a4b7b1e03c0060d43cbb23f4376ecc26
|
|
BLAKE2b-256 checksum How to use checksums |
4c493819d7e840298a9c20c041d267fadef03f5f75b05e549a6f4686d5d7e024
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/44.0.0 requests-toolbelt/0.8.0 tqdm/4.41.1 CPython/3.7.7
|
Release files / fresco_flash-1.0.0-py3-none-any.whl
| Download URL | fresco_flash-1.0.0-py3-none-any.whl |
|---|---|
| Size | 7.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
e85746ab3ae75bcb62e5933789800e4a7b6646eafca959056b83b8bd4702d9ec
|
|
BLAKE2b-256 checksum How to use checksums |
4be4eef2e0977c76ee7185a5caeb5432f05c99cde905787491d4e7492a4ff150
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/44.0.0 requests-toolbelt/0.8.0 tqdm/4.41.1 CPython/3.7.7
|
Security for fresco-flash 1.0.0
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.