diff --git a/README.md b/README.md index 9c3af64..69997af 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,83 @@ # Python Solar Plus Intelbras +[![Python package](https://github.com/hudsonbrendon/python-solar-plus-intelbras/actions/workflows/pythonpackage.yml/badge.svg?branch=main)](https://github.com/hudsonbrendon/python-solar-plus-intelbras/actions/workflows/pythonpackage.yml) +[![Upload Python Package](https://github.com/hudsonbrendon/python-solar-plus-intelbras/actions/workflows/python-publish.yml/badge.svg)](https://github.com/hudsonbrendon/python-solar-plus-intelbras/actions/workflows/python-publish.yml) +[![Dependabot Updates](https://github.com/hudsonbrendon/python-solar-plus-intelbras/actions/workflows/dependabot/dependabot-updates/badge.svg?branch=main)](https://github.com/hudsonbrendon/python-solar-plus-intelbras/actions/workflows/dependabot/dependabot-updates) +[![pages-build-deployment](https://github.com/hudsonbrendon/python-solar-plus-intelbras/actions/workflows/pages/pages-build-deployment/badge.svg)](https://github.com/hudsonbrendon/python-solar-plus-intelbras/actions/workflows/pages/pages-build-deployment) + A wrapper for api solar plus intelbras + + +[![Solar Plus Intelbras](https://solarplus.intelbras.com.br/assets/Intelbras_solar_branco.c8061084.png)](https://hudsonbrendon.github.io/python-solar-plus-intelbras/) + + +Install using pip: + + +```shell +pip install solar_plus_intelbras +``` + +Now, let's get started: + + +```pycon +>>> from solar_plus_intelbras import SolarPlusIntelbras +>>> solar_plus_intelbras = SolarPlusIntelbras(email="test@email.com", plus="i2gH3zuE68ClMDop50h8OxKlOYjvWd0vCDACBtN9sEo") +>>> solar_plus_intelbras.records(plant_id=12345, period="day", key="energy_today", start_date="2025-01-01", end_date="2025-01-01") +``` + +## Features + +Python Solar Plus Intelbras supports the main endpoints of the Intelbras API: + +- Plants: return the list of plants of account; +- Records: return the records of especific range; +- Inverters: return the inverters of account; +- Alerts: return the alerts of account; +- Notifications: return the notifications of account. + +## Documentation + +Project documentation is available at [https://hudsonbrendon.github.io/python-solar-plus-intelbras//](https://hudsonbrendon.github.io/python-solar-plus-intelbras/). + +## Contribute + +If you want to contribute with Python Solar Plus Intelbras check out the Contributing Guide to learn how to start. + +```shell +$ git clone git@github.com:hudsonbrendon/python-solar-plus-intelbras.git +``` + +```shell +$ cd python-solar-plus-intelbras +``` + +```shell +$ poetry install +``` + +### Run tests + +```shell +$ pytest +``` +Or running via vscode interface. + +## Dependencies + +The Python Solar Plus project relies on these excellent libraries: + +- poetry - A manager for virtualenvs and dependencies; +- requests - A client for http requests; +- pytest - The best lib python for tests; +- python 3 - support for python >= 3.8. + +
+ +`python solar plus intelbras` is made with 💙 by the [@hudsonbrendon](https://github.com/hudsonbrendon) and distributed under [MIT License](LICENSE.md). + + + + +
diff --git a/docs/index.md b/docs/index.md index 000ea34..93a670c 100644 --- a/docs/index.md +++ b/docs/index.md @@ -1,17 +1,3 @@ -# Welcome to MkDocs +# Documentation -For full documentation visit [mkdocs.org](https://www.mkdocs.org). - -## Commands - -* `mkdocs new [dir-name]` - Create a new project. -* `mkdocs serve` - Start the live-reloading docs server. -* `mkdocs build` - Build the documentation site. -* `mkdocs -h` - Print help message and exit. - -## Project layout - - mkdocs.yml # The configuration file. - docs/ - index.md # The documentation homepage. - ... # Other markdown pages, images and other files. +::: solar_plus_intelbras.solar_plus_intelbras diff --git a/mkdocs.yml b/mkdocs.yml index 4d46abd..f7c9246 100644 --- a/mkdocs.yml +++ b/mkdocs.yml @@ -23,6 +23,10 @@ markdown_extensions: - pymdownx.tabbed - pymdownx.snippets - plugins: -- search + - search + - mkdocstrings: + handlers: + python: + options: + show_source: true # Para ocultar os links do código-fonte diff --git a/poetry.lock b/poetry.lock index 10a3457..1303654 100644 --- a/poetry.lock +++ b/poetry.lock @@ -332,6 +332,21 @@ python-dateutil = ">=2.8.1" [package.extras] dev = ["flake8", "markdown", "twine", "wheel"] +[[package]] +name = "griffe" +version = "1.5.6" +description = "Signatures for entire Python programs. Extract the structure, the frame, the skeleton of your project, to generate API documentation or find breaking changes in your API." +optional = false +python-versions = ">=3.9" +groups = ["dev"] +files = [ + {file = "griffe-1.5.6-py3-none-any.whl", hash = "sha256:b2a3afe497c6c1f952e54a23095ecc09435016293e77af8478ed65df1022a394"}, + {file = "griffe-1.5.6.tar.gz", hash = "sha256:181f6666d5aceb6cd6e2da5a2b646cfb431e47a0da1fda283845734b67e10944"}, +] + +[package.dependencies] +colorama = ">=0.4" + [[package]] name = "identify" version = "2.5.35" @@ -522,6 +537,23 @@ watchdog = ">=2.0" i18n = ["babel (>=2.9.0)"] min-versions = ["babel (==2.9.0)", "click (==7.0)", "colorama (==0.4)", "ghp-import (==1.0)", "importlib-metadata (==4.4)", "jinja2 (==2.11.1)", "markdown (==3.3.6)", "markupsafe (==2.0.1)", "mergedeep (==1.3.4)", "mkdocs-get-deps (==0.2.0)", "packaging (==20.5)", "pathspec (==0.11.1)", "pyyaml (==5.1)", "pyyaml-env-tag (==0.1)", "watchdog (==2.0)"] +[[package]] +name = "mkdocs-autorefs" +version = "1.3.0" +description = "Automatically link across pages in MkDocs." +optional = false +python-versions = ">=3.9" +groups = ["dev"] +files = [ + {file = "mkdocs_autorefs-1.3.0-py3-none-any.whl", hash = "sha256:d180f9778a04e78b7134e31418f238bba56f56d6a8af97873946ff661befffb3"}, + {file = "mkdocs_autorefs-1.3.0.tar.gz", hash = "sha256:6867764c099ace9025d6ac24fd07b85a98335fbd30107ef01053697c8f46db61"}, +] + +[package.dependencies] +Markdown = ">=3.3" +markupsafe = ">=2.0.1" +mkdocs = ">=1.1" + [[package]] name = "mkdocs-get-deps" version = "0.2.0" @@ -581,6 +613,50 @@ files = [ {file = "mkdocs_material_extensions-1.3.1.tar.gz", hash = "sha256:10c9511cea88f568257f960358a467d12b970e1f7b2c0e5fb2bb48cab1928443"}, ] +[[package]] +name = "mkdocstrings" +version = "0.27.0" +description = "Automatic documentation from sources, for MkDocs." +optional = false +python-versions = ">=3.9" +groups = ["dev"] +files = [ + {file = "mkdocstrings-0.27.0-py3-none-any.whl", hash = "sha256:6ceaa7ea830770959b55a16203ac63da24badd71325b96af950e59fd37366332"}, + {file = "mkdocstrings-0.27.0.tar.gz", hash = "sha256:16adca6d6b0a1f9e0c07ff0b02ced8e16f228a9d65a37c063ec4c14d7b76a657"}, +] + +[package.dependencies] +click = ">=7.0" +Jinja2 = ">=2.11.1" +Markdown = ">=3.6" +MarkupSafe = ">=1.1" +mkdocs = ">=1.4" +mkdocs-autorefs = ">=1.2" +platformdirs = ">=2.2" +pymdown-extensions = ">=6.3" + +[package.extras] +crystal = ["mkdocstrings-crystal (>=0.3.4)"] +python = ["mkdocstrings-python (>=0.5.2)"] +python-legacy = ["mkdocstrings-python-legacy (>=0.2.1)"] + +[[package]] +name = "mkdocstrings-python" +version = "1.13.0" +description = "A Python handler for mkdocstrings." +optional = false +python-versions = ">=3.9" +groups = ["dev"] +files = [ + {file = "mkdocstrings_python-1.13.0-py3-none-any.whl", hash = "sha256:b88bbb207bab4086434743849f8e796788b373bd32e7bfefbf8560ac45d88f97"}, + {file = "mkdocstrings_python-1.13.0.tar.gz", hash = "sha256:2dbd5757e8375b9720e81db16f52f1856bf59905428fd7ef88005d1370e2f64c"}, +] + +[package.dependencies] +griffe = ">=0.49" +mkdocs-autorefs = ">=1.2" +mkdocstrings = ">=0.26" + [[package]] name = "nodeenv" version = "1.8.0" @@ -1371,4 +1447,4 @@ watchmedo = ["PyYAML (>=3.10)"] [metadata] lock-version = "2.1" python-versions = "^3.11" -content-hash = "6e55042c4886a49e2b8cdd9e80a0c4812e59abdc80945c65e1ae91cb193f84ca" +content-hash = "ef4b9f452db67f4355a1d23657c044f758f6edb36350cfc98b33f7496940f1bb" diff --git a/pyproject.toml b/pyproject.toml index 9e5bb46..e191057 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -24,6 +24,8 @@ pytest-freezegun = "^0.4.2" mkdocs = "^1.6.1" mkdocs-material = "^9.6.1" pymdown-extensions = "^10.14.2" +mkdocstrings = "^0.27.0" +mkdocstrings-python = "^1.13.0" [build-system] requires = ["poetry-core"]