Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/guykh/py-pazgas-power
PazGaz Power API Python Wrapper
https://github.com/guykh/py-pazgas-power
Last synced: 6 days ago
JSON representation
PazGaz Power API Python Wrapper
- Host: GitHub
- URL: https://github.com/guykh/py-pazgas-power
- Owner: GuyKh
- License: mit
- Created: 2024-10-30T09:26:31.000Z (2 months ago)
- Default Branch: main
- Last Pushed: 2024-11-22T12:28:03.000Z (about 2 months ago)
- Last Synced: 2024-11-22T13:26:41.530Z (about 2 months ago)
- Language: Python
- Size: 37.1 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
- Code of conduct: CODE_OF_CONDUCT.md
- Codeowners: .github/CODEOWNERS
- Security: SECURITY.md
Awesome Lists containing this project
README
# pazgas-power - PazGas Power API Python wrapper
This would allow you to logon, fetch various data.
## Installation
To install, run:
```
pip3 install pazgas-power
```## Usage Example
```python
from pazgas_power import PazGasPowerApi, CustomerDataapi = PazGasPowerApi("123456", "055-555555")
# ^user_id^ ^phone^customer_data: CustomerData = await api.login_and_get_customer_data()
print(customer_data)
```## Technology and Resources
- [Python 3.11](https://www.python.org/downloads/release/python-3110/) - **pre-requisite**
- [Docker](https://www.docker.com/get-started) - **pre-requisite**
- [Docker Compose](https://docs.docker.com/compose/) - **pre-requisite**
- [Poetry](https://python-poetry.org/) - **pre-requisite**
- [Ruff](https://github.com/astral-sh/ruff)*Please pay attention on **pre-requisites** resources that you must install/configure.*
## How to install, run and test
### Environment variables
*Use this section to explain each env variable available on your application*
Variable | Description | Available Values | Default Value | Required
--- | --- | --- | --- | ---
ENV | The application enviroment | `dev / test / qa / prod` | `dev` | Yes
PYTHONPATH | Provides guidance to the Python interpreter about where to find libraries and applications | [ref](https://docs.python.org/3/using/cmdline.html#envvar-PYTHONPATH) | `.` | Yes*Note: When you run the install command (using docker or locally), a .env file will be created automatically based on [env.template](env.template)*
Command | Docker | Locally | Description
---- | ------- | ------- | -------
install | `make docker/install` | `make local/install` | to install
tests | `make docker/tests` | `make local/tests` | to run the tests with coverage
lint | `make docker/lint` | `make local/lint` | to run static code analysis using ruff
lint/fix | `make docker/lint/fix` | `make local/lint/fix` | to fix files using ruff
build image | `make docker/image/build` | - | to build the docker image
push image | `make docker/image/push` | - | to push the docker image**Helpful commands**
*Please, check all available commands in the [Makefile](Makefile) for more information*.
## Logging
This project uses a simple way to configure the log with [logging.conf](logging.conf) to show the logs on the container output console.
## Settings
This project uses a simple way to manage the settings with [settings.conf](settings.conf) and [ConfigParser](https://docs.python.org/3/library/configparser.html) using a [config class](./src/config/settings.py).