No project description provided
Project description
MS Jira hours imputed services
Este repositorio es una suite de metodos necesarios para extraer y calcular información acerca de las horas imputadas de los empleados y sus convenidos de trabajo
Acuerdo de horas
Las horas que debe hacer un empleado se registran en un Google Sheet donde se indica para cada día las horas necesarias por oficina.
¿Cómo usar el servicio de agreements?
Para que podamos conectar con los servicios de Google, necesitamos registrar una variable de entorno llamada $GOOGLE_SHEET_CREDENTIALS
donde almacenaremos en Base64 el contenido del JSON de nuestro service account de Google que tiene las credenciales para autenticarnos.
export GOOGLE_SHEET_CREDENTIALS=<SERVICE_ACCOUNT_BASE64_CONTENT>
Usage example
Getting agreement hours for a month
from ms_imputedhours_core.agreements import Agreement
month = 9
year = 2022
sheet_name = 'Sheet 1'
spreadsheet_id = '111111'
service = Agreements(spreadsheet_id)
service.get_hours_by_month(month, year, sheet_name)
Getting agreement hours by a dates range
from ms_imputedhours_core.agreements import Agreement
spreadsheet_id = '111111'
from_date = datetime.strptime('12/09/2022', '%d/%m/%Y')
to_date = datetime.strptime('17/09/2022', '%d/%m/%Y')
sheet_name = 'SHEET_NAME_TEST'
service = Agreements(spreadsheet_id)
service.get_hours_by_range(from_date, to_date, sheet_name)
Getting all office names
from ms_imputedhours_core.agreements import Agreement
spreadsheet_id = '111111'
service = Agreements(spreadsheet_id)
service..get_all_office_names()
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
ms_imputedhours_core-0.0.3.tar.gz
(16.8 kB
view hashes)
Close
Hashes for ms_imputedhours_core-0.0.3.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9ecab3fc1f91af586625331052b4dc165f0f383ec74ec12945ebac408a31a258 |
|
MD5 | d29cfc9d32401f12f991869643acc596 |
|
BLAKE2b-256 | f5efa1446fa595d96adaeb871433384ce29cc8b2a3e5404df3bee858cae5b131 |