Shortcut functions for web operations
Project description
Shortcut Functions for Web Operations
Install
# Install without extras
pip install invisibleroads-macros-web
# Install with extras
pip install invisibleroads-macros-web[jinja,markdown,starlette]
Use
# Open browser
from invisibleroads_macros_web.browser import (
open_browser)
# Escape characters
from invisibleroads_macros_web.escape import (
escape_quotes_html,
escape_quotes_js)
# Check ports
from invisibleroads_macros_web.port import (
find_open_port,
is_port_in_use)
# Render markdown
from invisibleroads_macros_web.markdown import (
get_html_from_markdown,
remove_single_paragraph,
remove_parent_paragraphs,
remove_line_break_after_div)
# Configure templates
from invisibleroads_macros_web.jinja import (
AssetStorage,
RelativeTemplateEnvironment,
PathTemplateLoader)
from invisibleroads_macros_web.starlette import (
ExtraResponseHeadersMiddleware,
TemplateResponseFactory)
Test
git clone https://github.com/invisibleroads/invisibleroads-macros-web
cd invisibleroads-macros-web
pip install -e .[jinja,markdown,starlette,test]
pytest --cov=invisibleroads_macros_web --cov-report term-missing tests
0.3
- Add
AssetStorage
- Add
remove_single_paragraph
,remove_parent_paragraphs
0.2
- Add
TemplateResponseFactory
- Add
RelativeTemplateEnvironment
,TemplatePathLoader
- Remove extraneous p tags in
get_html_from_markdown
0.1
- Add
open_browser
,escape_quotes_html
,escape_quotes_js
- Add
get_html_from_markdown
,find_open_port
,is_port_in_use
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Close
Hashes for invisibleroads_macros_web-0.3.7.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | b4f0bcd764b523258dfb25d0b35677f2b70d3fbec6be1c043955dd5ae2550c9d |
|
MD5 | 1c2981224fb8079648d0daf21c7017b1 |
|
BLAKE2b-256 | 0b5ee1c7d2eef8c9655d668270803afa551d7a2b8bb62243b889e879ca06d81f |
Close
Hashes for invisibleroads_macros_web-0.3.7-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 25d55d9a69f904acdd4045c5988bc9f86fa955244972e2d7e10fb32d72d2a2fa |
|
MD5 | 3aeda2d2568f65911e6433f13f1ba59f |
|
BLAKE2b-256 | 333386bafef592fe89f8080a5dafebe894057daff4847b671d765a4afeeff567 |