Metadata-Version: 2.1
Name: lg-payroll-api
Version: 0.1.5
Summary: 
Home-page: https://github.com/people-analytics-tech/lg-payroll-api
License: MIT
Author: stone_people_analytics
Author-email: systems-techpeople@stone.com.br
Maintainer: diogo56
Maintainer-email: diogo.amorim2001@gmail.com
Requires-Python: >=3.9,<4.0
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Requires-Dist: python-decouple (==3.8)
Requires-Dist: zeep (==4.2.1)
Project-URL: Repository, https://github.com/people-analytics-tech/lg-payroll-api
Description-Content-Type: text/markdown

# lg-payroll-api
This library able you to make requests to LG soap api in python

## Instalation

```sh
pip install lg-payroll-api
```

## Configuration
First one, you need to define a LgAuthentication object with your credentials:
```python
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:
```python
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:
```python
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.**_

