Flask-FomanticUI


NameFlask-FomanticUI JSON
Version 0.0.3 PyPI version JSON
download
home_pagehttps://github.com/juniors90/Flask-FomanticUI
SummaryFlask extension to allow easy embedding of Fomantic-UI CSS Framework.
upload_time2023-02-10 02:27:30
maintainer
docs_urlNone
authorFerreira Juan David
requires_python
licenseThe MIT License
keywords fomantic-ui flask framework css
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # Flask-FomanticUI

[![Build status](https://github.com/juniors90/Flask-FomanticUI/actions/workflows/testing-package.yml/badge.svg)](https://github.com/juniors90/Flask-FomanticUI/actions)
[![codecov](https://codecov.io/gh/juniors90/Flask-FomanticUI/branch/main/graph/badge.svg?token=YNCV9C9GIG)](https://codecov.io/gh/juniors90/Flask-FomanticUI)
![docstr-cov](https://img.shields.io/endpoint?url=https://jsonbin.org/juniors90/Flask-FomanticUI/badges/docstr-cov)
![PyPI](https://img.shields.io/pypi/v/Flask-FomanticUI?logoColor=green)
![PyPI - Downloads](https://img.shields.io/pypi/dm/Flask-FomanticUI)
[![Documentation Status](https://readthedocs.org/projects/flask-fomanticui/badge/?version=latest)](https://flask-fomanticui.readthedocs.io/en/latest/?badge=latest)
[![Forks](https://img.shields.io/github/forks/juniors90/Flask-FomanticUI)](https://github.com/juniors90/Flask-FomanticUI/stargazers)
[![star](https://img.shields.io/github/stars/juniors90/Flask-FomanticUI?color=yellow)](https://github.com/juniors90/Flask-FomanticUI/network/members)
[![issues](https://img.shields.io/github/issues/juniors90/Flask-FomanticUI?color=teal)](https://github.com/juniors90/Flask-FomanticUI/issues)
[![GitHub contributors](https://img.shields.io/github/contributors/juniors90/Flask-FomanticUI?color=green)](https://github.com/juniors90/Flask-FomanticUI/graphs/contributors)
[![black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black)

Flask-FomanticUI is a collection of Jinja macros for [Fomantic UI](https://fomantic-ui.com/) and
[Flask](https://flask.palletsprojects.com/en/2.0.x/) for the global style. Very similar
to [Bootstrap-Flask](https://github.com/greyli/bootstrap-flask). 

## Features

- [x] Table generation: Render data objects (dict or class objects) to Fomantic UI Table.
- [x] Paginate generation: Render Flask-SQLAlchemy `Pagination` object to Fomantic UI Pagination.
- [x] Form generation: Render Flask-WTF/WTForms form object to Fomantic UI Form, etc.


## Requirements

Python 3.8+

## Dependecies for this project.

- [Flask(>=2.0.2)](https://flask.palletsprojects.com/en/2.0.x/) for build the backend.

## intallation

You can install via pip:

```cmd
    $> pip install Flask-FomanticUI
```

## Example

Register the extension:

```python
from flask import Flask
# To follow the naming rule of Flask extension, although
# this project's name is Flask-FomanticUI, the actual package
# installed is named `flask_fomanticui`.
from flask_fomanticui import FomanticUI

app = Flask(__name__)
fomantic = FomanticUI(app)
```

Assuming you have a Flask-WTF form like this:

```python
class LoginForm(FlaskForm):
    username = StringField('Username', validators=[DataRequired(), Length(1, 20)])
    password = PasswordField('Password', validators=[DataRequired(), Length(8, 150)])
    submit = SubmitField()
    remember = BooleanField('Remember me')
```

Now with the `render_ui_form` macro:

```html
{% from 'fomanticui/form_ui.html' import render_ui_form %}
<html>
<head>
<!-- Fomantic UI - CSS -->
</head>
<body>

<h2>Login</h2>
{{ render_ui_form(form) }}

<!-- Fomantic UI - JS -->
</body>
</html>
```

You will get a form like this with only one line code (i.e. `{{ render_ui_form(form) }}`):

![form rendering](https://raw.githubusercontent.com/juniors90/Flask-FomanticUI/master/docs/source/_static/form-example.PNG)

When the validation fails, the error messages will be rendered with proper style:

![error form rendering](https://raw.githubusercontent.com/juniors90/Flask-FomanticUI/master/docs/source/_static/error-form-example.PNG)

Read the [Basic Usage](https://flask-fomanticui.readthedocs.io/en/latest/notes/basic.html) 
docs for more details.

## Links

- [Documentation](https://flask-fomanticui.readthedocs.io)
- [Example Application](https://github.com/juniors90/Flask-FomanticUI/tree/main/sample_app)
- [PyPI Releases](https://pypi.org/project/Flask-FomanticUI/)
- [Changelog](https://github.com/juniors90/Flask-FomanticUI/blob/main/CHANGELOG.rst)


## Authors

- Ferreira, Juan David

Please submit bug reports, suggestions for improvements and patches via
the (E-mail: juandavid9a0@gmail.com).

## Contributors

Credits goes to these peoples:

<a href="https://github.com/juniors90/Flask-FomanticUI/graphs/contributors">
  <img src="https://contrib.rocks/image?repo=juniors90/Flask-FomanticUI" />
</a>

## Official repository and Issues

- https://github.com/juniors90/Flask-FomanticUI


## License

`Flask-FomanticUI` is free software you can redistribute it and/or modify it
under the terms of the MIT License. For more information, you can see the
[LICENSE](https://github.com/juniors90/Flask-FomanticUI/blob/main/LICENSE) file
for details.

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/juniors90/Flask-FomanticUI",
    "name": "Flask-FomanticUI",
    "maintainer": "",
    "docs_url": null,
    "requires_python": "",
    "maintainer_email": "",
    "keywords": "Fomantic-UI,Flask,Framework CSS",
    "author": "Ferreira Juan David",
    "author_email": "juandavid9a0@gmail.com",
    "download_url": "https://files.pythonhosted.org/packages/83/93/d6ec09f91770633a63d5c96623df3ecd3dd6e82b78580f43c7177391654f/Flask-FomanticUI-0.0.3.tar.gz",
    "platform": "any",
    "description": "# Flask-FomanticUI\n\n[![Build status](https://github.com/juniors90/Flask-FomanticUI/actions/workflows/testing-package.yml/badge.svg)](https://github.com/juniors90/Flask-FomanticUI/actions)\n[![codecov](https://codecov.io/gh/juniors90/Flask-FomanticUI/branch/main/graph/badge.svg?token=YNCV9C9GIG)](https://codecov.io/gh/juniors90/Flask-FomanticUI)\n![docstr-cov](https://img.shields.io/endpoint?url=https://jsonbin.org/juniors90/Flask-FomanticUI/badges/docstr-cov)\n![PyPI](https://img.shields.io/pypi/v/Flask-FomanticUI?logoColor=green)\n![PyPI - Downloads](https://img.shields.io/pypi/dm/Flask-FomanticUI)\n[![Documentation Status](https://readthedocs.org/projects/flask-fomanticui/badge/?version=latest)](https://flask-fomanticui.readthedocs.io/en/latest/?badge=latest)\n[![Forks](https://img.shields.io/github/forks/juniors90/Flask-FomanticUI)](https://github.com/juniors90/Flask-FomanticUI/stargazers)\n[![star](https://img.shields.io/github/stars/juniors90/Flask-FomanticUI?color=yellow)](https://github.com/juniors90/Flask-FomanticUI/network/members)\n[![issues](https://img.shields.io/github/issues/juniors90/Flask-FomanticUI?color=teal)](https://github.com/juniors90/Flask-FomanticUI/issues)\n[![GitHub contributors](https://img.shields.io/github/contributors/juniors90/Flask-FomanticUI?color=green)](https://github.com/juniors90/Flask-FomanticUI/graphs/contributors)\n[![black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black)\n\nFlask-FomanticUI is a collection of Jinja macros for [Fomantic UI](https://fomantic-ui.com/) and\n[Flask](https://flask.palletsprojects.com/en/2.0.x/) for the global style. Very similar\nto [Bootstrap-Flask](https://github.com/greyli/bootstrap-flask). \n\n## Features\n\n- [x] Table generation: Render data objects (dict or class objects) to Fomantic UI Table.\n- [x] Paginate generation: Render Flask-SQLAlchemy `Pagination` object to Fomantic UI Pagination.\n- [x] Form generation: Render Flask-WTF/WTForms form object to Fomantic UI Form, etc.\n\n\n## Requirements\n\nPython 3.8+\n\n## Dependecies for this project.\n\n- [Flask(>=2.0.2)](https://flask.palletsprojects.com/en/2.0.x/) for build the backend.\n\n## intallation\n\nYou can install via pip:\n\n```cmd\n    $> pip install Flask-FomanticUI\n```\n\n## Example\n\nRegister the extension:\n\n```python\nfrom flask import Flask\n# To follow the naming rule of Flask extension, although\n# this project's name is Flask-FomanticUI, the actual package\n# installed is named `flask_fomanticui`.\nfrom flask_fomanticui import FomanticUI\n\napp = Flask(__name__)\nfomantic = FomanticUI(app)\n```\n\nAssuming you have a Flask-WTF form like this:\n\n```python\nclass LoginForm(FlaskForm):\n    username = StringField('Username', validators=[DataRequired(), Length(1, 20)])\n    password = PasswordField('Password', validators=[DataRequired(), Length(8, 150)])\n    submit = SubmitField()\n    remember = BooleanField('Remember me')\n```\n\nNow with the `render_ui_form` macro:\n\n```html\n{% from 'fomanticui/form_ui.html' import render_ui_form %}\n<html>\n<head>\n<!-- Fomantic UI - CSS -->\n</head>\n<body>\n\n<h2>Login</h2>\n{{ render_ui_form(form) }}\n\n<!-- Fomantic UI - JS -->\n</body>\n</html>\n```\n\nYou will get a form like this with only one line code (i.e. `{{ render_ui_form(form) }}`):\n\n![form rendering](https://raw.githubusercontent.com/juniors90/Flask-FomanticUI/master/docs/source/_static/form-example.PNG)\n\nWhen the validation fails, the error messages will be rendered with proper style:\n\n![error form rendering](https://raw.githubusercontent.com/juniors90/Flask-FomanticUI/master/docs/source/_static/error-form-example.PNG)\n\nRead the [Basic Usage](https://flask-fomanticui.readthedocs.io/en/latest/notes/basic.html) \ndocs for more details.\n\n## Links\n\n- [Documentation](https://flask-fomanticui.readthedocs.io)\n- [Example Application](https://github.com/juniors90/Flask-FomanticUI/tree/main/sample_app)\n- [PyPI Releases](https://pypi.org/project/Flask-FomanticUI/)\n- [Changelog](https://github.com/juniors90/Flask-FomanticUI/blob/main/CHANGELOG.rst)\n\n\n## Authors\n\n- Ferreira, Juan David\n\nPlease submit bug reports, suggestions for improvements and patches via\nthe (E-mail: juandavid9a0@gmail.com).\n\n## Contributors\n\nCredits goes to these peoples:\n\n<a href=\"https://github.com/juniors90/Flask-FomanticUI/graphs/contributors\">\n  <img src=\"https://contrib.rocks/image?repo=juniors90/Flask-FomanticUI\" />\n</a>\n\n## Official repository and Issues\n\n- https://github.com/juniors90/Flask-FomanticUI\n\n\n## License\n\n`Flask-FomanticUI` is free software you can redistribute it and/or modify it\nunder the terms of the MIT License. For more information, you can see the\n[LICENSE](https://github.com/juniors90/Flask-FomanticUI/blob/main/LICENSE) file\nfor details.\n",
    "bugtrack_url": null,
    "license": "The MIT License",
    "summary": "Flask extension to allow easy embedding of Fomantic-UI CSS Framework.",
    "version": "0.0.3",
    "split_keywords": [
        "fomantic-ui",
        "flask",
        "framework css"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "a696c176bd00b62adf73d9d7a3269bfae00210994d231767c5672494729b5e93",
                "md5": "e4b8b05cac62a9c2ebdfe299a94e8edd",
                "sha256": "bc2caab272671195d08865b123e6727be1b2e4b126d14558e8565c313443b9f5"
            },
            "downloads": -1,
            "filename": "Flask_FomanticUI-0.0.3-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "e4b8b05cac62a9c2ebdfe299a94e8edd",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": null,
            "size": 3723946,
            "upload_time": "2023-02-10T02:27:28",
            "upload_time_iso_8601": "2023-02-10T02:27:28.762584Z",
            "url": "https://files.pythonhosted.org/packages/a6/96/c176bd00b62adf73d9d7a3269bfae00210994d231767c5672494729b5e93/Flask_FomanticUI-0.0.3-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "8393d6ec09f91770633a63d5c96623df3ecd3dd6e82b78580f43c7177391654f",
                "md5": "365bed18214501ee312540c39e2577ce",
                "sha256": "ce203f3ecf3efc16d39af6315b942d03469fe8494d319e2bbb5685d6564e0c86"
            },
            "downloads": -1,
            "filename": "Flask-FomanticUI-0.0.3.tar.gz",
            "has_sig": false,
            "md5_digest": "365bed18214501ee312540c39e2577ce",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": null,
            "size": 3710159,
            "upload_time": "2023-02-10T02:27:30",
            "upload_time_iso_8601": "2023-02-10T02:27:30.521544Z",
            "url": "https://files.pythonhosted.org/packages/83/93/d6ec09f91770633a63d5c96623df3ecd3dd6e82b78580f43c7177391654f/Flask-FomanticUI-0.0.3.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-02-10 02:27:30",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "github_user": "juniors90",
    "github_project": "Flask-FomanticUI",
    "lcname": "flask-fomanticui"
}
        
Elapsed time: 0.03936s