A python wrapper for PazGas Power
Project description
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
from pazgas_power import PazGasPowerApi, CustomerData
api = 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 - pre-requisite
- Docker - pre-requisite
- Docker Compose - pre-requisite
- Poetry - pre-requisite
- 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 | . |
Yes |
Note: When you run the install command (using docker or locally), a .env file will be created automatically based on 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 for more information.
Logging
This project uses a simple way to configure the log with 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 and ConfigParser using a config class.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file pazgas_power-0.0.4.tar.gz
.
File metadata
- Download URL: pazgas_power-0.0.4.tar.gz
- Upload date:
- Size: 10.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.8.0 CPython/3.11.10 Linux/6.5.0-1025-azure
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | ef59545f80ee75b93b125ee623154a718d46a21bc35e04353d1cab1b938e89ac |
|
MD5 | 6688b0fa072e08a3571a0bb33f41c7de |
|
BLAKE2b-256 | 997b40557ea89c9cb15049b239c33f635fee965936913b18ea0522c57c327a0a |
File details
Details for the file pazgas_power-0.0.4-py3-none-any.whl
.
File metadata
- Download URL: pazgas_power-0.0.4-py3-none-any.whl
- Upload date:
- Size: 13.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.8.0 CPython/3.11.10 Linux/6.5.0-1025-azure
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | ff69ae6c9f16fa342a362e78f5c5c5b9b869b26459b1db387dc7ad3743eceb89 |
|
MD5 | 1ed8caea5448faee6692c7adf04c2ec9 |
|
BLAKE2b-256 | b549e0a05ce2534ad376b8f57a2578730df69eea8c18985ec324ad81c453de47 |