All Projects → reingart → Pyafipws

reingart / Pyafipws

Licence: gpl-3.0
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

Programming Languages

python
139335 projects - #7 most used programming language
java
68154 projects - #9 most used programming language

Projects that are alternatives of or similar to Pyafipws

cxf-spring-boot-starter
Enterprise & production ready SOAP webservices powered by Spring Boot & Apache CXF
Stars: ✭ 129 (-34.85%)
Mutual labels:  webservice, soap
Ulfius
Web Framework to build REST APIs, Webservices or any HTTP endpoint in C language. Can stream large amount of data, integrate JSON data with Jansson, and create websocket services
Stars: ✭ 666 (+236.36%)
Mutual labels:  webservice, json
Cppwebframework
​The C++ Web Framework (CWF) is a MVC web framework, Open Source, under MIT License, using C++ with Qt to be used in the development of web applications.
Stars: ✭ 348 (+75.76%)
Mutual labels:  webservice, json
Goesp
Cross-platform streamproof ESP hack for Counter-Strike: Global Offensive, written in modern C++. Rendering and GUI powered by Dear ImGui.
Stars: ✭ 210 (+6.06%)
Mutual labels:  json, dll
Invoice As A Service
💰 Simple invoicing service (REST API): from JSON to PDF
Stars: ✭ 106 (-46.46%)
Mutual labels:  invoice, json
Zerocode
A community-developed, free, open source, microservices API automation and load testing framework built using JUnit core runners for Http REST, SOAP, Security, Database, Kafka and much more. Zerocode Open Source enables you to create, change, orchestrate and maintain your automated test cases declaratively with absolute ease.
Stars: ✭ 482 (+143.43%)
Mutual labels:  soap, json
Servicestack
Thoughtfully architected, obscenely fast, thoroughly enjoyable web services for all
Stars: ✭ 4,976 (+2413.13%)
Mutual labels:  soap, json
Php Sdicoop Client
A PHP package for connecting to Italian Exchange System (aka SdI) web services. (Pacchetto PHP per inviare fatture e notifiche ai webservices del SdI).
Stars: ✭ 14 (-92.93%)
Mutual labels:  soap, invoice
Wsdl Creator
PHP WSDL Creator using PHPdoc (annotations, reflections).
Stars: ✭ 79 (-60.1%)
Mutual labels:  webservice, soap
Spyne
A transport agnostic sync/async RPC library that focuses on exposing services with a well-defined API using popular protocols.
Stars: ✭ 992 (+401.01%)
Mutual labels:  soap, json
Soap Client
PHP implementation of SOAP 1.1 and 1.2 client specifications
Stars: ✭ 166 (-16.16%)
Mutual labels:  webservice, soap
Osiris
Free open-source game cheat for Counter-Strike: Global Offensive, written in modern C++. GUI powered by Dear ImGui.
Stars: ✭ 1,851 (+834.85%)
Mutual labels:  json, dll
Afip.php
Libreria para usar los Web Services de AFIP
Stars: ✭ 171 (-13.64%)
Mutual labels:  webservice, soap
X3daudio1 7 hrtf
HRTF for Arma 3, Skyrim, and other titles that use XAudio2 + X3DAudio
Stars: ✭ 192 (-3.03%)
Mutual labels:  dll
Validation
validation api extracted from play
Stars: ✭ 194 (-2.02%)
Mutual labels:  json
Csmodel
CSModel is a concise and efficient model framework for iOS/OSX, and provides nested Model to compare values and copy values.
Stars: ✭ 192 (-3.03%)
Mutual labels:  json
Json Schema Spec
The JSON Schema I-D sources
Stars: ✭ 2,441 (+1132.83%)
Mutual labels:  json
Hana
An implementation of JSON Patch and JSON Pointer
Stars: ✭ 196 (-1.01%)
Mutual labels:  json
Swagger Toolbox
💡 Swagger schema model (in yaml, json) generator from json data
Stars: ✭ 194 (-2.02%)
Mutual labels:  json
Jsonapi Utils
Build JSON API-compliant APIs on Rails with no (or less) learning curve.
Stars: ✭ 191 (-3.54%)
Mutual labels:  json

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 [email protected] (creator and maintainter). All rights reserved.

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

General Information:

More information at Python Argentina Magazine article (English) and JAIIO 2012 paper (Spanish)

Project Structure:

  • Python library (a helper class for each webservice for easy use of their methods and attributes)
  • PyAfipWs: OCX-like Windows Component-Object-Model interface compatible with legacy programming languages (VB, VFP, Delphi, PHP, VB.NET, etc.)
  • LibPyAfipWs: DLL/.so compiled shared library (exposing python methods to C/C++/C#)
  • Console (command line) tools using simplified input & ouput files (TXT, DBF, JSON)
  • PyRece GUI and 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 - Tryton

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: authorization & authentication, including digital cryptographic signature
  • WSFEv1: domestic market (electronic invoice) -English-
  • WSMTXCA: domestic market (electronic invoice) -detailing articles and barcodes-
  • WSCT: tourism (electronic invoice) -"tax free" VAT refund for tourists-
  • WSBFEv1: tax bonus (electronic invoice)
  • WSFEXv1: foreign trade (electronic invoice) -English-
  • WSCTG: agriculture (grain traceability code)
  • WSLPG: agriculture (grain liquidation - invoice)
  • WSLTV: agriculture (green tobacco - invoice)
  • WSLUM: agriculture (milk - invoice)
  • WSLSP: agriculture (cattle/livestock - invoice)
  • WSRemCarne: agriculture (meat - shipping note)
  • wDigDepFiel: customs (faithful depositary)
  • WSCOC: currency exchange operations autorization
  • WSCDC: invoice verification
  • Taxpayers' Registe: database to check sellers and buyers register
  • WSFECred: electronic credit invoice (FCE)

ARBA:

  • COT: Provincial Operation Transport Code (aka electronic Shipping note)

ANMAT/SEDRONAR/SENASA (SNT):

  • TrazaMed: National Medical Drug Traceability Program
  • TrazaRenpre: Controlled Chemical Precursors Traceability Program
  • TrazaFito: 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 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 or git directly.

Dependency installation (development):

For SOAP webservices 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 (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:

sudo apt-get install wxpython

PythonCard is being replaced by gui2py:

pip install gui2py

For the WEB app, you will need web2py.

On Windows, you can see available installers released for evaluation purposes on Download Releases

For more information see the source code installation steps in the wiki

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].