.. _readme:
Introduction
============
Pyramid configuration library Minty Python (micro)services.
Getting started
---------------
View::
def hello(request):
# See minty package for more information about these domain classes:
domain_query_instance = request.get_query_instance("YourDomainHere")
return domain_query_instance.some_domain_query()
Main::
def main(*args, **kwargs):
# See minty package for more information about these domain classes:
loader = minty_pyramid.Engine(domains=[YourDomainHere])
# [optional] To retrieve session information, make sure to add before
# running loader.setup()
kwargs["session_manager"] = True
# Ensure the "get_query_instance" request method is available
# It will use a CQRS instance, built with an InstanceConfig built from
# the configuration file specified in the file pointed to by
# "minty_service.infrastructure.config_file" in kwargs
config = loader.setup(*args, **kwargs)
config.add_route("hello_world", "/hello")
config.add_view(
hello, request_method="GET", renderer="json", route_name="hello_world"
)
# If you've created the app from an openapi-spec file make sure to add:
routes.add_routes(config)
# Returns a WSGI application
return loader.main()
Code generation commands:
generate-views: create boilerplate views by using "generate-views" command.
When creating your application from an openapi(v3) spec file run
"generate-views" to create "views.py" file with boilerplate code for all the views
specified in the openapi spec.
see "generate-views --help" for more info
generate-routes: create Routes by using "generate-routes" command.
Generate or re-generate "routes.py" file from an openapi spec file.
see "generate-routes --help" for more info
More documentation
------------------
Please see the generated documentation via CI for more information about this
module and how to contribute in our online documentation. Open index.html
when you get there:
`<https://gitlab.com/minty-python/minty-pyramid/-/jobs/artifacts/master/browse/tmp/docs?job=qa>`_
Contributing
------------
Please read `CONTRIBUTING.md <https://gitlab.com/minty-python/minty-pyramid/blob/master/CONTRIBUTING.md>`_
for details on our code of conduct, and the process for submitting pull requests to us.
Versioning
----------
We use `SemVer <https://semver.org/>`_ for versioning. For the versions
available, see the
`tags on this repository <https://gitlab.com/minty-python/minty-pyramid/tags/>`_
License
-------
Copyright (c) Minty Team and all persons listed in the file `CONTRIBUTORS`
This project is licensed under the EUPL, v1.2. See the `EUPL-1.2.txt` in the
`LICENSES` directory for details.
.. SPDX-FileCopyrightText: 2020 Mintlab B.V.
..
.. SPDX-License-Identifier: EUPL-1.2
Raw data
{
"_id": null,
"home_page": "https://gitlab.com/minty-python/minty-pyramid",
"name": "minty-pyramid",
"maintainer": "",
"docs_url": null,
"requires_python": "",
"maintainer_email": "",
"keywords": "minty_pyramid",
"author": "Michiel Ootjers",
"author_email": "michiel@mintlab.nl",
"download_url": "https://files.pythonhosted.org/packages/5b/06/a5f8b1534d89ffe99dfb22fa1b900a184fd88cecafd3443767e7e769c236/minty_pyramid-3.0.2.tar.gz",
"platform": null,
"description": ".. _readme:\n\nIntroduction\n============\n\nPyramid configuration library Minty Python (micro)services.\n\nGetting started\n---------------\nView::\n\n def hello(request):\n # See minty package for more information about these domain classes:\n domain_query_instance = request.get_query_instance(\"YourDomainHere\")\n return domain_query_instance.some_domain_query()\n\nMain::\n\n def main(*args, **kwargs):\n # See minty package for more information about these domain classes:\n loader = minty_pyramid.Engine(domains=[YourDomainHere])\n \n # [optional] To retrieve session information, make sure to add before \n # running loader.setup()\n kwargs[\"session_manager\"] = True \n\n # Ensure the \"get_query_instance\" request method is available\n # It will use a CQRS instance, built with an InstanceConfig built from\n # the configuration file specified in the file pointed to by\n # \"minty_service.infrastructure.config_file\" in kwargs\n config = loader.setup(*args, **kwargs)\n\n config.add_route(\"hello_world\", \"/hello\")\n config.add_view(\n hello, request_method=\"GET\", renderer=\"json\", route_name=\"hello_world\"\n )\n\n # If you've created the app from an openapi-spec file make sure to add: \n routes.add_routes(config)\n\n # Returns a WSGI application\n return loader.main()\n \n\nCode generation commands:\n generate-views: create boilerplate views by using \"generate-views\" command.\n When creating your application from an openapi(v3) spec file run\n \"generate-views\" to create \"views.py\" file with boilerplate code for all the views\n specified in the openapi spec.\n\n see \"generate-views --help\" for more info\n\n generate-routes: create Routes by using \"generate-routes\" command.\n Generate or re-generate \"routes.py\" file from an openapi spec file.\n\n see \"generate-routes --help\" for more info\n\n\nMore documentation\n------------------\n\nPlease see the generated documentation via CI for more information about this\nmodule and how to contribute in our online documentation. Open index.html\nwhen you get there:\n`<https://gitlab.com/minty-python/minty-pyramid/-/jobs/artifacts/master/browse/tmp/docs?job=qa>`_\n\n\nContributing\n------------\n\nPlease read `CONTRIBUTING.md <https://gitlab.com/minty-python/minty-pyramid/blob/master/CONTRIBUTING.md>`_\nfor details on our code of conduct, and the process for submitting pull requests to us.\n\nVersioning\n----------\n\nWe use `SemVer <https://semver.org/>`_ for versioning. For the versions\navailable, see the\n`tags on this repository <https://gitlab.com/minty-python/minty-pyramid/tags/>`_\n\nLicense\n-------\n\nCopyright (c) Minty Team and all persons listed in the file `CONTRIBUTORS`\n\nThis project is licensed under the EUPL, v1.2. See the `EUPL-1.2.txt` in the\n`LICENSES` directory for details.\n\n.. SPDX-FileCopyrightText: 2020 Mintlab B.V.\n..\n.. SPDX-License-Identifier: EUPL-1.2\n",
"bugtrack_url": null,
"license": "EUPL license",
"summary": "Minty HTTP Api server based on Pyramid",
"version": "3.0.2",
"project_urls": {
"Homepage": "https://gitlab.com/minty-python/minty-pyramid"
},
"split_keywords": [
"minty_pyramid"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "3aeb8721087109dec6d3d894605e5c3aa7a461c86af0efd5374f1c3c70f60e04",
"md5": "833c6333d159571bd4e582c29585aae6",
"sha256": "e06f2db93b832fd69a072f31670b5f2176d20dc17d457cbd9a1e76b605ba6cb9"
},
"downloads": -1,
"filename": "minty_pyramid-3.0.2-py3-none-any.whl",
"has_sig": false,
"md5_digest": "833c6333d159571bd4e582c29585aae6",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": null,
"size": 32092,
"upload_time": "2023-12-01T12:59:27",
"upload_time_iso_8601": "2023-12-01T12:59:27.028227Z",
"url": "https://files.pythonhosted.org/packages/3a/eb/8721087109dec6d3d894605e5c3aa7a461c86af0efd5374f1c3c70f60e04/minty_pyramid-3.0.2-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "5b06a5f8b1534d89ffe99dfb22fa1b900a184fd88cecafd3443767e7e769c236",
"md5": "b7aab70e05bb073115c9b47fab7c28d2",
"sha256": "0a2a74c5ed0a486219c02c4661f2bd0a5fdc900ebab685ff19eb1a3627a4d78c"
},
"downloads": -1,
"filename": "minty_pyramid-3.0.2.tar.gz",
"has_sig": false,
"md5_digest": "b7aab70e05bb073115c9b47fab7c28d2",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 25973,
"upload_time": "2023-12-01T12:59:30",
"upload_time_iso_8601": "2023-12-01T12:59:30.286774Z",
"url": "https://files.pythonhosted.org/packages/5b/06/a5f8b1534d89ffe99dfb22fa1b900a184fd88cecafd3443767e7e769c236/minty_pyramid-3.0.2.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2023-12-01 12:59:30",
"github": false,
"gitlab": true,
"bitbucket": false,
"codeberg": false,
"gitlab_user": "minty-python",
"gitlab_project": "minty-pyramid",
"lcname": "minty-pyramid"
}