{"id":14972530,"url":"https://github.com/volfpeter/markyp-bootstrap4","last_synced_at":"2025-10-26T19:31:34.178Z","repository":{"id":57439796,"uuid":"174817530","full_name":"volfpeter/markyp-bootstrap4","owner":"volfpeter","description":"Create Bootstrap 4 web pages using purely Python.","archived":false,"fork":false,"pushed_at":"2024-12-23T22:08:06.000Z","size":233,"stargazers_count":20,"open_issues_count":0,"forks_count":0,"subscribers_count":5,"default_branch":"master","last_synced_at":"2025-01-31T23:01:42.994Z","etag":null,"topics":["bootstrap","bootstrap-4","bootstrap4","code-generator","html","html-css-javascript","python","templating","templating-engine","virtual-dom"],"latest_commit_sha":null,"homepage":"https://volfpeter.github.io/markyp-bootstrap4","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/volfpeter.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2019-03-10T12:00:35.000Z","updated_at":"2024-12-23T22:08:07.000Z","dependencies_parsed_at":"2024-07-06T07:47:56.443Z","dependency_job_id":"8496a2df-50c3-4237-93a8-f205f0d2bde1","html_url":"https://github.com/volfpeter/markyp-bootstrap4","commit_stats":{"total_commits":133,"total_committers":3,"mean_commits":"44.333333333333336","dds":"0.052631578947368474","last_synced_commit":"0db1250022ed57f5dd055a00e608eb92255de393"},"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/volfpeter%2Fmarkyp-bootstrap4","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/volfpeter%2Fmarkyp-bootstrap4/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/volfpeter%2Fmarkyp-bootstrap4/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/volfpeter%2Fmarkyp-bootstrap4/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/volfpeter","download_url":"https://codeload.github.com/volfpeter/markyp-bootstrap4/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":238394323,"owners_count":19464583,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["bootstrap","bootstrap-4","bootstrap4","code-generator","html","html-css-javascript","python","templating","templating-engine","virtual-dom"],"created_at":"2024-09-24T13:47:04.687Z","updated_at":"2025-10-26T19:31:33.749Z","avatar_url":"https://github.com/volfpeter.png","language":"Python","readme":"[![Build Status](https://travis-ci.org/volfpeter/markyp-bootstrap4.svg?branch=master)](https://travis-ci.org/volfpeter/markyp-bootstrap4)\n[![Downloads](https://pepy.tech/badge/markyp-bootstrap4)](https://pepy.tech/project/markyp-bootstrap4)\n[![Downloads](https://pepy.tech/badge/markyp-bootstrap4/month)](https://pepy.tech/project/markyp-bootstrap4/month)\n[![Downloads](https://pepy.tech/badge/markyp-bootstrap4/week)](https://pepy.tech/project/markyp-bootstrap4/week)\n\n# markyp-bootstrap4\n\nCreate Bootstrap 4 web pages using purely Python.\n\nThe project is built on [markyp](https://github.com/volfpeter/markyp) and [markyp-html](https://github.com/volfpeter/markyp-html).\n\n## Installation\n\nThe project is listed on the Python Package Index, it can be installed simply by executing `pip install markyp-bootstrap4`.\n\n## Getting started\n\nIf you are not familiar with the basic concepts of `markyp`, please start by having a look at its documentation [here](https://github.com/volfpeter/markyp).\n\nFor a demo of the capabilities of `markyp-bootstrap4`, head over to the project's [GitHub Pages](https://volfpeter.github.io/markyp-bootstrap4). The source code of that page was generated by the `demo.py` script that you can find at the root of this repository.\n\nThe following example shows how to create a login form using `markyp-bootstrap4`.\n\n```Python\nfrom markyp_html import webpage\nfrom markyp_html.forms import form\n\nfrom markyp_bootstrap4 import req\nfrom markyp_bootstrap4.layout import container, one, col, margin, offset\nfrom markyp_bootstrap4.buttons import b_button\nfrom markyp_bootstrap4.forms import form_group, form_check, form_check_label, input_, text\n\ndef login():\n    return form(\n        form_group(\n            text.h5(\"Email\"),\n            input_.email(placeholder=\"Enter your email address\")\n        ),\n        form_group(\n            text.h5(\"Password\"),\n            input_.password(placeholder=\"Enter your password\")\n        ),\n        form_check(\n            input_.checkbox(),\n            form_check_label(\"Remember Me\"),\n            class_=margin(bottom=2)\n        ),\n        b_button.primary(\"Sign In\", type=\"submit\")\n    )\n\npage = webpage(\n    container(\n        one(\n            login(),\n            md=6,\n            class_=offset(md=3)\n        )\n    ),\n    page_title=\"markyp-bootstrap4 example\",\n    head_elements=[\n        req.bootstrap_css,\n        *req.all_js\n    ]\n)\n\nprint(page)\n```\n\nHere is a list of things to notice in the example:\n\n- Bootstrap 4's requirements can be import with `from markyp_bootstrap4 import req`, and the required CSS and JavaScript imports should be added to the `head_elements` of the webpage.\n- The `layout` module contains the components you can use to define the layout of the webpage.\n- `markyp_bootstrap4` components are grouped the same way as components in Bootstrap 4's documentation. The only difference is here every module name is in plural form.\n\n## Related projects\n\n- [markyp-html](https://github.com/volfpeter/markyp-html): Create custom or non-Bootstrap 4 components for you webpage.\n- [markyp-fontawesome](https://github.com/volfpeter/markyp-fontawesome): Add Font Awesome 5 icons to your webpage.\n- [markyp-highlightjs](https://github.com/volfpeter/markyp-highlightjs): Add syntax-highlighted code to your webpage.\n\n## Community guidelines\n\nIn general, please treat each other with respect and follow the below guidelines to interact with the project:\n\n- _Questions, feedback_: Open an issue with a `[Question] \u003cissue-title\u003e` title.\n- _Bug reports_: Open an issue with a `[Bug] \u003cissue-title\u003e` title, an adequate description of the bug, and a code snippet that reproduces the issue if possible.\n- _Feature requests and ideas_: Open an issue with an `[Enhancement] \u003cissue-title\u003e` title and a clear description of the enhancement proposal.\n\n## Contribution guidelines\n\nEvery form of contribution is welcome, including documentation improvements, tests, bug fixes, and feature implementations.\n\nPlease follow these guidelines to contribute to the project:\n\n- Make sure your changes match the documentation and coding style of the project, including [PEP 484](https://www.python.org/dev/peps/pep-0484/) type annotations.\n- `mypy` is used to type-check the codebase, submitted code should not produce typing errors. See [this page](http://mypy-lang.org/) for more information on `mypy`.\n- _Small_ fixes can be submitted simply by creating a pull request.\n- Non-trivial changes should have an associated [issue](#community-guidelines) in the issue tracker that commits must reference (typically by adding `#refs \u003cissue-id\u003e` to the end of commit messages).\n- Please write [tests](#testing) for the changes you make (if applicable).\n\nIf you have any questions about contributing to the project, please contact the project owner.\n\nAs mentioned in the [contribution guidelines](#contribution-guidelines), the project is type-checked using `mypy`, so first of all, the project must pass `mypy`'s static code analysis.\n\nThe project is tested using `pytest`. The chosen test layout is that tests are outside the application code, see [this page](https://docs.pytest.org/en/latest/goodpractices.html#tests-outside-application-code) for details on what it means in practice.\n\nIf `pytest` is installed, the test set can be executed using the `pytest test` command from within the project directory.\n\nIf `pytest-cov` is also installed, a test coverage report can be generated by executing `pytest test --cov markyp_bootstrap4` from the root directory of the project.\n\n## License - MIT\n\nThe library is open-sourced under the conditions of the MIT [license](https://choosealicense.com/licenses/mit/).\n","funding_links":[],"categories":["Libraries"],"sub_categories":["General HTML Generation"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvolfpeter%2Fmarkyp-bootstrap4","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fvolfpeter%2Fmarkyp-bootstrap4","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvolfpeter%2Fmarkyp-bootstrap4/lists"}