{"id":21300707,"url":"https://github.com/reingart/pyafipws","last_synced_at":"2025-05-14T23:05:44.098Z","repository":{"id":9798309,"uuid":"11776196","full_name":"reingart/pyafipws","owner":"reingart","description":"Factura Electrónica AFIP y otros servicios web (proyecto software libre) — Interfases, tools and apps for Argentina's gov't. webservices (soap, com/dll simil-ocx, pdf, dbf, xml, json, etc.) #python","archived":false,"fork":false,"pushed_at":"2025-04-30T02:56:30.000Z","size":8560,"stargazers_count":311,"open_issues_count":46,"forks_count":256,"subscribers_count":63,"default_branch":"main","last_synced_at":"2025-04-30T03:34:28.074Z","etag":null,"topics":["agriculture","argentina","cobol","dbf","dll","dotnet","foreign-trade","invoice","java","json","ocx","php","python","soap","tax","tourism","visual-basic","visual-foxpro","webservice","xbase"],"latest_commit_sha":null,"homepage":"http://www.sistemasagiles.com.ar/trac/wiki/ManualPyAfipWs","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"lgpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/reingart.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"COPYING","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2013-07-30T21:35:52.000Z","updated_at":"2025-04-30T02:56:34.000Z","dependencies_parsed_at":"2023-01-13T16:24:09.713Z","dependency_job_id":"e9cd545f-04ff-4578-9a57-458aac809ab6","html_url":"https://github.com/reingart/pyafipws","commit_stats":{"total_commits":2786,"total_committers":24,"mean_commits":"116.08333333333333","dds":"0.11127063890882982","last_synced_commit":"90ef00f1ae5dace12e572030a960d130993f86c7"},"previous_names":[],"tags_count":8,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/reingart%2Fpyafipws","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/reingart%2Fpyafipws/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/reingart%2Fpyafipws/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/reingart%2Fpyafipws/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/reingart","download_url":"https://codeload.github.com/reingart/pyafipws/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254243358,"owners_count":22038046,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["agriculture","argentina","cobol","dbf","dll","dotnet","foreign-trade","invoice","java","json","ocx","php","python","soap","tax","tourism","visual-basic","visual-foxpro","webservice","xbase"],"created_at":"2024-11-21T15:29:49.921Z","updated_at":"2025-05-14T23:05:39.083Z","avatar_url":"https://github.com/reingart.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"pyafipws\n========\n\nPyAfipWs contains Python modules to operate with web services regarding AFIP (Argentina's \"IRS\") and other government agencies, mainly related to electronic invoicing, several taxes and traceability.\n\nCopyright 2008 - 2022 (C) Mariano Reingart [reingart@gmail.com](mailto:reingart@gmail.com) (creator and maintainter). All rights reserved.\n\nLicense: LGPLv3+, with \"commercial\" exception available to include it and distribute with propietary programs\n\nGeneral Information:\n--------------------\n\n * Main Project Site: https://github.com/reingart/pyafipws (git repository)\n * User Manual: (http://www.sistemasagiles.com.ar/trac/wiki/ManualPyAfipWs (Spanish)\n * Documentation: https://github.com/reingart/pyafipws/wiki (Spanish/English)\n * Commercial Support: http://www.sistemasagiles.com.ar/ (Spanish)\n * Community Site: http://www.pyafipws.com.ar/ (Spanish)\n * Public Forum: http://groups.google.com/group/pyafipws (community support, no-charge \"gratis\" access)\n\nProject Structure:\n------------------\n\n * [Python library][1] (a helper class for each webservice for easy use of their methods and attributes)\n * [PyAfipWs][7]: [OCX-like][2] Windows Component-Object-Model interface compatible with legacy programming languages (VB, VFP, Delphi, PHP, VB.NET, etc.)\n * [LibPyAfipWs][8]: [DLL/.so][3] compiled shared library (exposing python methods to C/C++/C#) \n * [Console][4] (command line) tools using simplified input \u0026 ouput files (TXT, DBF, JSON)\n * [PyRece][5] GUI and [FacturaLibre][6] WEB apps as complete reference implementations\n * Examples for Java, .NET (C#, VB.NET), Visual Basic, Visual Fox Pro, Delphi, C, PHP. \n * Minor code fragment samples for SAP (ABAP), PowerBuilder, Fujitsu Net Cobol, Clarion, etc.\n * Modules for [OpenERP/Odoo][27] - [Tryton][28]\n \nFeatures implemented:\n---------------------\n\n * Supported alternate interchange formats: TXT (fixed lenght COBOL), CSV, DBF (Clipper/xBase/Harbour), XML, JSON, etc.\n * Full automation to request authentication and invoice authorization (CAE, COE, etc.)\n * Advanced XML manipulation, caching and proxy support.\n * Customizable PDF generation and visual designer (CSV templates)\n * Email, barcodes (PIL), installation (NSIS), configuration (.INI), debugging and other misc utilities\n\nWeb services supported so far:\n------------------------------\n\nAFIP:\n\n * [WSAA][10]: authorization \u0026 authentication, including digital cryptographic signature\n * [WSFEv1][11]: domestic market (electronic invoice) -[English][12]-\n * [WSMTXCA][22]: domestic market (electronic invoice) -detailing articles and barcodes-\n * [WSCT][22b]: tourism (electronic invoice) -\"tax free\" VAT refund for tourists- \n * [WSBFEv1][13]: tax bonus (electronic invoice)\n * [WSFEXv1][14]: foreign trade (electronic invoice) -[English][15]-\n * [WSCTG][16]: agriculture (grain traceability code)\n * [WSLPG][17]: agriculture (grain liquidation - invoice)\n * [WSLTV][17b]: agriculture (green tobacco - invoice)\n * [WSLUM][17c]: agriculture (milk - invoice)\n * [WSLSP][17d]: agriculture (cattle/livestock - invoice)\n * [WSCDC][22]: invoice verification\n * [Taxpayers' Registe][26]: database to check sellers and buyers register\n\nARBA:\n\n * [COT][20]: Provincial Operation Transport Code (aka electronic Shipping note)\n\nANMAT/SEDRONAR/SENASA (SNT):\n\n * [TrazaMed][21]: National Medical Drug Traceability Program\n * [TrazaRenpre][24]: Controlled Chemical Precursors Traceability Program\n * [TrazaFito][25]: Phytosanitary Products Traceability Program\n\nInstallation Instructions:\n--------------------------\n\nNotes:\n * Python 3.9 is recommended for new apps: https://www.python.org/downloads/\n * Python 2.7 is still supported for legacy apps but compatibility will be removed soon\n\nYou could see the `.github` directory for detailed workflows and automated commands to build the project.\n\n## Quick-Start\n\nThese instructions are for Ubuntu/Debian. In Windows you can use PowerShell.\n\nYou can download the compressed file: https://github.com/reingart/pyafipws/archive/main.zip and unzip it.\n\nThen install dependencies and the project itself:\n```\npip download https://github.com/reingart/pyafipws/archive/main.zip\npython -m zipfile -e main.zip  .\ncd pyafipws-main\npip install -r requirements.txt --user\npython setup.py install\n```\n\nYou'll need a digital certificate (.crt) and private key (.key) to authenticate \n(see [certificate generation][29] for more information and instructions).\nProvisionally, you can use author's testing certificate/key:\n```\nwget https://www.sistemasagiles.com.ar/soft/pyafipws/reingart.zip -O reingart.zip\npython -m zipfile -e reingart.zip .\n```\n\nYou should copy and configure `rece.ini` to set up paths and URLs:\n```\ncp conf/*.ini .\n```\n\nThen, you could execute `WSAA` script to authenticate (getting Token and Sign)\nand `WSFEv1` to process an electronic invoice:\n```\npython -m pyafipws.wsaa\npython -m pyafipws.wsfev1 --prueba\n```\n\nWith the last command, you should get the Electronic Autorization Code (CAE) \nfor testing purposes (sample invoice data, do not use in production!).\n\n## Virtual environment (testing):\n\nThe following commands clone the repository, creates a virtualenv and install\nthe packages there (including the latest versions of the dependencies) to avoid\nconflicts with other libraries:\n```\ngit clone https://github.com/reingart/pyafipws.git\ncd pyafipws\npython -m venv .venv\n. .venv/bin/activate\npip install -r requirements.txt\npip install -r requirements-dev.txt\n```\n\nRun `python setup_win.py py2exe` to build in windows and \"compile\" executables.\nSee the GitHub Actions for specific steps and more details.\n\nJust execute `pytest` to run automated Python tests.\nFor Windows, see `tests/powershell` directory for Pester tests.\n\n## Dependency installation (development):\n\nFor SOAP webservices [PySimpleSOAP](https://github.com/pysimplesoap/pysimplesoap) is\nneeded (spin-off of this library, inspired by the PHP SOAP extension):\n\n```\ngit clone https://github.com/pysimplesoap/pysimplesoap.git -b stable_py3k\ncd pysimplesoap\npython setup.py install\n```\n\nUse \"stable_py3k\" branch reingart (see `requirements.txt` for more information)\n\nFor PDF generation, you will need the [PyFPDF](https://github.com/reingart/pyfpdf)\n(PHP's FPDF library, python port):\n\n```\ngit clone https://github.com/reingart/pyfpdf.git\ncd pyfpdf\npython setup.py install\n```\n\nOn Windows, you can see available installers released for evaluation purposes on\n[Download Releases](https://github.com/reingart/pyafipws/releases)\n\nFor more information see the source code installation steps in the \n[wiki](https://github.com/reingart/pyafipws/wiki/InstalacionCodigoFuente)\n\n\n [1]: http://www.sistemasagiles.com.ar/trac/wiki/FacturaElectronicaPython\n [2]: http://www.sistemasagiles.com.ar/trac/wiki/OcxFacturaElectronica\n [3]: http://www.sistemasagiles.com.ar/trac/wiki/DllFacturaElectronica\n [4]: http://www.sistemasagiles.com.ar/trac/wiki/HerramientaFacturaElectronica\n [5]: http://www.sistemasagiles.com.ar/trac/wiki/PyRece\n [6]: http://www.sistemasagiles.com.ar/trac/wiki/FacturaLibre\n [7]: http://www.sistemasagiles.com.ar/trac/wiki/PyAfipWs\n [8]: http://www.sistemasagiles.com.ar/trac/wiki/LibPyAfipWs\n [10]: http://www.sistemasagiles.com.ar/trac/wiki/ManualPyAfipWs#ServicioWebdeAutenticaciónyAutorizaciónWSAA\n [11]: http://www.sistemasagiles.com.ar/trac/wiki/ProyectoWSFEv1\n [12]: https://github.com/reingart/pyafipws/wiki/WSFEv1\n [13]: http://www.sistemasagiles.com.ar/trac/wiki/BonosFiscales\n [14]: http://www.sistemasagiles.com.ar/trac/wiki/FacturaElectronicaExportacion\n [15]: https://github.com/reingart/pyafipws/wiki/WSFEX\n [16]: http://www.sistemasagiles.com.ar/trac/wiki/CodigoTrazabilidadGranos\n [17]: http://www.sistemasagiles.com.ar/trac/wiki/LiquidacionPrimariaGranos\n [17b]: http://www.sistemasagiles.com.ar/trac/wiki/LiquidacionTabacoVerde\n [17c]: http://www.sistemasagiles.com.ar/trac/wiki/LiquidacionUnicaMensualLecheria\n [17d]: http://www.sistemasagiles.com.ar/trac/wiki/LiquidacionSectorPecuario\n [20]: http://www.sistemasagiles.com.ar/trac/wiki/RemitoElectronicoCotArba\n [21]: http://www.sistemasagiles.com.ar/trac/wiki/TrazabilidadMedicamentos\n [22]: http://www.sistemasagiles.com.ar/trac/wiki/FacturaElectronicaMTXCAService\n [22b]: http://www.sistemasagiles.com.ar/trac/wiki/FacturaElectronicaComprobantesTurismo \n [23]: http://www.sistemasagiles.com.ar/trac/wiki/ConstatacionComprobantes\n [24]: http://www.sistemasagiles.com.ar/trac/wiki/TrazabilidadPrecursoresQuimicos\n [25]: http://www.sistemasagiles.com.ar/trac/wiki/TrazabilidadProductosFitosanitarios\n [26]: http://www.sistemasagiles.com.ar/trac/wiki/PadronContribuyentesAFIP\n [27]: https://github.com/reingart/openerp_pyafipws\n [28]: https://github.com/tryton-ar/account_invoice_ar\n [29]: http://www.sistemasagiles.com.ar/trac/wiki/ManualPyAfipWs#Certificados\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Freingart%2Fpyafipws","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Freingart%2Fpyafipws","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Freingart%2Fpyafipws/lists"}