Name | qface JSON |
Version |
2.0.9
JSON |
| download |
home_page | None |
Summary | A generator framework based on a common modern IDL |
upload_time | 2024-08-01 13:46:20 |
maintainer | None |
docs_url | None |
author | JRyannel |
requires_python | >=3.5 |
license | MIT |
keywords |
qt
code
generator
framework
|
VCS |
|
bugtrack_url |
|
requirements |
No requirements were recorded.
|
Travis-CI |
No Travis.
|
coveralls test coverage |
No coveralls.
|
# Qt Interface Builder (QFace)
[![Build Status](https://github.com/Pelagicore/qface/workflows/Python%20package/badge.svg)](https://github.com/Pelagicore/qface/actions/workflows/python-package.yml)
[![Weekly Build Status](https://github.com/Pelagicore/qface/workflows/Weekly%20Check/badge.svg)](https://github.com/Pelagicore/qface/actions/workflows/weekly.yml)
[![Documentation Status](https://readthedocs.org/projects/qface/badge/?version=latest)](http://qface.readthedocs.io/en/latest/?badge=latest)
[![Chat at https://gitter.im/qmlbook/qface](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/qmlbook/qface?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
QFace is a generator framework based on a common modern IDL. It is not a generator as such but enforces a common IDL format and provides a library to write your own generator. It is actually very easy to create your own generator and generate your custom solution based on your needs from the same IDL.
The IDL is designed after the Qt/QML interface and as such is optimized to generate source code used with Qt C++ or Qt QML, but it is not limited to this use case.
QFace is already very fast by design and suitable for large IDL document sets. Additionally it can use a cache to avoid parsing unchanged IDL documents. It can automatically avoid writing new files if the target file has the same content.
QFace is written out of the learnings of using IDLs in other large projects. Often in the project you need to adjust the code generation but in many generators this is awfully complicated. Or you need to run a report on the documents or generate specific documentation. In QFace this is enabled by having a very flexible code generation framework which enforces the same IDL.
Please see the INSTALL and USAGE guides for more information.
## Documentation
Documentation is hosted at [readthedocs](http://qface.readthedocs.io/en/latest/).
## Install
To install the qface library you need to have python3 and pip installed.
```sh
pip3 install qface
```
## Install Development Version
### Prerequisites
To install the development version you need to clone the repository and ensure you have checkout the develop branch.
```sh
git clone git@github.com:Pelagicore/qface.git
cd qface
git checkout develop
```
The installation requires the python package manager called (pip) using the python 3 version. You can try:
```sh
python3 --version
pip3 --version
```
### Installation
Use the editable option of pip to install an editable version.
```sh
cd qface
pip3 install --editable .
```
This reads the `setup.py` document and installs the package as reference to this repository. So all changes will be immediatly reflected in the installation.
To update the installation just simple pull from the git repository.
## Download
If you are looking for the examples and the builtin generators you need to download the code.
```sh
git clone git@github.com:Pelagicore/qface.git
```
## Copyright and license
Copyright (C) 2016 Pelagicore AG
The source code in this repository is subject to the terms of the MIT license, please see included "LICENSE" file for details.
## QFace Example
```js
// echo.qface
module org.example 1.0;
/**!
The echo interface to call someone
on the other side
*/
interface Echo {
readonly Message lastMessage;
void echo(Message message);
signal callMe();
};
struct Message {
string text;
};
```
Now you write a small script using qface to generate your code
```python
# mygenerator.py
from qface.generator import FileSystem, Generator
# load the interface files
system = FileSystem.parse('echo.qface')
# prepare the generator
generator = Generator(searchpath='.')
# iterate over the domain model
for module in system.modules:
for interface in module.interfaces:
# prepare a context object
ctx = { 'interface': interface }
# use header.h template with ctx to write to a file
generator.write('{{interface|lower}}.h', 'header.h', ctx)
```
Depending on the used generator it reads the input file and runs it through the generator. The output files are written relative to the given output directory. The input can be either a file or a folder.
Raw data
{
"_id": null,
"home_page": null,
"name": "qface",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.5",
"maintainer_email": null,
"keywords": "qt code generator framework",
"author": "JRyannel",
"author_email": null,
"download_url": "https://files.pythonhosted.org/packages/b6/de/ce3bbd27022eb72042823afab681ae2fc9b1dafbfa46c5f1659e0ec14e41/qface-2.0.9.tar.gz",
"platform": null,
"description": "# Qt Interface Builder (QFace)\n\n[![Build Status](https://github.com/Pelagicore/qface/workflows/Python%20package/badge.svg)](https://github.com/Pelagicore/qface/actions/workflows/python-package.yml)\n[![Weekly Build Status](https://github.com/Pelagicore/qface/workflows/Weekly%20Check/badge.svg)](https://github.com/Pelagicore/qface/actions/workflows/weekly.yml)\n[![Documentation Status](https://readthedocs.org/projects/qface/badge/?version=latest)](http://qface.readthedocs.io/en/latest/?badge=latest)\n[![Chat at https://gitter.im/qmlbook/qface](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/qmlbook/qface?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)\n\nQFace is a generator framework based on a common modern IDL. It is not a generator as such but enforces a common IDL format and provides a library to write your own generator. It is actually very easy to create your own generator and generate your custom solution based on your needs from the same IDL.\n\nThe IDL is designed after the Qt/QML interface and as such is optimized to generate source code used with Qt C++ or Qt QML, but it is not limited to this use case.\n\nQFace is already very fast by design and suitable for large IDL document sets. Additionally it can use a cache to avoid parsing unchanged IDL documents. It can automatically avoid writing new files if the target file has the same content.\n\nQFace is written out of the learnings of using IDLs in other large projects. Often in the project you need to adjust the code generation but in many generators this is awfully complicated. Or you need to run a report on the documents or generate specific documentation. In QFace this is enabled by having a very flexible code generation framework which enforces the same IDL.\n\nPlease see the INSTALL and USAGE guides for more information.\n\n## Documentation\n\nDocumentation is hosted at [readthedocs](http://qface.readthedocs.io/en/latest/).\n\n## Install\n\nTo install the qface library you need to have python3 and pip installed.\n\n```sh\npip3 install qface\n```\n\n## Install Development Version\n\n### Prerequisites\n\nTo install the development version you need to clone the repository and ensure you have checkout the develop branch.\n\n```sh\ngit clone git@github.com:Pelagicore/qface.git\ncd qface\ngit checkout develop\n```\n\nThe installation requires the python package manager called (pip) using the python 3 version. You can try:\n\n```sh\npython3 --version\npip3 --version\n```\n\n### Installation\n\nUse the editable option of pip to install an editable version.\n\n```sh\ncd qface\npip3 install --editable .\n```\n\nThis reads the `setup.py` document and installs the package as reference to this repository. So all changes will be immediatly reflected in the installation.\n\nTo update the installation just simple pull from the git repository.\n\n\n## Download\n\nIf you are looking for the examples and the builtin generators you need to download the code.\n\n```sh\ngit clone git@github.com:Pelagicore/qface.git\n```\n\n## Copyright and license\n\nCopyright (C) 2016 Pelagicore AG\n\nThe source code in this repository is subject to the terms of the MIT license, please see included \"LICENSE\" file for details.\n\n\n## QFace Example\n\n\n```js\n// echo.qface\nmodule org.example 1.0;\n\n/**!\nThe echo interface to call someone\non the other side\n*/\ninterface Echo {\n readonly Message lastMessage;\n void echo(Message message);\n signal callMe();\n};\n\nstruct Message {\n string text;\n};\n```\n\nNow you write a small script using qface to generate your code\n\n```python\n# mygenerator.py\nfrom qface.generator import FileSystem, Generator\n\n# load the interface files\nsystem = FileSystem.parse('echo.qface')\n# prepare the generator\ngenerator = Generator(searchpath='.')\n\n# iterate over the domain model\nfor module in system.modules:\n for interface in module.interfaces:\n # prepare a context object\n ctx = { 'interface': interface }\n # use header.h template with ctx to write to a file\n generator.write('{{interface|lower}}.h', 'header.h', ctx)\n```\n\nDepending on the used generator it reads the input file and runs it through the generator. The output files are written relative to the given output directory. The input can be either a file or a folder.\n\n\n",
"bugtrack_url": null,
"license": "MIT",
"summary": "A generator framework based on a common modern IDL",
"version": "2.0.9",
"project_urls": null,
"split_keywords": [
"qt",
"code",
"generator",
"framework"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "b949c12f99c63c145d42fe13ff90722798e61a63e3c2d53c8c3fcf9797ed3263",
"md5": "90e0f2692c720415c4a55b8cbb38ebab",
"sha256": "0600c4137820526bdece77348a763e0b49acdbb1ac540a76d703eb196b621047"
},
"downloads": -1,
"filename": "qface-2.0.9-7-py3-none-any.whl",
"has_sig": false,
"md5_digest": "90e0f2692c720415c4a55b8cbb38ebab",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.5",
"size": 55511,
"upload_time": "2024-08-01T13:46:19",
"upload_time_iso_8601": "2024-08-01T13:46:19.914057Z",
"url": "https://files.pythonhosted.org/packages/b9/49/c12f99c63c145d42fe13ff90722798e61a63e3c2d53c8c3fcf9797ed3263/qface-2.0.9-7-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "b6dece3bbd27022eb72042823afab681ae2fc9b1dafbfa46c5f1659e0ec14e41",
"md5": "9a233f4c62834a84f798304eccbc5b88",
"sha256": "1cd5e8a99dfd34bec0d23a56c00bc945751f4ed9e548dc7ef574a6d68b2a19f7"
},
"downloads": -1,
"filename": "qface-2.0.9.tar.gz",
"has_sig": false,
"md5_digest": "9a233f4c62834a84f798304eccbc5b88",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.5",
"size": 49342,
"upload_time": "2024-08-01T13:46:20",
"upload_time_iso_8601": "2024-08-01T13:46:20.922033Z",
"url": "https://files.pythonhosted.org/packages/b6/de/ce3bbd27022eb72042823afab681ae2fc9b1dafbfa46c5f1659e0ec14e41/qface-2.0.9.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-08-01 13:46:20",
"github": false,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"lcname": "qface"
}