# Cookidoo API
[](https://pypi.org/p/cookidoo-api)
An unofficial python package to access Cookidoo.
[](https://github.com/miaucl/cookidoo-api/actions/workflows/unit-tests.yaml)
[](https://github.com/miaucl/cookidoo-api/actions/workflows/smoke-test.yaml)
[](https://codecov.io/gh/miaucl/cookidoo-api)
[](https://github.com/miaucl/cookidoo-api/actions/workflows/ruff.yml)
[](https://github.com/miaucl/cookidoo-api/actions/workflows/mypy.yaml)
[](https://github.com/miaucl/cookidoo-api/actions/workflows/markdownlint.yml)
[](https://github.com/sponsors/miaucl)
[](https://patreon.com/miaucl)
[](https://buymeacoffee.com/miaucl)
[](https://paypal.me/sponsormiaucl)
## Disclaimer
The developers of this module are in no way endorsed by or affiliated with Cookidoo or Vorwerk, or any associated subsidiaries, logos or trademarks.
## Installation
`pip install cookidoo-api`
## Documentation
See below for usage examples.
## Usage Example
The API is based on the `aiohttp` library.
Make sure to have stored your credentials in the top-level file `.env` as such, to loaded by `dotenv`. Alternatively, provide the environment variables by any other `dotenv` compatible means.
```text
EMAIL=your@mail.com
PASSWORD=password
```
Run the [example script](https://github.com/miaucl/cookidoo-api/blob/master/example.py) and have a look at the inline comments for more explanation.
## Exceptions
In case something goes wrong during a request, several [exceptions](https://github.com/miaucl/cookidoo/blob/master/cookidoo_api/exceptions.py) can be thrown, all inheriting from `CookidooException`.
### Another asyncio event loop is
With the async calls, you might encounter an error that another asyncio event loop is already running on the same thread. This is expected behavior according to the asyncio.run() [documentation](https://docs.python.org/3/library/asyncio-runner.html#asyncio.run). You cannot use more than one aiohttp session per thread, reuse the existing one!
### Exception ignored: RuntimeError: Event loop is closed
Due to a known issue in some versions of aiohttp when using Windows, you might encounter a similar error to this:
```python
Exception ignored in: <function _ProactorBasePipeTransport.__del__ at 0x00000000>
Traceback (most recent call last):
File "C:\...\py38\lib\asyncio\proactor_events.py", line 116, in __del__
self.close()
File "C:\...\py38\lib\asyncio\proactor_events.py", line 108, in close
self._loop.call_soon(self._call_connection_lost, None)
File "C:\...\py38\lib\asyncio\base_events.py", line 719, in call_soon
self._check_closed()
File "C:\...\py38\lib\asyncio\base_events.py", line 508, in _check_closed
raise RuntimeError('Event loop is closed')
RuntimeError: Event loop is closed
```
You can fix this according to [this](https://stackoverflow.com/questions/68123296/asyncio-throws-runtime-error-with-exception-ignored) StackOverflow answer by adding the following line of code before executing the library:
```python
asyncio.set_event_loop_policy(asyncio.WindowsSelectorEventLoopPolicy())
```
## Dev
Setup the dev environment using VSCode, it is highly recommended.
```bash
python -m venv .venv
source .venv/bin/activate
pip install -r requirements_dev.txt
```
Install [pre-commit](https://pre-commit.com)
```bash
pre-commit install
# Run the commit hooks manually
pre-commit run --all-files
```
Following VSCode integrations may be helpful:
- [ruff](https://marketplace.visualstudio.com/items?itemName=charliermarsh.ruff)
- [mypy](https://marketplace.visualstudio.com/items?itemName=matangover.mypy)
- [markdownlint](https://marketplace.visualstudio.com/items?itemName=DavidAnson.vscode-markdownlint)
### Raw API Requests
The raw requests intercepted between the Cookidoo Android App and the backend can be found here `./docs/raw-api-requests`. They have been used to reconstruct the API which is implemented in this library.
### Releasing
A _final version_ can only be released from the `master` branch. To pass the gates of the `publish` workflow, the version must match in both the `tag` and `cookidoo_api/__init__.py`.
release a prerelease version, it must be done from a feature branch (**not** `master`). Prerelease versions are explicitly marked as such on the GitHub release page.
Raw data
{
"_id": null,
"home_page": null,
"name": "cookidoo-api",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.12",
"maintainer_email": null,
"keywords": "cookidoo, todo, home-assistant, iot",
"author": null,
"author_email": "Cyrill Raccaud <cyrill.raccaud+pypi@gmail.com>",
"download_url": "https://files.pythonhosted.org/packages/96/69/2760a0a6d719abc618e0e29c39b5fadbfaab7eb8f0e643c30000da0a53e0/cookidoo_api-0.12.3.tar.gz",
"platform": null,
"description": "# Cookidoo API\n\n[](https://pypi.org/p/cookidoo-api)\n\nAn unofficial python package to access Cookidoo.\n\n[](https://github.com/miaucl/cookidoo-api/actions/workflows/unit-tests.yaml)\n[](https://github.com/miaucl/cookidoo-api/actions/workflows/smoke-test.yaml)\n[](https://codecov.io/gh/miaucl/cookidoo-api)\n[](https://github.com/miaucl/cookidoo-api/actions/workflows/ruff.yml)\n[](https://github.com/miaucl/cookidoo-api/actions/workflows/mypy.yaml)\n[](https://github.com/miaucl/cookidoo-api/actions/workflows/markdownlint.yml)\n\n[](https://github.com/sponsors/miaucl)\n[](https://patreon.com/miaucl)\n[](https://buymeacoffee.com/miaucl)\n[](https://paypal.me/sponsormiaucl)\n\n## Disclaimer\n\nThe developers of this module are in no way endorsed by or affiliated with Cookidoo or Vorwerk, or any associated subsidiaries, logos or trademarks.\n\n## Installation\n\n`pip install cookidoo-api`\n\n## Documentation\n\nSee below for usage examples.\n\n## Usage Example\n\nThe API is based on the `aiohttp` library.\n\nMake sure to have stored your credentials in the top-level file `.env` as such, to loaded by `dotenv`. Alternatively, provide the environment variables by any other `dotenv` compatible means.\n\n```text\nEMAIL=your@mail.com\nPASSWORD=password\n```\n\nRun the [example script](https://github.com/miaucl/cookidoo-api/blob/master/example.py) and have a look at the inline comments for more explanation.\n\n## Exceptions\n\nIn case something goes wrong during a request, several [exceptions](https://github.com/miaucl/cookidoo/blob/master/cookidoo_api/exceptions.py) can be thrown, all inheriting from `CookidooException`.\n\n### Another asyncio event loop is\n\nWith the async calls, you might encounter an error that another asyncio event loop is already running on the same thread. This is expected behavior according to the asyncio.run() [documentation](https://docs.python.org/3/library/asyncio-runner.html#asyncio.run). You cannot use more than one aiohttp session per thread, reuse the existing one!\n\n### Exception ignored: RuntimeError: Event loop is closed\n\nDue to a known issue in some versions of aiohttp when using Windows, you might encounter a similar error to this:\n\n```python\nException ignored in: <function _ProactorBasePipeTransport.__del__ at 0x00000000>\nTraceback (most recent call last):\n File \"C:\\...\\py38\\lib\\asyncio\\proactor_events.py\", line 116, in __del__\n self.close()\n File \"C:\\...\\py38\\lib\\asyncio\\proactor_events.py\", line 108, in close\n self._loop.call_soon(self._call_connection_lost, None)\n File \"C:\\...\\py38\\lib\\asyncio\\base_events.py\", line 719, in call_soon\n self._check_closed()\n File \"C:\\...\\py38\\lib\\asyncio\\base_events.py\", line 508, in _check_closed\n raise RuntimeError('Event loop is closed')\nRuntimeError: Event loop is closed\n```\n\nYou can fix this according to [this](https://stackoverflow.com/questions/68123296/asyncio-throws-runtime-error-with-exception-ignored) StackOverflow answer by adding the following line of code before executing the library:\n\n```python\nasyncio.set_event_loop_policy(asyncio.WindowsSelectorEventLoopPolicy())\n```\n\n## Dev\n\nSetup the dev environment using VSCode, it is highly recommended.\n\n```bash\npython -m venv .venv\nsource .venv/bin/activate\npip install -r requirements_dev.txt\n```\n\nInstall [pre-commit](https://pre-commit.com)\n\n```bash\npre-commit install\n\n# Run the commit hooks manually\npre-commit run --all-files\n```\n\nFollowing VSCode integrations may be helpful:\n\n- [ruff](https://marketplace.visualstudio.com/items?itemName=charliermarsh.ruff)\n- [mypy](https://marketplace.visualstudio.com/items?itemName=matangover.mypy)\n- [markdownlint](https://marketplace.visualstudio.com/items?itemName=DavidAnson.vscode-markdownlint)\n\n### Raw API Requests\n\nThe raw requests intercepted between the Cookidoo Android App and the backend can be found here `./docs/raw-api-requests`. They have been used to reconstruct the API which is implemented in this library.\n\n### Releasing\n\nA _final version_ can only be released from the `master` branch. To pass the gates of the `publish` workflow, the version must match in both the `tag` and `cookidoo_api/__init__.py`.\n\nrelease a prerelease version, it must be done from a feature branch (**not** `master`). Prerelease versions are explicitly marked as such on the GitHub release page.\n",
"bugtrack_url": null,
"license": "MIT License",
"summary": "Unofficial package to access Cookidoo.",
"version": "0.12.3",
"project_urls": {
"Documentation": "https://miaucl.github.io/cookidoo-api/",
"Issues": "https://github.com/miaucl/cookidoo-api/issues",
"Release notes": "https://github.com/miaucl/cookidoo-api/releases",
"Source": "https://github.com/miaucl/cookidoo-api"
},
"split_keywords": [
"cookidoo",
" todo",
" home-assistant",
" iot"
],
"urls": [
{
"comment_text": null,
"digests": {
"blake2b_256": "338404f2a492a3c781111643e6cb36f04860fe61df720b3390fa8c61b4376c40",
"md5": "6a564003152b2f7b6c66529c6491a79d",
"sha256": "e1efb0b7602b559d1c0ab5c3adc112ac7eb8a4541d8b85700d5d78beb4e68674"
},
"downloads": -1,
"filename": "cookidoo_api-0.12.3-py3-none-any.whl",
"has_sig": false,
"md5_digest": "6a564003152b2f7b6c66529c6491a79d",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.12",
"size": 18661,
"upload_time": "2025-02-05T21:42:37",
"upload_time_iso_8601": "2025-02-05T21:42:37.760997Z",
"url": "https://files.pythonhosted.org/packages/33/84/04f2a492a3c781111643e6cb36f04860fe61df720b3390fa8c61b4376c40/cookidoo_api-0.12.3-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": null,
"digests": {
"blake2b_256": "96692760a0a6d719abc618e0e29c39b5fadbfaab7eb8f0e643c30000da0a53e0",
"md5": "52548c2804e03cebadc749c4686ab9fa",
"sha256": "9a5280f263c9baa0150b5826f29c597194c54560182cb44971858aef9d5f96b5"
},
"downloads": -1,
"filename": "cookidoo_api-0.12.3.tar.gz",
"has_sig": false,
"md5_digest": "52548c2804e03cebadc749c4686ab9fa",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.12",
"size": 27423,
"upload_time": "2025-02-05T21:42:40",
"upload_time_iso_8601": "2025-02-05T21:42:40.907481Z",
"url": "https://files.pythonhosted.org/packages/96/69/2760a0a6d719abc618e0e29c39b5fadbfaab7eb8f0e643c30000da0a53e0/cookidoo_api-0.12.3.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2025-02-05 21:42:40",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "miaucl",
"github_project": "cookidoo-api",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"requirements": [
{
"name": "aiohttp",
"specs": [
[
"~=",
"3.11"
]
]
},
{
"name": "aiofiles",
"specs": [
[
"~=",
"24.1.0"
]
]
}
],
"lcname": "cookidoo-api"
}