murloc


Namemurloc JSON
Version 0.1.1 PyPI version JSON
download
home_pageNone
SummaryExtensible API server
upload_time2024-09-13 18:17:00
maintainerNone
docs_urlNone
authorChris Varga
requires_pythonNone
licenseNone
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
```

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

            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "murloc",
    "maintainer": null,
    "docs_url": null,
    "requires_python": null,
    "maintainer_email": null,
    "keywords": "extensible api server",
    "author": "Chris Varga",
    "author_email": null,
    "download_url": "https://files.pythonhosted.org/packages/72/2c/679a9e0dc86008eb2e0c7880ffe7edf5af9e2b1976e94c0bfb992d42e4fc/murloc-0.1.1.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\n> Note: These examples assume main.py and the Murloc variable `app`.\n",
    "bugtrack_url": null,
    "license": null,
    "summary": "Extensible API server",
    "version": "0.1.1",
    "project_urls": null,
    "split_keywords": [
        "extensible",
        "api",
        "server"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "f7349c849d04f8322f4e606bb20162f858818ce52e1e81de7e7028978277189f",
                "md5": "2cc3b8eb46c29e06fd66547226a07d0e",
                "sha256": "e5f08a09248c174b519806dcb2379b8aefb6df0091a2a6117691df113209c6bd"
            },
            "downloads": -1,
            "filename": "murloc-0.1.1-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "2cc3b8eb46c29e06fd66547226a07d0e",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": null,
            "size": 4276,
            "upload_time": "2024-09-13T18:16:59",
            "upload_time_iso_8601": "2024-09-13T18:16:59.153118Z",
            "url": "https://files.pythonhosted.org/packages/f7/34/9c849d04f8322f4e606bb20162f858818ce52e1e81de7e7028978277189f/murloc-0.1.1-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "722c679a9e0dc86008eb2e0c7880ffe7edf5af9e2b1976e94c0bfb992d42e4fc",
                "md5": "8fafa521dd200419072e8420b0277845",
                "sha256": "e911942c10d0b48379e52c6af0ddbdcfdf9935be31cb73d5be1213959c8b40bf"
            },
            "downloads": -1,
            "filename": "murloc-0.1.1.tar.gz",
            "has_sig": false,
            "md5_digest": "8fafa521dd200419072e8420b0277845",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": null,
            "size": 3057,
            "upload_time": "2024-09-13T18:17:00",
            "upload_time_iso_8601": "2024-09-13T18:17:00.230358Z",
            "url": "https://files.pythonhosted.org/packages/72/2c/679a9e0dc86008eb2e0c7880ffe7edf5af9e2b1976e94c0bfb992d42e4fc/murloc-0.1.1.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-09-13 18:17:00",
    "github": false,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "lcname": "murloc"
}
        
Elapsed time: 0.46887s