mealieapi


Namemealieapi JSON
Version 0.0.1 PyPI version JSON
download
home_pagehttps://github.com/GrandMoff100/MealieAPI
SummaryControl your Mealie instance with python!
upload_time2022-12-20 17:55:06
maintainerGrandMoff100
docs_urlNone
authorGrandMoff100
requires_python>=3.7,<4.0
licenseGPL-3.0-or-later
keywords
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            ![mealie-image](https://hay-kot.github.io/mealie/assets/img/home_screenshot.png)

# Mealie API
If you are running a self-hosted [Mealie](https://hay-kot.github.io/mealie/) server you can use this library to authenticate yourself with and intereact with it!
Create mealplans, import recipes, remove users, modify user groups, upload recipe images.
All with MealieAPI.

## Installation

```bash
$ pip install mealieapi
```

## Usage


### Authentication
To start you need your Mealie server url, and your login credentials or an API key (which you can create at `https://[YOUR_MEALIE_SERVER]/admin/profile`).
MealieAPI uses the `async`/`await` syntax so you must run it inside an async function or event loop like so (if you are not familiar with async applications already.)


```py
import asyncio
from mealieapi import MealieClient


client = MealieClient("<YOUR_MEALIE_SERVER_ADDRESS>")
```
This next part depends on whether you have an API key, or your login credentials.

If you want to use your username and password you must use `await client.login("<USERNAME_OR_EMAIL>", "<PASSWORD>")` or if you are using an API key you need to use `client.authorize("<API_KEY>")` (Note: without the await).

```py
async def main():
    await client.login("<USERNAME_OR_EMAIL>", "<PASSWORD>")
    # OR
    client.authorize("<API_KEY>")

loop = asyncio.get_event_loop()
loop.run_until_complete(main())
```

## Docs

A work in progress.

## Contributions

All contributions are welcome! Thats what makes Open-Source so special.

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/GrandMoff100/MealieAPI",
    "name": "mealieapi",
    "maintainer": "GrandMoff100",
    "docs_url": null,
    "requires_python": ">=3.7,<4.0",
    "maintainer_email": "nlarsen23.student@gmail.com",
    "keywords": "",
    "author": "GrandMoff100",
    "author_email": "nlarsen23.student@gmail.com",
    "download_url": "https://files.pythonhosted.org/packages/b5/9f/617384a5d5a437d3074535b4f0d7255748e89bd72bdbe11a8d6bfa013e6a/mealieapi-0.0.1.tar.gz",
    "platform": null,
    "description": "![mealie-image](https://hay-kot.github.io/mealie/assets/img/home_screenshot.png)\n\n# Mealie API\nIf you are running a self-hosted [Mealie](https://hay-kot.github.io/mealie/) server you can use this library to authenticate yourself with and intereact with it!\nCreate mealplans, import recipes, remove users, modify user groups, upload recipe images.\nAll with MealieAPI.\n\n## Installation\n\n```bash\n$ pip install mealieapi\n```\n\n## Usage\n\n\n### Authentication\nTo start you need your Mealie server url, and your login credentials or an API key (which you can create at `https://[YOUR_MEALIE_SERVER]/admin/profile`).\nMealieAPI uses the `async`/`await` syntax so you must run it inside an async function or event loop like so (if you are not familiar with async applications already.)\n\n\n```py\nimport asyncio\nfrom mealieapi import MealieClient\n\n\nclient = MealieClient(\"<YOUR_MEALIE_SERVER_ADDRESS>\")\n```\nThis next part depends on whether you have an API key, or your login credentials.\n\nIf you want to use your username and password you must use `await client.login(\"<USERNAME_OR_EMAIL>\", \"<PASSWORD>\")` or if you are using an API key you need to use `client.authorize(\"<API_KEY>\")` (Note: without the await).\n\n```py\nasync def main():\n    await client.login(\"<USERNAME_OR_EMAIL>\", \"<PASSWORD>\")\n    # OR\n    client.authorize(\"<API_KEY>\")\n\nloop = asyncio.get_event_loop()\nloop.run_until_complete(main())\n```\n\n## Docs\n\nA work in progress.\n\n## Contributions\n\nAll contributions are welcome! Thats what makes Open-Source so special.\n",
    "bugtrack_url": null,
    "license": "GPL-3.0-or-later",
    "summary": "Control your Mealie instance with python!",
    "version": "0.0.1",
    "split_keywords": [],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "md5": "2ba5b113af7415b48e44977e844ea871",
                "sha256": "36d12d1917662cd3ba1c09189a3965ee24ca520fae037510c624137389a8eb5b"
            },
            "downloads": -1,
            "filename": "mealieapi-0.0.1-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "2ba5b113af7415b48e44977e844ea871",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.7,<4.0",
            "size": 26155,
            "upload_time": "2022-12-20T17:55:05",
            "upload_time_iso_8601": "2022-12-20T17:55:05.085036Z",
            "url": "https://files.pythonhosted.org/packages/3e/bb/792bb610b4656805fa6ae84ef0077493d522330c61e2a87e394749a55c03/mealieapi-0.0.1-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "md5": "b561a591b6f8f71fb361dac4d997a3a8",
                "sha256": "92b8ebc216fd018e4e795bee0da93ef6bd82ec9a9ee71d359b69fa378a727d09"
            },
            "downloads": -1,
            "filename": "mealieapi-0.0.1.tar.gz",
            "has_sig": false,
            "md5_digest": "b561a591b6f8f71fb361dac4d997a3a8",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.7,<4.0",
            "size": 23519,
            "upload_time": "2022-12-20T17:55:06",
            "upload_time_iso_8601": "2022-12-20T17:55:06.729689Z",
            "url": "https://files.pythonhosted.org/packages/b5/9f/617384a5d5a437d3074535b4f0d7255748e89bd72bdbe11a8d6bfa013e6a/mealieapi-0.0.1.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2022-12-20 17:55:06",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "github_user": "GrandMoff100",
    "github_project": "MealieAPI",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "tox": true,
    "lcname": "mealieapi"
}
        
Elapsed time: 0.03994s