# Shortcut Functions for Web Operations
## Install
```bash
# Install without extras
pip install invisibleroads-macros-web
# Install with extras
pip install invisibleroads-macros-web[jinja,markdown,starlette]
```
## Use
```python
# 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
```bash
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`
Raw data
{
"_id": null,
"home_page": "https://github.com/invisibleroads/invisibleroads-macros-web",
"name": "invisibleroads-macros-web",
"maintainer": null,
"docs_url": null,
"requires_python": null,
"maintainer_email": null,
"keywords": "invisibleroads",
"author": "Roy Hyunjin Han",
"author_email": "rhh@crosscompute.com",
"download_url": "https://files.pythonhosted.org/packages/0b/5e/e1c7d2eef8c9655d668270803afa551d7a2b8bb62243b889e879ca06d81f/invisibleroads_macros_web-0.3.7.tar.gz",
"platform": null,
"description": "# Shortcut Functions for Web Operations\n\n## Install\n\n```bash\n# Install without extras\npip install invisibleroads-macros-web\n# Install with extras\npip install invisibleroads-macros-web[jinja,markdown,starlette]\n```\n\n## Use\n\n```python\n# Open browser\nfrom invisibleroads_macros_web.browser import (\n open_browser)\n\n# Escape characters\nfrom invisibleroads_macros_web.escape import (\n escape_quotes_html,\n escape_quotes_js)\n\n# Check ports\nfrom invisibleroads_macros_web.port import (\n find_open_port,\n is_port_in_use)\n\n# Render markdown\nfrom invisibleroads_macros_web.markdown import (\n get_html_from_markdown,\n remove_single_paragraph,\n remove_parent_paragraphs,\n remove_line_break_after_div)\n\n# Configure templates\nfrom invisibleroads_macros_web.jinja import (\n AssetStorage,\n RelativeTemplateEnvironment,\n PathTemplateLoader)\nfrom invisibleroads_macros_web.starlette import (\n ExtraResponseHeadersMiddleware,\n TemplateResponseFactory)\n```\n\n## Test\n\n```bash\ngit clone https://github.com/invisibleroads/invisibleroads-macros-web\ncd invisibleroads-macros-web\npip install -e .[jinja,markdown,starlette,test]\npytest --cov=invisibleroads_macros_web --cov-report term-missing tests\n```\n\n# 0.3\n- Add `AssetStorage`\n- Add `remove_single_paragraph`, `remove_parent_paragraphs`\n\n# 0.2\n- Add `TemplateResponseFactory`\n- Add `RelativeTemplateEnvironment`, `TemplatePathLoader`\n- Remove extraneous p tags in `get_html_from_markdown`\n\n# 0.1\n- Add `open_browser`, `escape_quotes_html`, `escape_quotes_js`\n- Add `get_html_from_markdown`, `find_open_port`, `is_port_in_use`\n",
"bugtrack_url": null,
"license": null,
"summary": "Shortcut functions for web operations",
"version": "0.3.7",
"project_urls": {
"Homepage": "https://github.com/invisibleroads/invisibleroads-macros-web"
},
"split_keywords": [
"invisibleroads"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "333386bafef592fe89f8080a5dafebe894057daff4847b671d765a4afeeff567",
"md5": "3aeda2d2568f65911e6433f13f1ba59f",
"sha256": "25d55d9a69f904acdd4045c5988bc9f86fa955244972e2d7e10fb32d72d2a2fa"
},
"downloads": -1,
"filename": "invisibleroads_macros_web-0.3.7-py3-none-any.whl",
"has_sig": false,
"md5_digest": "3aeda2d2568f65911e6433f13f1ba59f",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": null,
"size": 7246,
"upload_time": "2024-04-30T10:53:27",
"upload_time_iso_8601": "2024-04-30T10:53:27.639122Z",
"url": "https://files.pythonhosted.org/packages/33/33/86bafef592fe89f8080a5dafebe894057daff4847b671d765a4afeeff567/invisibleroads_macros_web-0.3.7-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "0b5ee1c7d2eef8c9655d668270803afa551d7a2b8bb62243b889e879ca06d81f",
"md5": "1c2981224fb8079648d0daf21c7017b1",
"sha256": "b4f0bcd764b523258dfb25d0b35677f2b70d3fbec6be1c043955dd5ae2550c9d"
},
"downloads": -1,
"filename": "invisibleroads_macros_web-0.3.7.tar.gz",
"has_sig": false,
"md5_digest": "1c2981224fb8079648d0daf21c7017b1",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 5263,
"upload_time": "2024-04-30T10:53:28",
"upload_time_iso_8601": "2024-04-30T10:53:28.698169Z",
"url": "https://files.pythonhosted.org/packages/0b/5e/e1c7d2eef8c9655d668270803afa551d7a2b8bb62243b889e879ca06d81f/invisibleroads_macros_web-0.3.7.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-04-30 10:53:28",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "invisibleroads",
"github_project": "invisibleroads-macros-web",
"travis_ci": false,
"coveralls": false,
"github_actions": false,
"lcname": "invisibleroads-macros-web"
}