Skip to main content
Archived

This project has been archived by its maintainers, and is no longer receiving any updates.

Build Status Downloads Downloads Downloads

markyp-html

markyp-based HTML implementations.

Installation

The project is listed on the Python Package Index, it can be installed simply by executing pip install markyp-html.

Getting started

If you are not familiar with the basic concepts of markyp, please start by having a look at its documentation here.

The following very short example creates the most basic Hello World webpage. As you can see, all it takes is a single webpage() call and string conversion.

from markyp_html import webpage
page = webpage("Hello World!", page_title="Hello World")

# Get the actual HTML markup.
html = str(page)  # or page.markup
print(html)

Here is a slightly more sophisticated Hello World example, that contains all kinds of metadata, some CSS, and a couple of simple text elements:

from markyp_html import meta, style, webpage
from markyp_html.text import h1, p
from markyp_html.inline import strong

page = webpage(
    h1("markyp-html"),
    strong(p("Hello World!")),
    p("This page was generated using Python and markyp-html."),
    page_title="markyp-html demo page",
    head_elements=[style("h1 {color:red;}\np {color:blue;}")],
    metadata=[
        meta.author("Website Author"),
        meta.charset("UTF-8"),
        meta.description("markyp-html demo"),
        meta.keywords("markyp-html,markup,Python,HTML"),
        meta.viewport("width=device-width, initial-scale=1.0")
    ]
)

# Get the actual HTML markup.
html = str(page)  # or page.markup
print(html)

markyp-html extensions

markyp-html is built on markyp. In general, extensions follow the markyp-{domain-or-extension-name} naming convention.

Here is a list of extensions built on top of markyp-html:

If you have created an open source markyp-html extension, please let us know and we will include your project in this list.

Community guidelines

In general, please treat each other with respect and follow the below guidelines to interact with the project:

  • Questions, feedback: Open an issue with a [Question] <issue-title> title.
  • Bug reports: Open an issue with a [Bug] <issue-title> title, an adequate description of the bug, and a code snippet that reproduces the issue if possible.
  • Feature requests and ideas: Open an issue with an [Enhancement] <issue-title> title and a clear description of the enhancement proposal.

Contribution guidelines

Every form of contribution is welcome, including documentation improvements, tests, bug fixes, and feature implementations.

Please follow these guidelines to contribute to the project:

  • Make sure your changes match the documentation and coding style of the project, including PEP 484 type annotations.
  • mypy is used to type-check the codebase, submitted code should not produce typing errors. See this page for more information on mypy.
  • Small fixes can be submitted simply by creating a pull request.
  • Non-trivial changes should have an associated issue in the issue tracker that commits must reference (typically by adding #refs <issue-id> to the end of commit messages).
  • Please write tests for the changes you make (if applicable).

If you have any questions about contributing to the project, please contact the project owner.

As mentioned in the contribution guidelines, the project is type-checked using mypy, so first of all, the project must pass mypy's static code analysis.

The project is tested using pytest. The chosen test layout is that tests are outside the application code, see this page for details on what it means in practice.

If pytest is installed, the test set can be executed using the pytest test command from within the project directory.

If pytest-cov is also installed, a test coverage report can be generated by executing pytest test --cov markyp_html from the root directory of the project.

License - MIT

The library is open-sourced under the conditions of the MIT license.

Metadata

Release files for markyp-html 0.2306.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for markyp-html 0.2306.2
File Size Uploaded
markyp-html-0.2306.2.tar.gz 17.5 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for markyp-html 0.2306.2
File Interpreter ABI Platform
markyp_html-0.2306.2-py3-none-any.whl Python 3 none any Details

Total release size: 30.3 kB

Release files / markyp-html-0.2306.2.tar.gz

Download URL markyp-html-0.2306.2.tar.gz
Size 17.5 kB
Tags Source
SHA-256 checksum
How to use checksums
64cc745a0edba677379ccc4567ecab5d16c2d2bdb317f00f465285231b8228ef
BLAKE2b-256 checksum
How to use checksums
7965736ee94864550eeb914c26dc3b4d6eea12201e7d34a7c9db060dee2a124f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.11.4

Release files / markyp_html-0.2306.2-py3-none-any.whl

Download URL markyp_html-0.2306.2-py3-none-any.whl
Size 12.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
dc1f1336dd56212dcee7af3c71b4dee872681d9032f840c877ce4108568861f9
BLAKE2b-256 checksum
How to use checksums
738b6ae34f00032263d524f4e71bb3810a5c431d37b029af7f0796c1200efc0a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.11.4
Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page