@@ -3,24 +3,20 @@ pyafipws
33
44PyAfipWs 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.
55
6- Copyright 2008 -
2016 (C) Mariano Reingart
[ [email protected] ] ( mailto:[email protected] ) (creator and maintainter). All rights reserved.
6+ Copyright 2008 -
2022 (C) Mariano Reingart
[ [email protected] ] ( mailto:[email protected] ) (creator and maintainter). All rights reserved.
77
8- License: GPLv3 +, with "commercial" exception available to include it and distribute with propietary programs
8+ License: LGPLv3 +, with "commercial" exception available to include it and distribute with propietary programs
99
1010General Information:
1111--------------------
1212
1313 * Main Project Site: https://github.com/reingart/pyafipws (git repository)
14- * Mirror (Historic): https://code.google.com/p/pyafipws/ (mercurial repository)
1514 * User Manual: (http://www.sistemasagiles.com.ar/trac/wiki/ManualPyAfipWs (Spanish)
1615 * Documentation: https://github.com/reingart/pyafipws/wiki (Spanish/English)
1716 * Commercial Support: http://www.sistemasagiles.com.ar/ (Spanish)
1817 * Community Site: http://www.pyafipws.com.ar/ (Spanish)
1918 * Public Forum: http://groups.google.com/group/pyafipws (community support, no-charge "gratis" access)
2019
21- More information at [ Python Argentina Magazine article] ( http://revista.python.org.ar/2/en/html/pyafip.html ) (English)
22- and [ JAIIO 2012 paper] ( http://41jaiio.sadio.org.ar/sites/default/files/15_JSL_2012.pdf ) (Spanish)
23-
2420Project Structure:
2521------------------
2622
5854 * [ WSLTV] [ 17b ] : agriculture (green tobacco - invoice)
5955 * [ WSLUM] [ 17c ] : agriculture (milk - invoice)
6056 * [ WSLSP] [ 17d ] : agriculture (cattle/livestock - invoice)
61- * [ wDigDepFiel] [ 18 ] : customs (faithful depositary)
62- * [ WSCOC] [ 19 ] : currency exchange operations autorization
6357 * [ WSCDC] [ 22 ] : invoice verification
6458 * [ Taxpayers' Registe] [ 26 ] : database to check sellers and buyers register
6559
@@ -76,39 +70,45 @@ ANMAT/SEDRONAR/SENASA (SNT):
7670Installation Instructions:
7771--------------------------
7872
73+ Notes:
74+ * Python 3.9 is recommended for new apps: https://www.python.org/downloads/
75+ * Python 2.7 is still supported for legacy apps but compatibility will be removed soon
76+
77+ You could see the ` .github ` directory for detailed workflows and automated commands to build the project.
78+
7979## Quick-Start
8080
81- On Ubuntu (GNU/Linux), you will need to install httplib2 and openssl binding.
82- Then you can download the compressed file, unzip it and use:
81+ These instructions are for Ubuntu/Debian. In Windows you can use PowerShell.
8382
83+ You can download the compressed file: https://github.com/reingart/pyafipws/archive/main.zip and unzip it.
84+
85+ Then install dependencies and the project itself:
8486```
85- sudo apt-get install python-httplib2 python-m2crypto
86- wget https://github.com/reingart/pyafipws/archive/master. zip
87- unzip master.zip
88- cd pyafipws-master
89- sudo pip install -r requirements.txt
87+ pip download https://github.com/reingart/pyafipws/archive/main.zip
88+ python -m zipfile -e main. zip .
89+ cd pyafipws-main
90+ pip install -r requirements.txt --user
91+ python setup.py install
9092```
9193
92- ** Note:** M2Crypto is optional, the library will use OpenSSL directly (using
93- subprocess)
94-
9594You'll need a digital certificate (.crt) and private key (.key) to authenticate
9695(see [ certificate generation] [ 29 ] for more information and instructions).
9796Provisionally, you can use author's testing certificate/key:
98-
9997```
100- wget https://www.sistemasagiles.com.ar/soft/pyafipws/reingart.zip
101- unzip reingart.zip
98+ wget https://www.sistemasagiles.com.ar/soft/pyafipws/reingart.zip -O reingart.zip
99+ python -m zipfile -e reingart.zip .
102100```
103101
104- You should configure ` rece.ini ` to set up paths and URLs if using other values
105- than defaults.
102+ You should copy and configure ` rece.ini ` to set up paths and URLs:
103+ ```
104+ cp conf/*.ini .
105+ ```
106106
107107Then, you could execute ` WSAA ` script to authenticate (getting Token and Sign)
108108and ` WSFEv1 ` to process an electronic invoice:
109109```
110- python wsaa.py
111- python wsfev1.py --prueba
110+ python -m pyafipws.wsaa
111+ python -m pyafipws.wsfev1 --prueba
112112```
113113
114114With the last command, you should get the Electronic Autorization Code (CAE)
@@ -120,52 +120,42 @@ The following commands clone the repository, creates a virtualenv and install
120120the packages there (including the latest versions of the dependencies) to avoid
121121conflicts with other libraries:
122122```
123- sudo apt-get install python-dev swig python-virtualenv mercurial python-pip libssl-dev python-dulwich
124- hg clone git+https://github.com/reingart/pyafipws.git --config extensions.hggit=
123+ git clone https://github.com/reingart/pyafipws.git
125124cd pyafipws
126- virtualenv venv
127- source venv/bin/activate
125+ python -m venv . venv
126+ . . venv/bin/activate
128127pip install -r requirements.txt
128+ pip install -r requirements-dev.txt
129129```
130130
131- ** Note:** For convenience, development is done using mercurial;
132- You could use [ hg-git] [ 30 ] or git directly.
131+ Run ` python setup_win.py py2exe ` to build in windows and "compile" executables.
132+ See the GitHub Actions for specific steps and more details.
133+
134+ Just execute ` pytest ` to run automated Python tests.
135+ For Windows, see ` tests/powershell ` directory for Pester tests.
133136
134137## Dependency installation (development):
135138
136139For SOAP webservices [ PySimpleSOAP] ( https://github.com/pysimplesoap/pysimplesoap ) is
137140needed (spin-off of this library, inspired by the PHP SOAP extension):
138141
139142```
140- hg clone git+ https://github.com/pysimplesoap/pysimplesoap.git --config extensions.hggit=
143+ git clone https://github.com/pysimplesoap/pysimplesoap.git -b stable_py3k
141144cd pysimplesoap
142- hg up reingart
143145python setup.py install
144146```
145147
146- Use "stable " branch reingart (see ` requirements.txt ` for more information)
148+ Use "stable_py3k " branch reingart (see ` requirements.txt ` for more information)
147149
148150For PDF generation, you will need the [ PyFPDF] ( https://github.com/reingart/pyfpdf )
149151(PHP's FPDF library, python port):
150152
151153```
152- hg clone git+ https://github.com/reingart/pyfpdf.git --config extensions.hggit=
154+ git clone https://github.com/reingart/pyfpdf.git
153155cd pyfpdf
154156python setup.py install
155157```
156158
157- For the GUI app, you will need [ wxPython] ( http://www.wxpython.org/ ) :
158- ```
159- sudo apt-get install wxpython
160- ```
161-
162- PythonCard is being replaced by [ gui2py] ( https://github.com/reingart/gui2py/ ) :
163- ```
164- pip install gui2py
165- ```
166-
167- For the WEB app, you will need [ web2py] ( http://www.web2py.com/ ) .
168-
169159On Windows, you can see available installers released for evaluation purposes on
170160[ Download Releases] ( https://github.com/reingart/pyafipws/releases )
171161
@@ -192,8 +182,6 @@ For more information see the source code installation steps in the
192182 [ 17b ] : http://www.sistemasagiles.com.ar/trac/wiki/LiquidacionTabacoVerde
193183 [ 17c ] : http://www.sistemasagiles.com.ar/trac/wiki/LiquidacionUnicaMensualLecheria
194184 [ 17d ] : http://www.sistemasagiles.com.ar/trac/wiki/LiquidacionSectorPecuario
195- [ 18 ] : http://www.sistemasagiles.com.ar/trac/wiki/ManualPyAfipWs#wDigDepFiel:DepositarioFiel
196- [ 19 ] : http://www.sistemasagiles.com.ar/trac/wiki/ConsultaOperacionesCambiarias
197185 [ 20 ] : http://www.sistemasagiles.com.ar/trac/wiki/RemitoElectronicoCotArba
198186 [ 21 ] : http://www.sistemasagiles.com.ar/trac/wiki/TrazabilidadMedicamentos
199187 [ 22 ] : http://www.sistemasagiles.com.ar/trac/wiki/FacturaElectronicaMTXCAService
@@ -205,4 +193,3 @@ For more information see the source code installation steps in the
205193 [ 27 ] : https://github.com/reingart/openerp_pyafipws
206194 [ 28 ] : https://github.com/tryton-ar/account_invoice_ar
207195 [ 29 ] : http://www.sistemasagiles.com.ar/trac/wiki/ManualPyAfipWs#Certificados
208- [ 30 ] : http://hg-git.github.io/
0 commit comments