murloc


Namemurloc JSON
Version 0.0.7 PyPI version JSON
download
home_page
SummaryExtensible API server
upload_time2023-07-12 02:38:14
maintainer
docs_urlNone
authorChris Varga
requires_python
license
keywords extensible api server
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            
Murloc is an extensible API server.

To define API methods, use the `route` decorator like so:

```python
# main.py
from murloc import Murloc

app = Murloc()

@app.route("/hello")
def hello_world():
    return "hello, world!"

@app.route("/echo")
def echo_data(data):
    return data
```

You can also specify `methods` directly as a `dict()` during Murloc initialization:

```python
# main.py
from murloc import Murloc

def hello_world():
    return "hello, world!"

def echo_data(data):
    return data

app = Murloc(methods={"/hello": hello_world, "/echo": echo_data})
```

Run the murloc server with uvicorn like so:

```bash
$ uvicorn main:app
```

Or, with gunicorn (must support ASGI) like so:

```bash
$ gunicorn main:app --worker-class uvicorn.workers.UvicornWorker
```

> Note: These examples assume main.py and the Murloc variable `app`.

            

Raw data

            {
    "_id": null,
    "home_page": "",
    "name": "murloc",
    "maintainer": "",
    "docs_url": null,
    "requires_python": "",
    "maintainer_email": "",
    "keywords": "extensible api server",
    "author": "Chris Varga",
    "author_email": "",
    "download_url": "https://files.pythonhosted.org/packages/c1/a0/ff211cbe7a4d643d3c9baa8b960ec97f03f80da1d6c00cd3d7dc56225816/murloc-0.0.7.tar.gz",
    "platform": null,
    "description": "\nMurloc is an extensible API server.\n\nTo define API methods, use the `route` decorator like so:\n\n```python\n# main.py\nfrom murloc import Murloc\n\napp = Murloc()\n\n@app.route(\"/hello\")\ndef hello_world():\n    return \"hello, world!\"\n\n@app.route(\"/echo\")\ndef echo_data(data):\n    return data\n```\n\nYou can also specify `methods` directly as a `dict()` during Murloc initialization:\n\n```python\n# main.py\nfrom murloc import Murloc\n\ndef hello_world():\n    return \"hello, world!\"\n\ndef echo_data(data):\n    return data\n\napp = Murloc(methods={\"/hello\": hello_world, \"/echo\": echo_data})\n```\n\nRun the murloc server with uvicorn like so:\n\n```bash\n$ uvicorn main:app\n```\n\nOr, with gunicorn (must support ASGI) like so:\n\n```bash\n$ gunicorn main:app --worker-class uvicorn.workers.UvicornWorker\n```\n\n> Note: These examples assume main.py and the Murloc variable `app`.\n",
    "bugtrack_url": null,
    "license": "",
    "summary": "Extensible API server",
    "version": "0.0.7",
    "project_urls": null,
    "split_keywords": [
        "extensible",
        "api",
        "server"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "3e2fe1afc336f31023dc5696e7c39a272f5ce054987384dc58829006c24dc2b1",
                "md5": "3d10cc6d94f5b401649fceb0c72d79e6",
                "sha256": "234162e68c6351f751fa4e06bdb989e9dc327df874525c07767b0c41c4184b27"
            },
            "downloads": -1,
            "filename": "murloc-0.0.7-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "3d10cc6d94f5b401649fceb0c72d79e6",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": null,
            "size": 4323,
            "upload_time": "2023-07-12T02:38:12",
            "upload_time_iso_8601": "2023-07-12T02:38:12.427670Z",
            "url": "https://files.pythonhosted.org/packages/3e/2f/e1afc336f31023dc5696e7c39a272f5ce054987384dc58829006c24dc2b1/murloc-0.0.7-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "c1a0ff211cbe7a4d643d3c9baa8b960ec97f03f80da1d6c00cd3d7dc56225816",
                "md5": "ade49612ec5374ef1e59d85e0bc8645b",
                "sha256": "ff147ae2edcd75fa01ffab0e8a00604cc8357de0d8cbfea4e5796c155f6febd5"
            },
            "downloads": -1,
            "filename": "murloc-0.0.7.tar.gz",
            "has_sig": false,
            "md5_digest": "ade49612ec5374ef1e59d85e0bc8645b",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": null,
            "size": 4261,
            "upload_time": "2023-07-12T02:38:14",
            "upload_time_iso_8601": "2023-07-12T02:38:14.482806Z",
            "url": "https://files.pythonhosted.org/packages/c1/a0/ff211cbe7a4d643d3c9baa8b960ec97f03f80da1d6c00cd3d7dc56225816/murloc-0.0.7.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-07-12 02:38:14",
    "github": false,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "lcname": "murloc"
}
        
Elapsed time: 0.08660s