# pyefergy
[![codecov](https://codecov.io/gh/tkdrob/pyefergy/branch/master/graph/badge.svg)](https://codecov.io/gh/tkdrob/pyefergy)
![python version](https://img.shields.io/badge/Python-3.8=><=3.12-blue.svg)
[![PyPI](https://img.shields.io/pypi/v/pyefergy)](https://pypi.org/project/pyefergy)
![Actions](https://github.com/tkdrob/pyefergy/workflows/Actions/badge.svg?branch=master)
_Python API client for Efergy._
## Installation
```bash
python3 -m pip install pyefergy
```
## Example usage
More examples can be found in the `tests` directory.
```python
"""Example usage of pyefergy."""
import asyncio
from pyefergy import Efergy
TOKEN = "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
OFFSET = "America/New_York" # Accepts either a time zone or literal offset
async def async_example():
"""Example usage of pyefergy."""
api = Efergy(TOKEN, utc_offset=OFFSET)
async with api:
print(await api.async_get_reading("instant_readings"))
asyncio.get_event_loop().run_until_complete(async_example())
```
## Contribute
**All** contributions are welcome!
1. Fork the repository
2. Clone the repository locally and open the devcontainer or use GitHub codespaces
3. Install poetry
4. Install dependencies: `poetry install`
5. Do your changes
6. Lint the files with `poetry run pylint pyefergy && black . && ruff check && mypy pyefergy`
7. Ensure all tests pass with `poetry run pytest`
8. Ensure 100% coverage
9. Commit your work, and push it to GitHub
10. Create a PR against the `master` branch
Raw data
{
"_id": null,
"home_page": "https://github.com/tkdrob/pyefergy",
"name": "pyefergy",
"maintainer": null,
"docs_url": null,
"requires_python": "<4,>=3.8",
"maintainer_email": null,
"keywords": "pyefergy, efergy, energy",
"author": "Robert Hillis",
"author_email": "tkdrob4390@yahoo.com",
"download_url": "https://files.pythonhosted.org/packages/bd/2a/89a26da791b94bf0b55c97c73623bf0988adaada85204bb62876c8151f2d/pyefergy-22.5.0.tar.gz",
"platform": null,
"description": "# pyefergy\n\n[![codecov](https://codecov.io/gh/tkdrob/pyefergy/branch/master/graph/badge.svg)](https://codecov.io/gh/tkdrob/pyefergy)\n![python version](https://img.shields.io/badge/Python-3.8=><=3.12-blue.svg)\n[![PyPI](https://img.shields.io/pypi/v/pyefergy)](https://pypi.org/project/pyefergy)\n![Actions](https://github.com/tkdrob/pyefergy/workflows/Actions/badge.svg?branch=master)\n\n_Python API client for Efergy._\n\n## Installation\n\n```bash\npython3 -m pip install pyefergy\n```\n\n## Example usage\n\nMore examples can be found in the `tests` directory.\n\n```python\n\"\"\"Example usage of pyefergy.\"\"\"\nimport asyncio\nfrom pyefergy import Efergy\n\nTOKEN = \"xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx\"\nOFFSET = \"America/New_York\" # Accepts either a time zone or literal offset\n\n\nasync def async_example():\n \"\"\"Example usage of pyefergy.\"\"\"\n api = Efergy(TOKEN, utc_offset=OFFSET)\n async with api:\n print(await api.async_get_reading(\"instant_readings\"))\n\nasyncio.get_event_loop().run_until_complete(async_example())\n```\n\n## Contribute\n\n**All** contributions are welcome!\n\n1. Fork the repository\n2. Clone the repository locally and open the devcontainer or use GitHub codespaces\n3. Install poetry\n4. Install dependencies: `poetry install`\n5. Do your changes\n6. Lint the files with `poetry run pylint pyefergy && black . && ruff check && mypy pyefergy`\n7. Ensure all tests pass with `poetry run pytest`\n8. Ensure 100% coverage\n9. Commit your work, and push it to GitHub\n10. Create a PR against the `master` branch",
"bugtrack_url": null,
"license": "MIT",
"summary": "An API library for Efergy energy meters.",
"version": "22.5.0",
"project_urls": {
"Homepage": "https://github.com/tkdrob/pyefergy",
"Repository": "https://github.com/tkdrob/pyefergy"
},
"split_keywords": [
"pyefergy",
" efergy",
" energy"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "ba908656b5775bcfa6a4814a91d8b710324c5b8335f48fe7a31ebb991c9ffbd1",
"md5": "fc89def5b4af2d4d00c0e57fa5dcf127",
"sha256": "cc776db65363bdee4d005a63b4730f5233c5a2f8ee53b7c54af026ec05cbfaed"
},
"downloads": -1,
"filename": "pyefergy-22.5.0-py3-none-any.whl",
"has_sig": false,
"md5_digest": "fc89def5b4af2d4d00c0e57fa5dcf127",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": "<4,>=3.8",
"size": 8206,
"upload_time": "2024-05-14T03:18:27",
"upload_time_iso_8601": "2024-05-14T03:18:27.927052Z",
"url": "https://files.pythonhosted.org/packages/ba/90/8656b5775bcfa6a4814a91d8b710324c5b8335f48fe7a31ebb991c9ffbd1/pyefergy-22.5.0-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "bd2a89a26da791b94bf0b55c97c73623bf0988adaada85204bb62876c8151f2d",
"md5": "279ae9283e4ce6d97cb94cda48296ebe",
"sha256": "1ca1146bb2f34227e6faaae402bda5bf0ee414e49f7549be624d40b999f78c51"
},
"downloads": -1,
"filename": "pyefergy-22.5.0.tar.gz",
"has_sig": false,
"md5_digest": "279ae9283e4ce6d97cb94cda48296ebe",
"packagetype": "sdist",
"python_version": "source",
"requires_python": "<4,>=3.8",
"size": 8442,
"upload_time": "2024-05-14T03:18:29",
"upload_time_iso_8601": "2024-05-14T03:18:29.531334Z",
"url": "https://files.pythonhosted.org/packages/bd/2a/89a26da791b94bf0b55c97c73623bf0988adaada85204bb62876c8151f2d/pyefergy-22.5.0.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-05-14 03:18:29",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "tkdrob",
"github_project": "pyefergy",
"travis_ci": false,
"coveralls": true,
"github_actions": true,
"lcname": "pyefergy"
}