PyAfipWs


NamePyAfipWs JSON
Version 2.7.1874 PyPI version JSON
download
home_pagehttps://github.com/reingart/pyafipws
SummaryInterfases, tools and apps for Argentina's gov't. webservices (soap, com/dll, pdf, dbf, xml, etc.)
upload_time2016-09-10 21:22:03
maintainerNone
docs_urlNone
authorMariano Reingart
requires_pythonNone
licenseGNU GPL v3+
keywords webservice electronic invoice pdf traceability
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage
            pyafipws
========

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.

Copyright 2008 - 2016 (C) Mariano Reingart reingart@gmail.com (creator
and maintainter). All rights reserved.

License: GPLv3+, with "commercial" exception available to include it and
distribute with propietary programs

General Information:
--------------------

-  Main Project Site: https://github.com/reingart/pyafipws (git
   repository)
-  Mirror (Historic): https://code.google.com/p/pyafipws/ (mercurial
   repository)
-  User Manual:
   (http://www.sistemasagiles.com.ar/trac/wiki/ManualPyAfipWs (Spanish)
-  Documentation: https://github.com/reingart/pyafipws/wiki
   (Spanish/English)
-  Commercial Support: http://www.sistemasagiles.com.ar/ (Spanish)
-  Community Site: http://www.pyafipws.com.ar/ (Spanish)
-  Public Forum: http://groups.google.com/group/pyafipws

More information at `Python Argentina Magazine
article <http://revista.python.org.ar/2/en/html/pyafip.html>`__
(English) and `JAIIO 2012
paper <http://www.41jaiio.org.ar/sites/default/files/15_JSL_2012.pdf>`__
(Spanish)

Project Structure:
------------------

-  `Python
   library <http://www.sistemasagiles.com.ar/trac/wiki/FacturaElectronicaPython>`__
   (a helper class for each webservice for easy use of their methods and
   attributes)
-  `PyAfipWs <http://www.sistemasagiles.com.ar/trac/wiki/PyAfipWs>`__:
   `OCX-like <http://www.sistemasagiles.com.ar/trac/wiki/OcxFacturaElectronica>`__
   Windows Component-Object-Model interface compatible with legacy
   programming languages (VB, VFP, Delphi, PHP, VB.NET, etc.)
-  `LibPyAfipWs <http://www.sistemasagiles.com.ar/trac/wiki/LibPyAfipWs>`__:
   `DLL/.so <http://www.sistemasagiles.com.ar/trac/wiki/DllFacturaElectronica>`__
   compiled shared library (exposing python methods to C/C++/C#)
-  `Console <http://www.sistemasagiles.com.ar/trac/wiki/HerramientaFacturaElectronica>`__
   (command line) tools using simplified input & ouput files
-  `PyRece <http://www.sistemasagiles.com.ar/trac/wiki/PyRece>`__ GUI
   and
   `FacturaLibre <http://www.sistemasagiles.com.ar/trac/wiki/FacturaLibre>`__
   WEB apps as complete reference implementations
-  Examples for Java, .NET (C#, VB.NET), Visual Basic, Visual Fox Pro,
   Delphi, C, PHP.
-  Minor code fragment samples for SAP (ABAP), PowerBuilder, Fujitsu Net
   Cobol, Clarion, etc.
-  Modules for
   `OpenERP/Odoo <https://github.com/reingart/openerp_pyafipws>`__ -
   `Tryton <https://github.com/tryton-ar/account_invoice_ar>`__

Features implemented:
---------------------

-  Supported alternate interchange formats: TXT (fixed lenght COBOL),
   CSV, DBF (Clipper/xBase/Harbour), XML, JSON, etc.
-  Full automation to request authentication and invoice authorization
   (CAE, COE, etc.)
-  Advanced XML manipulation, caching and proxy support.
-  Customizable PDF generation and visual designer (CSV templates)
-  Email, barcodes (PIL), installation (NSIS), configuration (.INI),
   debugging and other misc utilities

Web services supported so far:
------------------------------

AFIP:

-  `WSAA <http://www.sistemasagiles.com.ar/trac/wiki/ManualPyAfipWs#ServicioWebdeAutenticaciónyAutorizaciónWSAA>`__:
   authorization & authentication, including digital cryptographic
   signature
-  `WSFEv1 <http://www.sistemasagiles.com.ar/trac/wiki/ProyectoWSFEv1>`__:
   domestic market (electronic invoice)
   -`English <https://github.com/reingart/pyafipws/wiki/WSFEv1>`__-
-  `WSMTXCA <http://www.sistemasagiles.com.ar/trac/wiki/FacturaElectronicaMTXCAService>`__:
   domestic market (electronic invoice) -detailing articles and
   barcodes-
-  `WSBFEv1 <http://www.sistemasagiles.com.ar/trac/wiki/BonosFiscales>`__:
   tax bonus (electronic invoice)
-  `WSFEXv1 <http://www.sistemasagiles.com.ar/trac/wiki/FacturaElectronicaExportacion>`__:
   foreign trade (electronic invoice)
   -`English <https://github.com/reingart/pyafipws/wiki/WSFEX>`__-
-  `WSCTG <http://www.sistemasagiles.com.ar/trac/wiki/CodigoTrazabilidadGranos>`__:
   agriculture (grain traceability code)
-  `WSLPG <http://www.sistemasagiles.com.ar/trac/wiki/LiquidacionPrimariaGranos>`__:
   agriculture (grain liquidation - invoice)
-  `wDigDepFiel <http://www.sistemasagiles.com.ar/trac/wiki/ManualPyAfipWs#wDigDepFiel:DepositarioFiel>`__:
   customs (faithful depositary)
-  `WSCOC <http://www.sistemasagiles.com.ar/trac/wiki/ConsultaOperacionesCambiarias>`__:
   currency exchange operations autorization
-  `WSCDC <http://www.sistemasagiles.com.ar/trac/wiki/FacturaElectronicaMTXCAService>`__:
   invoice verification
-  `Taxpayers'
   Registe <http://www.sistemasagiles.com.ar/trac/wiki/PadronContribuyentesAFIP>`__:
   database to check sellers and buyers register

ARBA:

-  `COT <http://www.sistemasagiles.com.ar/trac/wiki/RemitoElectronicoCotArba>`__:
   Provincial Operation Transport Code (aka electronic Shipping note)

ANMAT/SEDRONAR/SENASA (SNT):

-  `TrazaMed <http://www.sistemasagiles.com.ar/trac/wiki/TrazabilidadMedicamentos>`__:
   National Medical Drug Traceability Program
-  `TrazaRenpre <http://www.sistemasagiles.com.ar/trac/wiki/TrazabilidadPrecursoresQuimicos>`__:
   Controlled Chemical Precursors Traceability Program
-  `TrazaFito <http://www.sistemasagiles.com.ar/trac/wiki/TrazabilidadProductosFitosanitarios>`__:
   Phytosanitary Products Traceability Program

Installation Instructions:
--------------------------

Quick-Start
-----------

On Ubuntu (GNU/Linux), you will need to install httplib2 and openssl
binding. Then you can download the compressed file, unzip it and use:

::

    sudo apt-get install python-httplib2 python-m2crypto
    wget https://github.com/reingart/pyafipws/archive/master.zip
    unzip master.zip
    cd pyafipws-master
    sudo pip install -r requirements.txt

**Note:** M2Crypto is optional, the library will use OpenSSL directly
(using subprocess)

You'll need a digital certificate (.crt) and private key (.key) to
authenticate (see `certificate
generation <http://www.sistemasagiles.com.ar/trac/wiki/ManualPyAfipWs#Certificados>`__
for more information and instructions). Provisionally, you can use
author's testing certificate/key:

::

    wget https://www.sistemasagiles.com.ar/soft/pyafipws/reingart.zip
    unzip reingart.zip

You should configure ``rece.ini`` to set up paths and URLs if using
other values than defaults.

Then, you could execute ``WSAA`` script to authenticate (getting Token
and Sign) and ``WSFEv1`` to process an electronic invoice:

::

    python wsaa.py
    python wsfev1.py --prueba

With the last command, you should get the Electronic Autorization Code
(CAE) for testing purposes (sample invoice data, do not use in
production!).

Virtual environment (testing):
------------------------------

The following commands clone the repository, creates a virtualenv and
install the packages there (including the latest versions of the
dependencies) to avoid conflicts with other libraries:

::

    sudo apt-get install python-dev swig python-virtualenv mercurial python-pip libssl-dev python-dulwich
    hg clone git+https://github.com/reingart/pyafipws.git --config extensions.hggit=
    cd pyafipws
    virtualenv venv
    source venv/bin/activate
    pip install -r requirements.txt

**Note:** For convenience, development is done using mercurial; You
could use `hg-git <http://hg-git.github.io/>`__ or git directly.

Dependency installation (development):
--------------------------------------

For SOAP webservices
`PySimpleSOAP <https://github.com/pysimplesoap/pysimplesoap>`__ is
needed (spin-off of this library, inspired by the PHP SOAP extension):

::

    hg clone git+https://github.com/pysimplesoap/pysimplesoap.git --config extensions.hggit=
    cd pysimplesoap
    hg up reingart
    python setup.py install

Use "stable" branch reingart (see ``requirements.txt`` for more
information)

For PDF generation, you will need the
`PyFPDF <https://github.com/reingart/pyfpdf>`__ (PHP's FPDF library,
python port):

::

    hg clone git+https://github.com/reingart/pyfpdf.git --config extensions.hggit=
    cd pyfpdf
    python setup.py install

For the GUI app, you will need `wxPython <http://www.wxpython.org/>`__:

::

    sudo apt-get install wxpython

PythonCard is being replaced by
`gui2py <https://github.com/reingart/gui2py/>`__:

::

    pip install gui2py

For the WEB app, you will need `web2py <http://www.web2py.com/>`__.

On Windows, you can see available installers released for evaluation
purposes on `Download
Releases <https://github.com/reingart/pyafipws/releases>`__

For more information see the source code installation steps in the
`wiki <https://github.com/reingart/pyafipws/wiki/InstalacionCodigoFuente>`__
            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/reingart/pyafipws",
    "name": "PyAfipWs",
    "maintainer": null,
    "docs_url": null,
    "requires_python": null,
    "maintainer_email": null,
    "keywords": "webservice electronic invoice pdf traceability",
    "author": "Mariano Reingart",
    "author_email": "reingart@gmail.com",
    "download_url": "https://files.pythonhosted.org/packages/07/c3/c11be86d13d875ca23c4e892030f7f973af84f4faef8f5b86d14df326cd7/PyAfipWs-2.7.1874.tar.gz",
    "platform": "UNKNOWN",
    "description": "pyafipws\n========\n\nPyAfipWs contains Python modules to operate with web services regarding\nAFIP (Argentina's \"IRS\") and other government agencies, mainly related\nto electronic invoicing, several taxes and traceability.\n\nCopyright 2008 - 2016 (C) Mariano Reingart reingart@gmail.com (creator\nand maintainter). All rights reserved.\n\nLicense: GPLv3+, with \"commercial\" exception available to include it and\ndistribute with propietary programs\n\nGeneral Information:\n--------------------\n\n-  Main Project Site: https://github.com/reingart/pyafipws (git\n   repository)\n-  Mirror (Historic): https://code.google.com/p/pyafipws/ (mercurial\n   repository)\n-  User Manual:\n   (http://www.sistemasagiles.com.ar/trac/wiki/ManualPyAfipWs (Spanish)\n-  Documentation: https://github.com/reingart/pyafipws/wiki\n   (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\n\nMore information at `Python Argentina Magazine\narticle <http://revista.python.org.ar/2/en/html/pyafip.html>`__\n(English) and `JAIIO 2012\npaper <http://www.41jaiio.org.ar/sites/default/files/15_JSL_2012.pdf>`__\n(Spanish)\n\nProject Structure:\n------------------\n\n-  `Python\n   library <http://www.sistemasagiles.com.ar/trac/wiki/FacturaElectronicaPython>`__\n   (a helper class for each webservice for easy use of their methods and\n   attributes)\n-  `PyAfipWs <http://www.sistemasagiles.com.ar/trac/wiki/PyAfipWs>`__:\n   `OCX-like <http://www.sistemasagiles.com.ar/trac/wiki/OcxFacturaElectronica>`__\n   Windows Component-Object-Model interface compatible with legacy\n   programming languages (VB, VFP, Delphi, PHP, VB.NET, etc.)\n-  `LibPyAfipWs <http://www.sistemasagiles.com.ar/trac/wiki/LibPyAfipWs>`__:\n   `DLL/.so <http://www.sistemasagiles.com.ar/trac/wiki/DllFacturaElectronica>`__\n   compiled shared library (exposing python methods to C/C++/C#)\n-  `Console <http://www.sistemasagiles.com.ar/trac/wiki/HerramientaFacturaElectronica>`__\n   (command line) tools using simplified input & ouput files\n-  `PyRece <http://www.sistemasagiles.com.ar/trac/wiki/PyRece>`__ GUI\n   and\n   `FacturaLibre <http://www.sistemasagiles.com.ar/trac/wiki/FacturaLibre>`__\n   WEB apps as complete reference implementations\n-  Examples for Java, .NET (C#, VB.NET), Visual Basic, Visual Fox Pro,\n   Delphi, C, PHP.\n-  Minor code fragment samples for SAP (ABAP), PowerBuilder, Fujitsu Net\n   Cobol, Clarion, etc.\n-  Modules for\n   `OpenERP/Odoo <https://github.com/reingart/openerp_pyafipws>`__ -\n   `Tryton <https://github.com/tryton-ar/account_invoice_ar>`__\n\nFeatures implemented:\n---------------------\n\n-  Supported alternate interchange formats: TXT (fixed lenght COBOL),\n   CSV, DBF (Clipper/xBase/Harbour), XML, JSON, etc.\n-  Full automation to request authentication and invoice authorization\n   (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),\n   debugging and other misc utilities\n\nWeb services supported so far:\n------------------------------\n\nAFIP:\n\n-  `WSAA <http://www.sistemasagiles.com.ar/trac/wiki/ManualPyAfipWs#ServicioWebdeAutenticaci\u00f3nyAutorizaci\u00f3nWSAA>`__:\n   authorization & authentication, including digital cryptographic\n   signature\n-  `WSFEv1 <http://www.sistemasagiles.com.ar/trac/wiki/ProyectoWSFEv1>`__:\n   domestic market (electronic invoice)\n   -`English <https://github.com/reingart/pyafipws/wiki/WSFEv1>`__-\n-  `WSMTXCA <http://www.sistemasagiles.com.ar/trac/wiki/FacturaElectronicaMTXCAService>`__:\n   domestic market (electronic invoice) -detailing articles and\n   barcodes-\n-  `WSBFEv1 <http://www.sistemasagiles.com.ar/trac/wiki/BonosFiscales>`__:\n   tax bonus (electronic invoice)\n-  `WSFEXv1 <http://www.sistemasagiles.com.ar/trac/wiki/FacturaElectronicaExportacion>`__:\n   foreign trade (electronic invoice)\n   -`English <https://github.com/reingart/pyafipws/wiki/WSFEX>`__-\n-  `WSCTG <http://www.sistemasagiles.com.ar/trac/wiki/CodigoTrazabilidadGranos>`__:\n   agriculture (grain traceability code)\n-  `WSLPG <http://www.sistemasagiles.com.ar/trac/wiki/LiquidacionPrimariaGranos>`__:\n   agriculture (grain liquidation - invoice)\n-  `wDigDepFiel <http://www.sistemasagiles.com.ar/trac/wiki/ManualPyAfipWs#wDigDepFiel:DepositarioFiel>`__:\n   customs (faithful depositary)\n-  `WSCOC <http://www.sistemasagiles.com.ar/trac/wiki/ConsultaOperacionesCambiarias>`__:\n   currency exchange operations autorization\n-  `WSCDC <http://www.sistemasagiles.com.ar/trac/wiki/FacturaElectronicaMTXCAService>`__:\n   invoice verification\n-  `Taxpayers'\n   Registe <http://www.sistemasagiles.com.ar/trac/wiki/PadronContribuyentesAFIP>`__:\n   database to check sellers and buyers register\n\nARBA:\n\n-  `COT <http://www.sistemasagiles.com.ar/trac/wiki/RemitoElectronicoCotArba>`__:\n   Provincial Operation Transport Code (aka electronic Shipping note)\n\nANMAT/SEDRONAR/SENASA (SNT):\n\n-  `TrazaMed <http://www.sistemasagiles.com.ar/trac/wiki/TrazabilidadMedicamentos>`__:\n   National Medical Drug Traceability Program\n-  `TrazaRenpre <http://www.sistemasagiles.com.ar/trac/wiki/TrazabilidadPrecursoresQuimicos>`__:\n   Controlled Chemical Precursors Traceability Program\n-  `TrazaFito <http://www.sistemasagiles.com.ar/trac/wiki/TrazabilidadProductosFitosanitarios>`__:\n   Phytosanitary Products Traceability Program\n\nInstallation Instructions:\n--------------------------\n\nQuick-Start\n-----------\n\nOn Ubuntu (GNU/Linux), you will need to install httplib2 and openssl\nbinding. Then you can download the compressed file, unzip it and use:\n\n::\n\n    sudo apt-get install python-httplib2 python-m2crypto\n    wget https://github.com/reingart/pyafipws/archive/master.zip\n    unzip master.zip\n    cd pyafipws-master\n    sudo pip install -r requirements.txt\n\n**Note:** M2Crypto is optional, the library will use OpenSSL directly\n(using subprocess)\n\nYou'll need a digital certificate (.crt) and private key (.key) to\nauthenticate (see `certificate\ngeneration <http://www.sistemasagiles.com.ar/trac/wiki/ManualPyAfipWs#Certificados>`__\nfor more information and instructions). Provisionally, you can use\nauthor's testing certificate/key:\n\n::\n\n    wget https://www.sistemasagiles.com.ar/soft/pyafipws/reingart.zip\n    unzip reingart.zip\n\nYou should configure ``rece.ini`` to set up paths and URLs if using\nother values than defaults.\n\nThen, you could execute ``WSAA`` script to authenticate (getting Token\nand Sign) and ``WSFEv1`` to process an electronic invoice:\n\n::\n\n    python wsaa.py\n    python wsfev1.py --prueba\n\nWith the last command, you should get the Electronic Autorization Code\n(CAE) for testing purposes (sample invoice data, do not use in\nproduction!).\n\nVirtual environment (testing):\n------------------------------\n\nThe following commands clone the repository, creates a virtualenv and\ninstall the packages there (including the latest versions of the\ndependencies) to avoid conflicts with other libraries:\n\n::\n\n    sudo apt-get install python-dev swig python-virtualenv mercurial python-pip libssl-dev python-dulwich\n    hg clone git+https://github.com/reingart/pyafipws.git --config extensions.hggit=\n    cd pyafipws\n    virtualenv venv\n    source venv/bin/activate\n    pip install -r requirements.txt\n\n**Note:** For convenience, development is done using mercurial; You\ncould use `hg-git <http://hg-git.github.io/>`__ or git directly.\n\nDependency installation (development):\n--------------------------------------\n\nFor SOAP webservices\n`PySimpleSOAP <https://github.com/pysimplesoap/pysimplesoap>`__ is\nneeded (spin-off of this library, inspired by the PHP SOAP extension):\n\n::\n\n    hg clone git+https://github.com/pysimplesoap/pysimplesoap.git --config extensions.hggit=\n    cd pysimplesoap\n    hg up reingart\n    python setup.py install\n\nUse \"stable\" branch reingart (see ``requirements.txt`` for more\ninformation)\n\nFor PDF generation, you will need the\n`PyFPDF <https://github.com/reingart/pyfpdf>`__ (PHP's FPDF library,\npython port):\n\n::\n\n    hg clone git+https://github.com/reingart/pyfpdf.git --config extensions.hggit=\n    cd pyfpdf\n    python setup.py install\n\nFor the GUI app, you will need `wxPython <http://www.wxpython.org/>`__:\n\n::\n\n    sudo apt-get install wxpython\n\nPythonCard is being replaced by\n`gui2py <https://github.com/reingart/gui2py/>`__:\n\n::\n\n    pip install gui2py\n\nFor the WEB app, you will need `web2py <http://www.web2py.com/>`__.\n\nOn Windows, you can see available installers released for evaluation\npurposes on `Download\nReleases <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>`__",
    "bugtrack_url": null,
    "license": "GNU GPL v3+",
    "summary": "Interfases, tools and apps for Argentina's gov't. webservices (soap, com/dll, pdf, dbf, xml, etc.)",
    "version": "2.7.1874",
    "split_keywords": [
        "webservice",
        "electronic",
        "invoice",
        "pdf",
        "traceability"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "07c3c11be86d13d875ca23c4e892030f7f973af84f4faef8f5b86d14df326cd7",
                "md5": "a8638264810892fec450e25d568638ce",
                "sha256": "e619f43c967066f780af43baf5f5f9fc293e730fbab4605dadf1c2e2f4adab9e"
            },
            "downloads": -1,
            "filename": "PyAfipWs-2.7.1874.tar.gz",
            "has_sig": false,
            "md5_digest": "a8638264810892fec450e25d568638ce",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": null,
            "size": 336531,
            "upload_time": "2016-09-10T21:22:03",
            "upload_time_iso_8601": "2016-09-10T21:22:03.435498Z",
            "url": "https://files.pythonhosted.org/packages/07/c3/c11be86d13d875ca23c4e892030f7f973af84f4faef8f5b86d14df326cd7/PyAfipWs-2.7.1874.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2016-09-10 21:22:03",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "github_user": "reingart",
    "github_project": "pyafipws",
    "travis_ci": false,
    "coveralls": true,
    "github_actions": true,
    "requirements": [],
    "lcname": "pyafipws"
}
        
Elapsed time: 0.13689s