{ "info": { "author": "Gabriel Hearot", "author_email": "gabriel@hearot.it", "bugtrack_url": null, "classifiers": [], "description": "Welcome to producti gestio! |image0| |image1| |image2| |image3| |image4| |image5|\n=================================================================================\n\n**producti gestio** (/producti gestio/, from Latin: *Product\nmanagement*) is a simple **API like web server** written in `Python`_.\nIt could be used for your **projects** and it is useful for\n**debugging**. You can start a **web server** in few seconds and *enjoy*\nyour development session.\n\nUsing *producti-gestio*, you are allowed to have a *coffee break*, because the\nentire server is managed by it!\n\nContents\n========\n\n- `Documentation`_\n- `Installation`_\n\n - `Installation from pypi`_ (using **pip**) - Latest stable\n version\n - `From Github`_\n\n - `Using pip`_\n - `Downloading files`_\n\n - `Create an handler function`_\n - `Get parameters, headers, etc\u2026`_\n - `Configuration`_\n - `Run the server using decorators`_\n\n- `Files`_\n- `How to contribute`_\n\nInstallation\n------------\n\nFrom PyPi\n-------------\n\nJust use **pip**:\n\n::\n\n pip install producti_gestio\n\nOr if you want to *upgrade* the package:\n\n::\n\n pip install --upgrade producti_gestio\n\nFrom Github\n---------------\n\nUsing Pip\n~~~~~~~~~\n\nTry using that piece of code:\n\n::\n\n pip install git+https://github.com/pyTeens/producti-gestio.git\n\nOr if you want to *upgrade* the package\n\n::\n\n pip install --upgrade git+https://github.com/pyTeens/producti-gestio.git\n\nDownloading files\n~~~~~~~~~~~~~~~~~\n\n*In primis* (from Latin, \u201cfirstable\u201d), **clone** the repository:\n\n::\n\n git clone https://github.com/pyTeens/producti-gestio.git\n\nThen, change directory:\n\n::\n\n cd producti-gestio\n\nAnd finally, install the **package**:\n\n::\n\n sudo python3 setup.py install\n\nUsage\n-----\n\nImport the library\n~~~~~~~~~~~~~~~~~~\n\nJust use ``import`` statement:\n\n.. code:: python\n\n import producti_gestio\n\nCreate an handler function\n~~~~~~~~~~~~~~~~~~~~~~~~~~\n\nYou\u2019re going to use a **decorator** that will create a **Wrapper**.\nHere an example:\n\n.. code-block:: python\n\n from producti_gestio import Server\n\n my_server = Server(allow_get=True) # Create the server instance\n\n @my_server.on_request\n def my_function(**kwargs):\n return {\n 'response_code': 200, # The response code (see https://en.wikipedia.org/wiki/List_of_HTTP_status_codes)\n 'response': { # A dictionary that will be encoded in JSON\n 'ok': True,\n 'message': 'Hello world!'\n }\n }\n\n\nThen, if you call ``my_server.start()`` you\u2019ll start the *HTTPServer* (using ``Threads``):\n\n\nAnd, if you\u2019ll surf ``127.0.0.1:8000`` that will be the **output**:\n\n::\n\n {'ok': True, 'message': 'Hello world!'}\n\nGet parameters, headers, etc\u2026\n~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n\nJust look at the ``kwargs`` parameter. It contains a *dictionary* of all\nthe informations you need.\n\n- **Parameters** -> ``kwargs['parameters']``\n- **Headers** -> ``kwargs['header']``\n- **Request type** -> ``kwargs['request-type']``\n- **Path requested** -> ``kwargs['path']``\n- **Handler object** -> ``kwargs['object']``\n\nConfiguration\n~~~~~~~~~~~~~\n\nYou can pass your own configuration to the **server-creator function**\nHere all the keyword arguments you can pass:\n\n- **allow_get** (default is *False*)\n- **allow_post** (default is *True*)\n- **function** (default is *None*, but it is needed, it\u2019s the\n **handler_function**),\n- **debug** (default is *False*, if you want to print the *Traceback*\n under ``error_message`` in the JSON response when an Exception is\n caught)\n- **ip** (default is *\u2018127.0.0.1\u2019*)\n- **port** (default is *8000*)\n\nRun the server using decorators\n~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n\nJust call the **handler function**:\n\n.. code-block:: python\n\n import producti_gestio\n\n @producti_gestio.Decorator\n def server_create(*args, **kwargs):\n \"\"\"\n It create the server and\n launch it\n \"\"\"\n def handler_function(*args, **kwargs):\n return ({\n 'response_code': 200,\n 'response': {\n 'ok': True,\n 'is_meme': True\n }\n })\n\n return handler_function\n\n if __name__ == '__main__':\n server_create(allow_get=True)\n\nFiles\n-----\n\nYou\u2019ll find lots of *not understandable* **directory** and **files**, so\nhere a list and definitions of them:\n\n- **producti_gestio** - *Main directory*\n\n - **producti_gestio/__init__.py** - *Init file, it included all\n classes*\n - **producti_gestio/__main__.py** - *It parses and processes all\n given parameters from the command line*\n - **producti_gestio/core** - *Directory for all important classes\n such as request_handler*\n\n - **producti_gestio/core/__init__.py** - *It includes all core\n classes*\n - **producti_gestio/core/check.py** - *It defines a check function\n that could be used a decorator for filters*\n - **producti_gestio/core/request_handler.py** - *The Handler of\n the requests, it passes parameters to the defined Handler\n function and then it send the JSON response*\n\n - **producti_gestio/decorator** - *Directory for all help-decorator\n classes*\n\n - **producti_gestio/decorator/__init__.py** - *It includes all\n decorator classes*\n - **producti_gestio/decorator/wrapper.py** - *The Decorator\n class, it is used to launch the Server class and define the\n Handler function*\n\n - **producti_gestio/exceptions** - *Directory for all the exception*\n\n - **producti_gestio/exceptions/__init__.py** - *It includes all the exceptions*\n - **producti_gestio/exceptions/exceptions.py** - *It defines all the exceptions*\n\n - **producti_gestio/filters** - *Directory for all the filters*\n\n - **producti_gestio/filters/__init__.py** - *It includes filter.py and filters.py*\n - **producti_gestio/filters/filter.py** - *It defines the Filter class*\n - **producti_gestio/filters/filters.py** - *It defines all the Filters*\n\n - **producti_gestio/handlers** - *Directory for the handlers*\n\n - **producti_gestio/handlers/__init__.py** - *It includes handler.py*\n - **producti_gestio/handlers/handler.py** - *It defines the Handler class*\n\n - **producti_gestio/project** - *Directory of some project generator\n tools*\n\n - **producti_gestio/project/__init__.py** - *It includes the\n project generator*\n - **producti_gestio/project/generator.py** - *Tools for code\n auto-generating*\n\n - **producti_gestio/server** - *The Server directory*\n\n - **producti_gestio/server/__init__.py** - *It includes all\n server classes*\n - **producti_gestio/server/server.py** - *The main class, it\n creates the server*\n\n - **producti_gestio/utils** - *Directory of some useful tools*\n\n - **producti_gestio/utils/__init__.py** **It includes the\n arguments parser**\n - **producti_gestio/utils/arguments_parser.py** - *It parses and\n processes the given arguments from the command line*\n\nHow to contribute\n-----------------\n\n*In primis* (\u201cfirstable\u201d), you **must** read the `code of conducts`_ and\nthe `contributing document`_, then ask\n`@hearot`_ to enter the **organization**\n(`pyTeens`_).\n\n**Copyright** (c) 2018 `pyTeens `__. All rights\nreserved.\n\n.. _Python: https://python.org\n.. _Documentation: http://producti-gestio.readthedocs.io\n.. _Installation: #installation\n.. _Installation from pypi: #from-pypi\n.. _From Github: #from-github\n.. _Using pip: #using-pip\n.. _Downloading files: #downloading-files\n.. _Create an handler function: #create-an-handler-function\n.. _Get parameters, headers, etc\u2026: #get-parameters-headers-etc\n.. _Configuration: #configuration\n.. _Run the server: #run-the-server\n.. _Files: #files\n.. _How to contribute: #how-to-contribute\n.. _code of conducts: CODE_OF_CONDUCTS.md\n.. _contributing document: CONTRIBUTING.md\n.. _pyTeens: https://github.com/pyTeens\n.. _@hearot: https://github.com/hearot\n\n.. |image0| image:: https://travis-ci.org/pyTeens/producti-gestio.svg?branch=master\n :target: https://travis-ci.org/pyTeens/producti-gestio\n.. |image1| image:: https://img.shields.io/pypi/v/producti_gestio.svg\n :target: https://pypi.org/project/producti_gestio/\n.. |image2| image:: https://img.shields.io/github/contributors/pyTeens/producti-gestio.svg\n :target: https://github.com/pyTeens/producti-gestio\n.. |image3| image:: https://www.codefactor.io/repository/github/pyteens/producti-gestio/badge/master\n :target: https://www.codefactor.io/repository/github/pyteens/producti-gestio/overview/master\n.. |image4| image:: https://pyup.io/repos/github/pyTeens/producti-gestio/shield.svg\n :target: https://pyup.io/repos/github/pyTeens/producti-gestio/\n.. |image5| image:: https://pyup.io/repos/github/pyTeens/producti-gestio/python-3-shield.svg\n :target: https://pyup.io/repos/github/pyTeens/producti-gestio/\n\n\n", "description_content_type": "", "docs_url": null, "download_url": "https://github.com/pyTeens/producti-gestio/archive/v0.7.2.tar.gz", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/pyTeens/producti-gestio", "keywords": "producti-gestio python api rest", "license": "", "maintainer": "", "maintainer_email": "", "name": "producti_gestio", "package_url": "https://pypi.org/project/producti_gestio/", "platform": "", "project_url": "https://pypi.org/project/producti_gestio/", "project_urls": { "Download": "https://github.com/pyTeens/producti-gestio/archive/v0.7.2.tar.gz", "Homepage": "https://github.com/pyTeens/producti-gestio" }, "release_url": "https://pypi.org/project/producti_gestio/0.7.2/", "requires_dist": [ "dataclasses (==0.6)", "sphinx (==1.7.5)", "sphinx-rtd-theme (==0.3.1)" ], "requires_python": "", "summary": "A new simple web server", "version": "0.7.2" }, "last_serial": 3910138, "releases": { "0.2": [ { "comment_text": "", "digests": { "md5": "374e6ab1dcfc5e33974236b811c8a0cf", "sha256": "a392f1d46823cd03fbbbbf6cf64ea3e2ca4c1a13e50df98fb88a08058c09371d" }, "downloads": -1, "filename": "producti_gestio-0.2.tar.gz", "has_sig": false, "md5_digest": "374e6ab1dcfc5e33974236b811c8a0cf", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5696, "upload_time": "2018-03-12T15:22:21", "url": "https://files.pythonhosted.org/packages/05/28/b2ba46360780559004eeb0c0bd9a8ce8b159d832e655739469d32931fe1f/producti_gestio-0.2.tar.gz" } ], "0.3.0": [ { "comment_text": "", "digests": { "md5": "c22364e75f8bfd1ed936f925b047d73c", "sha256": "aec6be58c5476f9c64f9674aaad51759150e3151a02e7d1fe0c98920a5d91317" }, "downloads": -1, "filename": "producti_gestio-0.3.0.tar.gz", "has_sig": false, "md5_digest": "c22364e75f8bfd1ed936f925b047d73c", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4668, "upload_time": "2018-03-16T21:20:50", "url": "https://files.pythonhosted.org/packages/b3/7d/f92f42e56c621cf098c7f561001dbe8bf1e44b4c496ef8f9968a64207f29/producti_gestio-0.3.0.tar.gz" } ], "0.4.0": [ { "comment_text": "", "digests": { "md5": "c5976e38c40842d4b387ba8500ee016f", "sha256": "c495a759bddd587bbea3c0ecdb8ed49963095c5a0258a700dddea09553e9125b" }, "downloads": -1, "filename": "producti_gestio-0.4.0.tar.gz", "has_sig": false, "md5_digest": "c5976e38c40842d4b387ba8500ee016f", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 9088, "upload_time": "2018-03-18T16:09:40", "url": "https://files.pythonhosted.org/packages/71/c9/b90e20950ca374b17ffc095c6342e033df839b9d4f302d1be69674273170/producti_gestio-0.4.0.tar.gz" } ], "0.4.2": [ { "comment_text": "", "digests": { "md5": "8047f97ae93ba0e22f1c35496ba59177", "sha256": "d48aefe004198e3449ad20ab361f4d53d1bb59f92ec4c31cce83069053c2e718" }, "downloads": -1, "filename": "producti_gestio-0.4.2.tar.gz", "has_sig": false, "md5_digest": "8047f97ae93ba0e22f1c35496ba59177", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 9175, "upload_time": "2018-04-24T14:53:57", "url": "https://files.pythonhosted.org/packages/78/d9/0e3aa80c4b0b97ebc86a0e71db645f37e3df4edcf9a96d8c7209825a33ce/producti_gestio-0.4.2.tar.gz" } ], "0.4.3": [ { "comment_text": "", "digests": { "md5": "578eac4fa733715664e191d066844a41", "sha256": "eaa3a67e7577f7ce7602b6cbbebe80afce11c978216670e4a2d7763dd7b9990f" }, "downloads": -1, "filename": "producti_gestio-0.4.3.tar.gz", "has_sig": false, "md5_digest": "578eac4fa733715664e191d066844a41", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 9175, "upload_time": "2018-04-24T15:00:43", "url": "https://files.pythonhosted.org/packages/6a/88/12a9d8a580e23c5179bd2051c99ad1fe6ab9c8f7c7d86599939032cdf687/producti_gestio-0.4.3.tar.gz" } ], "0.4.4": [ { "comment_text": "", "digests": { "md5": "85db40d0e52b8ac8b05cb82723b0eaeb", "sha256": "ac24a93debf6745b784d5b14b8710972b10eefe9178b74cfe2808a80ed2256be" }, "downloads": -1, "filename": "producti_gestio-0.4.4.tar.gz", "has_sig": false, "md5_digest": "85db40d0e52b8ac8b05cb82723b0eaeb", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 9230, "upload_time": "2018-04-26T16:48:16", "url": "https://files.pythonhosted.org/packages/75/81/51e355e70a94d05c9dec635c65df24fc6a7e80de08c886762b9a042fe779/producti_gestio-0.4.4.tar.gz" } ], "0.5.0": [ { "comment_text": "", "digests": { "md5": "ef60c99e3f2fb77a1b7d3983a5a30e5e", "sha256": "26e67668bd142f98456f55622d3cdef958090e62b00cfb1c69da7836d78b154b" }, "downloads": -1, "filename": "producti_gestio-0.5.0.tar.gz", "has_sig": false, "md5_digest": "ef60c99e3f2fb77a1b7d3983a5a30e5e", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 10595, "upload_time": "2018-05-01T10:52:24", "url": "https://files.pythonhosted.org/packages/98/5d/f22e71f0d91ad36d40b08cb2bae4b2908e25c1aef6712bc22dd5622b0ba8/producti_gestio-0.5.0.tar.gz" } ], "0.6.0": [ { "comment_text": "", "digests": { "md5": "519cb75bb2f8447ce7446c27adc9c1ef", "sha256": "eaacde648e55607df04f82edc1ebcbefd8b8da3b17ed588dbf82abea64d18fbf" }, "downloads": -1, "filename": "producti_gestio-0.6.0.tar.gz", "has_sig": false, "md5_digest": "519cb75bb2f8447ce7446c27adc9c1ef", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 11550, "upload_time": "2018-05-01T18:18:08", "url": "https://files.pythonhosted.org/packages/51/b0/e9ca2090c6f043f8d87c585b299803be94b55b80c9daaa03c177d62ebdd9/producti_gestio-0.6.0.tar.gz" } ], "0.7.0": [ { "comment_text": "", "digests": { "md5": "5dc722891cc591995dd6e11e9c6385a7", "sha256": "b0b0a61c58502db1c96aac7ef8738f63ee7674eb7db71e4e2f23431503e8a424" }, "downloads": -1, "filename": "producti_gestio-0.7.0.tar.gz", "has_sig": false, "md5_digest": "5dc722891cc591995dd6e11e9c6385a7", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 15454, "upload_time": "2018-05-06T14:18:05", "url": "https://files.pythonhosted.org/packages/91/d3/4d0034d9d6c08b3e5127dc09a0dd4e0ed05993924652625a93c28b5abad6/producti_gestio-0.7.0.tar.gz" } ], "0.7.1": [ { "comment_text": "", "digests": { "md5": "875464331eab919e53b3c84fa47ff545", "sha256": "dac9cb0fc50dee66d48f1aa3bed1ec71b51201c6d074616280b4e57d883c941d" }, "downloads": -1, "filename": "producti_gestio-0.7.1-py3-none-any.whl", "has_sig": false, "md5_digest": "875464331eab919e53b3c84fa47ff545", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 35079, "upload_time": "2018-05-29T17:52:09", "url": "https://files.pythonhosted.org/packages/b9/a4/4e6791621e4888931a95b3144f9b42a00aa796a507da21347a7c25d0d0de/producti_gestio-0.7.1-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "2aa85d61850040b3248df1b14db29437", "sha256": "cd5f4d57d6e1566d49a9010e37108f58a5002b8a95047b1b94c478c2cb2cc484" }, "downloads": -1, "filename": "producti_gestio-0.7.1.tar.gz", "has_sig": false, "md5_digest": "2aa85d61850040b3248df1b14db29437", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 18544, "upload_time": "2018-05-29T17:52:10", "url": "https://files.pythonhosted.org/packages/5c/f9/254c7392a1726f628737e7f2c119c3ddd9becb796276f5f2737fe06a56c4/producti_gestio-0.7.1.tar.gz" } ], "0.7.2": [ { "comment_text": "", "digests": { "md5": "974b6932e28855cd479de3035a5c3e96", "sha256": "2fb85f8a847e2faaec362720f7ae2ac0b8244d61e4b28fdace759e766acf3b44" }, "downloads": -1, "filename": "producti_gestio-0.7.2-py3.6.egg", "has_sig": false, "md5_digest": "974b6932e28855cd479de3035a5c3e96", "packagetype": "bdist_egg", "python_version": "3.6", "requires_python": null, "size": 58630, "upload_time": "2018-05-29T19:08:46", "url": "https://files.pythonhosted.org/packages/46/81/bc8ab84bfbbe04bd15c74cfd2dacedec5c95a7b385fc565c30c4f5aab35d/producti_gestio-0.7.2-py3.6.egg" }, { "comment_text": "", "digests": { "md5": "20ba5118c88f90f9c9968b07bc63f3bf", "sha256": "4b0c61bdabdcf84b1ac8a994f40c1d534635b30a49d42b5fb57219d637b3a228" }, "downloads": -1, "filename": "producti_gestio-0.7.2-py3-none-any.whl", "has_sig": false, "md5_digest": "20ba5118c88f90f9c9968b07bc63f3bf", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 34414, "upload_time": "2018-05-29T19:08:43", "url": "https://files.pythonhosted.org/packages/b3/47/1a725348f10295031c11ad1d9558b3f8f65fe90741ae7d016ade36b843f8/producti_gestio-0.7.2-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "10ae28ada11885d435092e3e5a969e70", "sha256": "6e256bdc1639912afa4e682da1017d8475f7fb59da705fc497028330451e4795" }, "downloads": -1, "filename": "producti_gestio-0.7.2.tar.gz", "has_sig": false, "md5_digest": "10ae28ada11885d435092e3e5a969e70", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 18665, "upload_time": "2018-05-29T19:08:48", "url": "https://files.pythonhosted.org/packages/9c/62/858ec491bdfb8da3a16559524091d650135c1e6f424ae2f4509d07515a53/producti_gestio-0.7.2.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "974b6932e28855cd479de3035a5c3e96", "sha256": "2fb85f8a847e2faaec362720f7ae2ac0b8244d61e4b28fdace759e766acf3b44" }, "downloads": -1, "filename": "producti_gestio-0.7.2-py3.6.egg", "has_sig": false, "md5_digest": "974b6932e28855cd479de3035a5c3e96", "packagetype": "bdist_egg", "python_version": "3.6", "requires_python": null, "size": 58630, "upload_time": "2018-05-29T19:08:46", "url": "https://files.pythonhosted.org/packages/46/81/bc8ab84bfbbe04bd15c74cfd2dacedec5c95a7b385fc565c30c4f5aab35d/producti_gestio-0.7.2-py3.6.egg" }, { "comment_text": "", "digests": { "md5": "20ba5118c88f90f9c9968b07bc63f3bf", "sha256": "4b0c61bdabdcf84b1ac8a994f40c1d534635b30a49d42b5fb57219d637b3a228" }, "downloads": -1, "filename": "producti_gestio-0.7.2-py3-none-any.whl", "has_sig": false, "md5_digest": "20ba5118c88f90f9c9968b07bc63f3bf", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 34414, "upload_time": "2018-05-29T19:08:43", "url": "https://files.pythonhosted.org/packages/b3/47/1a725348f10295031c11ad1d9558b3f8f65fe90741ae7d016ade36b843f8/producti_gestio-0.7.2-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "10ae28ada11885d435092e3e5a969e70", "sha256": "6e256bdc1639912afa4e682da1017d8475f7fb59da705fc497028330451e4795" }, "downloads": -1, "filename": "producti_gestio-0.7.2.tar.gz", "has_sig": false, "md5_digest": "10ae28ada11885d435092e3e5a969e70", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 18665, "upload_time": "2018-05-29T19:08:48", "url": "https://files.pythonhosted.org/packages/9c/62/858ec491bdfb8da3a16559524091d650135c1e6f424ae2f4509d07515a53/producti_gestio-0.7.2.tar.gz" } ] }