Skip to main content

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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

invisibleroads_macros_web-0.3.7.tar.gz (5.3 kB view hashes)

Uploaded Source

Built Distribution

invisibleroads_macros_web-0.3.7-py3-none-any.whl (7.2 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page