No project description provided
Project description
lg-payroll-api
This library able you to make requests to LG soap api in python
Instalation
pip install lg-payroll-api
Configuration
First one, you need to define a LgAuthentication object with your credentials:
from lg_payroll_api import LgPayrollApi, LgAuthentication
import os
# This example uses environment variables.
# We recommend the use of environment variables to improve security to your credentials
auth: LgAuthentication = LgAuthentication(
base_url=os.environ["LG_API_BASE_PATH"],
user=os.environ["LG_API_USER"],
password=os.environ["LG_API_PASSWORD"],
guild_tenant=os.environ["LG_API_GUID_TENANT"],
environment_context=os.environ["LG_API_ENVIRONMENT"],
)
After define the authentication, you can instantiate the LgPayrollApi object by passing the authentication defined before:
from lg_payroll_api import LgPayrollApi, LgAuthentication
import os
auth: LgAuthentication = LgAuthentication(
base_url=os.environ["LG_API_BASE_PATH"],
user=os.environ["LG_API_USER"],
password=os.environ["LG_API_PASSWORD"],
guild_tenant=os.environ["LG_API_GUID_TENANT"],
environment_context=os.environ["LG_API_ENVIRONMENT"],
)
lg_payroll_api: LgPayrollApi = LgPayrollApi(auth=auth)
Finally you can access a api endpoints methods abstracted in this library, for example:
from lg_payroll_api import LgPayrollApi, LgAuthentication
import os
auth: LgAuthentication = LgAuthentication(
base_url=os.environ["LG_API_BASE_PATH"],
user=os.environ["LG_API_USER"],
password=os.environ["LG_API_PASSWORD"],
guild_tenant=os.environ["LG_API_GUID_TENANT"],
environment_context=os.environ["LG_API_ENVIRONMENT"],
)
lg_payroll_api: LgPayrollApi = LgPayrollApi(auth=auth)
employees_contracts = (
lg_payroll_api
.employment_contract_service
.list_on_demand()
)
This library is under development and not all methods are available.
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
lg_payroll_api-0.1.6.tar.gz
(14.4 kB
view hashes)
Built Distribution
Close
Hashes for lg_payroll_api-0.1.6-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 535cf7d6f384fa1d252b6fbba3f938e89c51a6a35a95773fad8750d6ecd051ff |
|
MD5 | 3d53a222c206e1fc6ae17e2e8cf182e2 |
|
BLAKE2b-256 | 5df7d6d8ef2be0fd8d21419691032b7b6bba897eb3e5abbdbc1be28f85966335 |