{"id":27757,"library":"fyta-cli","title":"FYTA CLI Library","description":"Python library to access the FYTA API for plant monitoring. Current version 0.7.2, weekly release cadence.","status":"active","version":"0.7.2","language":"python","source_language":"en","source_url":"https://github.com/dontinelli/fyta_cli","tags":["fyta","plant-monitoring","api-wrapper","async"],"install":[{"cmd":"pip install fyta-cli","lang":"bash","label":"stable"}],"dependencies":[],"imports":[{"note":"Fyta class is inside fyta_cli package, not top-level","wrong":"from fyta import Fyta","symbol":"Fyta","correct":"from fyta_cli.fyta import Fyta"},{"note":"Correct import path","symbol":"FytaConnector","correct":"from fyta_cli.fyta_connector import FytaConnector"}],"quickstart":{"code":"import asyncio\nfrom fyta_cli.fyta import Fyta\n\nasync def main():\n    fyta = Fyta(email='your_email@example.com', password='your_password')\n    await fyta.login()\n    plants = await fyta.get_all_plants()\n    print(plants)\n\nasyncio.run(main())","lang":"python","description":"Initialize Fyta with email and password, login, and fetch plant data."},"warnings":[{"fix":"Wrap code in async functions and use await on all Fyta methods.","message":"Version 0.7.x changed the login method from synchronous to asynchronous; all API calls now require async/await.","severity":"breaking","affected_versions":">=0.7.0"},{"fix":"Use `from fyta_cli.fyta import Fyta`.","message":"The package name on PyPI is 'fyta-cli' but the module import path is 'fyta_cli' (underscore).","severity":"gotcha","affected_versions":"all"},{"fix":"Store credentials in environment variables and load them into the Fyta constructor.","message":"Credentials handling: The library does not support environment variables natively; you must pass email and password directly or implement your own config.","severity":"gotcha","affected_versions":"all"}],"env_vars":null,"last_verified":"2026-05-09T00:00:00.000Z","next_check":"2026-08-07T00:00:00.000Z","problems":[{"fix":"Install using pip install fyta-cli and use `from fyta_cli.fyta import Fyta`.","cause":"Package is installed as 'fyta-cli' but import path is 'fyta_cli'.","error":"ModuleNotFoundError: No module named 'fyta_cli'"},{"fix":"Use `from fyta_cli.fyta import Fyta`.","cause":"Trying to import Fyta from top-level module instead of submodule.","error":"AttributeError: module 'fyta_cli' has no attribute 'Fyta'"},{"fix":"Use `await main()` in Jupyter or notebook environment.","cause":"Calling asyncio.run() inside an async context (e.g., Jupyter notebook).","error":"RuntimeError: asyncio.run() cannot be called from a running event loop"}],"ecosystem":"pypi","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}