feriados-python-sdk 1.0.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,5 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2025 Seu Nome
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy...
@@ -0,0 +1,21 @@
1
+ Metadata-Version: 2.4
2
+ Name: feriados-python-sdk
3
+ Version: 1.0.0
4
+ Summary: Client de comunicaçao c/ API de Feriados
5
+ Author-email: Filipe Coelho <filipe@fmconsult.com.br>
6
+ License: MIT License
7
+
8
+ Copyright (c) 2025 Seu Nome
9
+
10
+ Permission is hereby granted, free of charge, to any person obtaining a copy...
11
+
12
+ Project-URL: Homepage, https://github.com/seuuser/minha-biblioteca
13
+ Project-URL: Bug Tracker, https://github.com/seuuser/minha-biblioteca/issues
14
+ Keywords: sdk,api,feriados,fmconsult
15
+ Classifier: Programming Language :: Python :: 3
16
+ Classifier: License :: OSI Approved :: MIT License
17
+ Classifier: Operating System :: OS Independent
18
+ Requires-Python: >=3.11
19
+ Description-Content-Type: text/markdown
20
+ License-File: LICENSE
21
+ Dynamic: license-file
File without changes
@@ -0,0 +1,26 @@
1
+ [build-system]
2
+ requires = ["setuptools>=61.0", "wheel"]
3
+ build-backend = "setuptools.build_meta"
4
+
5
+ [project]
6
+ name = "feriados-python-sdk"
7
+ version = "1.0.0"
8
+ description = "Client de comunicaçao c/ API de Feriados"
9
+ readme = "README.md"
10
+ requires-python = ">=3.11"
11
+ license = {file = "LICENSE"}
12
+ authors = [
13
+ {name = "Filipe Coelho", email = "filipe@fmconsult.com.br"},
14
+ ]
15
+ keywords = ["sdk", "api", "feriados", "fmconsult"]
16
+ classifiers = [
17
+ "Programming Language :: Python :: 3",
18
+ "License :: OSI Approved :: MIT License",
19
+ "Operating System :: OS Independent",
20
+ ]
21
+
22
+ dependencies = []
23
+
24
+ [project.urls]
25
+ "Homepage" = "https://github.com/seuuser/minha-biblioteca"
26
+ "Bug Tracker" = "https://github.com/seuuser/minha-biblioteca/issues"
@@ -0,0 +1,4 @@
1
+ [egg_info]
2
+ tag_build =
3
+ tag_date = 0
4
+
File without changes
File without changes
@@ -0,0 +1,14 @@
1
+ import os
2
+ from fmconsult.http.api import ApiBase
3
+
4
+ class FeriadosApi(ApiBase):
5
+ def __init__(self, ano_referencia):
6
+ try:
7
+ self.api_token = os.environ['feriados.api.token']
8
+ self.base_url = 'https://feriadosapi.com/api/v1'
9
+ self.headers = {
10
+ 'Authorization': f'Bearer {self.api_token}'
11
+ }
12
+ self.ano_referencia = ano_referencia
13
+ except:
14
+ raise
@@ -0,0 +1,58 @@
1
+ import logging, jsonpickle
2
+ from http import HTTPMethod
3
+ from fmconsult.utils.url import UrlUtil
4
+ from feriados.api import FeriadosApi
5
+ from feriados.dtos.feriado import FeriadoResponse
6
+
7
+ class Feriados(FeriadosApi):
8
+
9
+ def __init__(self):
10
+ super().__init__()
11
+
12
+ def get_nacionais(self):
13
+ try:
14
+ logging.info('listing Feriados Nacionais...')
15
+ self.endpoint_url = UrlUtil().make_url(self.base_url, ['feriados', 'nacionais'])
16
+ res = self.call_request(
17
+ http_method=HTTPMethod.GET,
18
+ request_url=self.endpoint_url,
19
+ params={
20
+ 'ano': self.ano_referencia
21
+ }
22
+ )
23
+ res = jsonpickle.decode(res)
24
+ return FeriadoResponse(**res)
25
+ except:
26
+ raise
27
+
28
+ def get_estaduais_by_uf(self, uf):
29
+ try:
30
+ logging.info('listing Feriados Estaduais by UF...')
31
+ self.endpoint_url = UrlUtil().make_url(self.base_url, ['feriados', 'estado', uf])
32
+ res = self.call_request(
33
+ http_method=HTTPMethod.GET,
34
+ request_url=self.endpoint_url,
35
+ params={
36
+ 'ano': self.ano_referencia
37
+ }
38
+ )
39
+ res = jsonpickle.decode(res)
40
+ return FeriadoResponse(**res)
41
+ except:
42
+ raise
43
+
44
+ def get_municipais_by_cidade(self, codigo_ibge_municipio):
45
+ try:
46
+ logging.info('listing Feriados Municipais by Cidade...')
47
+ self.endpoint_url = UrlUtil().make_url(self.base_url, ['feriados', 'cidade', codigo_ibge_municipio])
48
+ res = self.call_request(
49
+ http_method=HTTPMethod.GET,
50
+ request_url=self.endpoint_url,
51
+ params={
52
+ 'ano': self.ano_referencia
53
+ }
54
+ )
55
+ res = jsonpickle.decode(res)
56
+ return FeriadoResponse(**res)
57
+ except:
58
+ raise
@@ -0,0 +1,41 @@
1
+ from dataclasses import dataclass, asdict
2
+ from typing import List, Optional
3
+
4
+ from fmconsult.utils.enum import CustomEnum
5
+ from fmconsult.utils.object import CustomObject
6
+
7
+ class FeriadoType(CustomEnum):
8
+ NACIONAL = 'NACIONAL'
9
+ ESTADUAL = 'ESTADUAL'
10
+ MUNICIPAL = 'MUNICIPAL'
11
+ BANCARIO = 'BANCARIO'
12
+
13
+ @dataclass
14
+ class Cidade(CustomObject):
15
+ ibge: int
16
+ nome: str
17
+ uf: str
18
+
19
+ @dataclass
20
+ class FeriadoMeta(CustomObject):
21
+ total: int
22
+ page: int
23
+ per_page: int
24
+ total_pages: int
25
+
26
+ @dataclass
27
+ class Feriado(CustomObject):
28
+ id: str
29
+ data: str
30
+ nome: str
31
+ tipo: FeriadoType
32
+ bancario: Optional[bool]
33
+
34
+ @dataclass
35
+ class FeriadoResponse(CustomObject):
36
+ tipo: FeriadoType
37
+ ano: str
38
+ feriados: List[Feriado]
39
+ meta: FeriadoMeta
40
+ uf: Optional[str]
41
+ cidade: Optional[Cidade]
@@ -0,0 +1,21 @@
1
+ Metadata-Version: 2.4
2
+ Name: feriados-python-sdk
3
+ Version: 1.0.0
4
+ Summary: Client de comunicaçao c/ API de Feriados
5
+ Author-email: Filipe Coelho <filipe@fmconsult.com.br>
6
+ License: MIT License
7
+
8
+ Copyright (c) 2025 Seu Nome
9
+
10
+ Permission is hereby granted, free of charge, to any person obtaining a copy...
11
+
12
+ Project-URL: Homepage, https://github.com/seuuser/minha-biblioteca
13
+ Project-URL: Bug Tracker, https://github.com/seuuser/minha-biblioteca/issues
14
+ Keywords: sdk,api,feriados,fmconsult
15
+ Classifier: Programming Language :: Python :: 3
16
+ Classifier: License :: OSI Approved :: MIT License
17
+ Classifier: Operating System :: OS Independent
18
+ Requires-Python: >=3.11
19
+ Description-Content-Type: text/markdown
20
+ License-File: LICENSE
21
+ Dynamic: license-file
@@ -0,0 +1,14 @@
1
+ LICENSE
2
+ README.md
3
+ pyproject.toml
4
+ src/__init__.py
5
+ src/feriados/__init__.py
6
+ src/feriados/api.py
7
+ src/feriados/apis/__init__.py
8
+ src/feriados/apis/feriados.py
9
+ src/feriados/dtos/__init__.py
10
+ src/feriados/dtos/feriado.py
11
+ src/feriados_python_sdk.egg-info/PKG-INFO
12
+ src/feriados_python_sdk.egg-info/SOURCES.txt
13
+ src/feriados_python_sdk.egg-info/dependency_links.txt
14
+ src/feriados_python_sdk.egg-info/top_level.txt