PageRenderTime 74ms CodeModel.GetById 25ms RepoModel.GetById 1ms app.codeStats 0ms

/README.md

https://gitlab.com/ezeql/pyafipws
Markdown | 167 lines | 136 code | 31 blank | 0 comment | 0 complexity | 4291cc88f7c4feb8634e89b994e340c2 MD5 | raw file
  1. pyafipws
  2. ========
  3. PyAfipWs 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.
  4. Copyright 2008 - 2015 (C) Mariano Reingart [reingart@gmail.com](mailto:reingart@gmail.com) (creator and maintainter). All rights reserved.
  5. License: GPLv3+, with "commercial" exception available to include it and distribute with propietary programs
  6. General Information:
  7. --------------------
  8. * Main Project Site: https://code.google.com/p/pyafipws/ (mercurial repository)
  9. * Mirror: https://github.com/reingart/pyafipws (git repository)
  10. * User Manual: (http://www.sistemasagiles.com.ar/trac/wiki/ManualPyAfipWs (Spanish)
  11. * Commercial Support: http://www.sistemasagiles.com.ar/ (Spanish)
  12. * Community Site: http://www.pyafipws.com.ar/ (Spanish)
  13. * Public Forum: http://groups.google.com/group/pyafipws
  14. More information at [Python Argentina Magazine article](http://revista.python.org.ar/2/en/html/pyafip.html) (English)
  15. and [JAIIO 2012 paper](http://www.41jaiio.org.ar/sites/default/files/15_JSL_2012.pdf) (Spanish)
  16. Project Structure:
  17. ------------------
  18. * [Python library][1] (a helper class for each webservice for easy use of their methods and attributes)
  19. * [PyAfipWs][7]: [OCX-like][2] Windows COM interface compatible with legacy programming languages (VB, VFP, Delphi, PHP, VB.NET, etc.)
  20. * [LibPyAfipWs][8]: [DLL/.so][3] compiled shared library (exposing python methods to C/C++/C#)
  21. * [Console][4] (command line) tools using simplified input & ouput files
  22. * [PyRece][5] GUI and [FacturaLibre][6] WEB apps as complete reference implementations
  23. * Examples for Visual Basic, Visual Fox Pro, Delphi, C, PHP.
  24. * Minor code fragment samples for SAP (ABAP), PowerBuilder, Fujitsu Net Cobol, Clarion, etc.
  25. * Modules for [OpenERP][27] - [Tryton][28]
  26. Features implemented:
  27. ---------------------
  28. * Supported alternate interchange formats: TXT (fixed lenght COBOL), CSV, DBF (Clipper/xBase/Harbour), XML, JSON, etc.
  29. * Full automation to request authentication and invoice authorization (CAE, COE, etc.)
  30. * Advanced XML manipulation, caching and proxy support.
  31. * Customizable PDF generation and visual designer (CSV templates)
  32. * Email, barcodes (PIL), installation (NSIS), configuration (.INI), debugging and other misc utilities
  33. Web services supported so far:
  34. ------------------------------
  35. AFIP:
  36. * [WSAA][10]: authorization & authentication, including digital cryptographic signature
  37. * [WSFEv1][11]: domestic market (electronic invoice) -[English][12]-
  38. * [WSMTXCA][22]: domestic market (electronic invoice) -detailing articles and barcodes-
  39. * [WSBFEv1][13]: tax bonus (electronic invoice)
  40. * [WSFEXv1][14]: foreign trade (electronic invoice) -[English][15]-
  41. * [WSCTG][16]: agriculture (grain traceability code)
  42. * [WSLPG][17]: agriculture (grain liquidation - invoice)
  43. * [wDigDepFiel][18]: customs (faithful depositary)
  44. * [WSCOC][19]: currency exchange operations autorization
  45. * [WSCDC][22]: invoice verification
  46. * [Taxpayers' Registe][26]: database to check sellers and buyers register
  47. ARBA:
  48. * [COT][20]: Provincial Operation Transport Code (aka electronic Shipping note)
  49. ANMAT/SEDRONAR/SENASA (SNT):
  50. * [TrazaMed][21]: National Medical Drug Traceability Program
  51. * [TrazaRenpre][24]: Controlled Chemical Precursors Traceability Program
  52. * [TrazaFito][25]: Phytosanitary Products Traceability Program
  53. Installation Instructions:
  54. --------------------------
  55. ## Quick-Start
  56. On Ubuntu (GNU/Linux), you will need to install httplib2 and openssl binding.
  57. Then you can download the compressed file, unzip it and use:
  58. ```
  59. sudo apt-get install python-httplib2 python-m2crypto
  60. wget https://pyafipws.googlecode.com/archive/default.zip
  61. unzip default.zip
  62. cd pyafipws-default
  63. sudo pip install -r requirements.txt
  64. ```
  65. **Note:** M2Crypto is optional, the library will use OpenSSL directly (using
  66. subprocess)
  67. ## Virtual environment (testing):
  68. The following commands clone the repository, creates a virtualenv and install
  69. the packages there (including the latest versions of the dependencies) to avoid
  70. conflicts with other libraries:
  71. ```
  72. sudo apt-get install python-dev swig python-virtualenv mercurial python-pip libssl-dev
  73. hg clone https://code.google.com/p/pyafipws
  74. cd pyafipws
  75. virtualenv venv
  76. source venv/bin/activate
  77. pip install -r requirements.txt
  78. ```
  79. ## Dependency installation (development):
  80. For SOAP webservices [PySimpleSOAP](https://code.google.com/p/pysimplesoap/) is
  81. needed (spin-off of this library, inspired by the PHP SOAP extension):
  82. ```
  83. hg clone https://code.google.com/p/pysimplesoap/
  84. cd pysimplesoap
  85. hg update reingart
  86. sudo python setup.py install
  87. ```
  88. For PDF generation, you will need the [PyFPDF](https://code.google.com/p/pyfpdf)
  89. (PHP's FPDF library, python port):
  90. ```
  91. hg clone https://code.google.com/p/pyfpdf/
  92. cd pyfpdf
  93. sudo python setup.py install
  94. ```
  95. For the GUI app, you will need [wxPython](http://www.wxpython.org/):
  96. ```
  97. sudo apt-get install wxpython
  98. ```
  99. PythonCard is being replaced by [gui2py](https://code.google.com/p/gui2py/):
  100. ```
  101. hg clone https://code.google.com/p/gui2py/
  102. cd gui2py
  103. sudo python setup.py install
  104. ```
  105. For the WEB app, you will need [web2py](http://www.web2py.com/).
  106. On Windows, you can see available installers released for evaluation purposes on
  107. [Downloads](https://code.google.com/p/pyafipws/downloads)
  108. For more information see the source code installation steps in the
  109. [wiki](https://code.google.com/p/pyafipws/wiki/InstalacionCodigoFuente)
  110. [1]: http://www.sistemasagiles.com.ar/trac/wiki/FacturaElectronicaPython
  111. [2]: http://www.sistemasagiles.com.ar/trac/wiki/OcxFacturaElectronica
  112. [3]: http://www.sistemasagiles.com.ar/trac/wiki/DllFacturaElectronica
  113. [4]: http://www.sistemasagiles.com.ar/trac/wiki/HerramientaFacturaElectronica
  114. [5]: http://www.sistemasagiles.com.ar/trac/wiki/PyRece
  115. [6]: http://www.sistemasagiles.com.ar/trac/wiki/FacturaLibre
  116. [7]: http://www.sistemasagiles.com.ar/trac/wiki/PyAfipWs
  117. [8]: http://www.sistemasagiles.com.ar/trac/wiki/LibPyAfipWs
  118. [10]: http://www.sistemasagiles.com.ar/trac/wiki/ManualPyAfipWs#ServicioWebdeAutenticaciónyAutorizaciónWSAA
  119. [11]: http://www.sistemasagiles.com.ar/trac/wiki/ProyectoWSFEv1
  120. [12]: https://code.google.com/p/pyafipws/wiki/WSFEv1
  121. [13]: http://www.sistemasagiles.com.ar/trac/wiki/BonosFiscales
  122. [14]: http://www.sistemasagiles.com.ar/trac/wiki/FacturaElectronicaExportacion
  123. [15]: https://code.google.com/p/pyafipws/wiki/WSFEX
  124. [16]: http://www.sistemasagiles.com.ar/trac/wiki/CodigoTrazabilidadGranos
  125. [17]: http://www.sistemasagiles.com.ar/trac/wiki/LiquidacionPrimariaGranos
  126. [18]: http://www.sistemasagiles.com.ar/trac/wiki/ManualPyAfipWs#wDigDepFiel:DepositarioFiel
  127. [19]: http://www.sistemasagiles.com.ar/trac/wiki/ConsultaOperacionesCambiarias
  128. [20]: http://www.sistemasagiles.com.ar/trac/wiki/RemitoElectronicoCotArba
  129. [21]: http://www.sistemasagiles.com.ar/trac/wiki/TrazabilidadMedicamentos
  130. [22]: http://www.sistemasagiles.com.ar/trac/wiki/FacturaElectronicaMTXCAService
  131. [23]: http://www.sistemasagiles.com.ar/trac/wiki/ConstatacionComprobantes
  132. [24]: http://www.sistemasagiles.com.ar/trac/wiki/TrazabilidadPrecursoresQuimicos
  133. [25]: http://www.sistemasagiles.com.ar/trac/wiki/TrazabilidadProductosFitosanitarios
  134. [26]: http://www.sistemasagiles.com.ar/trac/wiki/PadronContribuyentesAFIP
  135. [27]: https://github.com/reingart/openerp_pyafipws
  136. [28]: https://github.com/tryton-ar/account_invoice_ar