Skip to content

Commit a002387

Browse files
committed
version 4.0.120
1 parent f898dc7 commit a002387

File tree

4 files changed

+141
-0
lines changed

4 files changed

+141
-0
lines changed

fiscalapi/__init__.py

Lines changed: 88 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,88 @@
1+
# fiscalapi/__init__.py
2+
3+
# Re-exportar modelos de common_models
4+
from .models.common_models import (
5+
ApiResponse,
6+
PagedList,
7+
ValidationFailure,
8+
BaseDto,
9+
CatalogDto,
10+
FiscalApiSettings,
11+
)
12+
13+
# Re-exportar modelos de fiscalapi_models
14+
from .models.fiscalapi_models import (
15+
ProductTax,
16+
Product,
17+
Person,
18+
TaxFile,
19+
TaxCredential,
20+
InvoiceIssuer,
21+
InvoiceRecipient,
22+
ItemTax,
23+
InvoiceItem,
24+
GlobalInformation,
25+
RelatedInvoice,
26+
PaidInvoiceTax,
27+
PaidInvoice,
28+
InvoicePayment,
29+
InvoiceResponse,
30+
Invoice,
31+
CancelInvoiceRequest,
32+
CancelInvoiceResponse,
33+
CreatePdfRequest,
34+
FileResponse,
35+
SendInvoiceRequest,
36+
)
37+
38+
# Re-exportar servicios
39+
from .services.catalog_service import CatalogService
40+
from .services.invoice_service import InvoiceService
41+
from .services.people_service import PeopleService
42+
from .services.product_service import ProductService
43+
from .services.tax_file_servive import TaxFileService # Asegúrate de que coincida con tu nombre real (tax_file_service o tax_file_servive)
44+
45+
# Re-exportar la clase FiscalApiClient
46+
# (asumiendo que la definición está en fiscalapi/services/fiscalapi_client.py)
47+
from .services.fiscalapi_client import FiscalApiClient
48+
49+
__all__ = [
50+
# Modelos
51+
"ApiResponse",
52+
"PagedList",
53+
"ValidationFailure",
54+
"BaseDto",
55+
"CatalogDto",
56+
"FiscalApiSettings",
57+
"ProductTax",
58+
"Product",
59+
"Person",
60+
"TaxFile",
61+
"TaxCredential",
62+
"InvoiceIssuer",
63+
"InvoiceRecipient",
64+
"ItemTax",
65+
"InvoiceItem",
66+
"GlobalInformation",
67+
"RelatedInvoice",
68+
"PaidInvoiceTax",
69+
"PaidInvoice",
70+
"InvoicePayment",
71+
"InvoiceResponse",
72+
"Invoice",
73+
"CancelInvoiceRequest",
74+
"CancelInvoiceResponse",
75+
"CreatePdfRequest",
76+
"FileResponse",
77+
"SendInvoiceRequest",
78+
79+
# Servicios
80+
"CatalogService",
81+
"InvoiceService",
82+
"PeopleService",
83+
"ProductService",
84+
"TaxFileService",
85+
86+
# Cliente principal
87+
"FiscalApiClient",
88+
]

fiscalapi/models/__init__.py

Whitespace-only changes.

fiscalapi/services/__init__.py

Whitespace-only changes.

setup.py

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
# setup.py
2+
import os
3+
from setuptools import setup, find_packages
4+
5+
VERSION = "4.0.120"
6+
# Descripción breve basada en el .csproj
7+
DESCRIPTION = "Genera facturas CFDI válidas ante el SAT consumiendo el API de https://www.fiscalapi.com"
8+
9+
# Carga un README.md (si existe) como descripción larga
10+
current_dir = os.path.abspath(os.path.dirname(__file__))
11+
long_description_file = os.path.join(current_dir, "README.md")
12+
if os.path.exists(long_description_file):
13+
with open(long_description_file, encoding="utf-8") as f:
14+
LONG_DESCRIPTION = f.read()
15+
else:
16+
LONG_DESCRIPTION = DESCRIPTION # fallback si no se encuentra README.md
17+
18+
setup(
19+
name="fiscalapi", # Normalmente en minúsculas en PyPI
20+
version=VERSION,
21+
author="Fiscalapi",
22+
author_email="contacto@fiscalapi.com", # Ajusta con el correo que corresponda
23+
url="https://www.fiscalapi.com",
24+
description=DESCRIPTION,
25+
long_description=LONG_DESCRIPTION,
26+
long_description_content_type="text/markdown",
27+
28+
# Licencia Pública de Mozilla (por ejemplo, MPL 2.0)
29+
license="MPL-2.0",
30+
31+
packages=find_packages(
32+
exclude=["tests", "*.tests", "*.tests.*", "tests.*"]
33+
),
34+
keywords=["factura", "cfdi", "facturacion", "mexico", "sat", "fiscalapi"],
35+
36+
python_requires=">=3.7", # Ajusta según la compatibilidad mínima de Python
37+
38+
install_requires=[
39+
"pydantic>=2.0.0",
40+
"requests>=2.0.0",
41+
"urllib3>=1.0.0",
42+
"certifi>=2023.0.0",
43+
"email_validator>=2.2.0",
44+
],
45+
46+
classifiers=[
47+
"Development Status :: 5 - Production/Stable",
48+
"Intended Audience :: Developers",
49+
"License :: OSI Approved :: Mozilla Public License 2.0 (MPL 2.0)",
50+
"Programming Language :: Python :: 3.7",
51+
"Topic :: Office/Business :: Financial",
52+
],
53+
)

0 commit comments

Comments
 (0)