Skip to main content

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.5.tar.gz (9.3 kB view hashes)

Uploaded Source

Built Distribution

lg_payroll_api-0.1.5-py3-none-any.whl (15.1 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page