Metadata-Version: 2.1
Name: pyvieser
Version: 0.0.4
Summary: A wrapper API of VIES VAT web service
Home-page: https://github.com/agilegeeks/pyVies
Author: Radu Boncea
Author-email: radu.boncea@gmail.com
License: UNKNOWN
Platform: UNKNOWN
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: Intended Audience :: Financial and Insurance Industry
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 2.7
Classifier: Programming Language :: Python :: 3.0
Classifier: Programming Language :: Python :: 3.1
Classifier: Programming Language :: Python :: 3.2
Classifier: Programming Language :: Python :: 3.3
Classifier: Programming Language :: Python :: 3.4
Classifier: Programming Language :: Python :: 3.5
Classifier: Programming Language :: Python :: 3.6
Classifier: Topic :: Database :: Front-Ends
Classifier: Topic :: Office/Business :: Financial :: Accounting
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Classifier: Topic :: Utilities
Requires-Python: >=2.7
Description-Content-Type: text/markdown
License-File: LICENSE
License-File: AUTHORS

# A wrapper API of VIES VAT web service

## Compatibility
Requires Python 2.7 or greater.
Has been tested on 2.7, 3.4 and 3.6

## Installation

    $ pip install pyvieser

## Usage

##### Python API:

```python
from pyVies import api

try:
    vies = api.Vies()
    result = vies.request('RO2785503', 'RO', extended_info=True)

    # works as well
    # result = vies.request('RO2785503')
    # result = vies.request('RO2785503', 'RO')

except api.ViesValidationError as e:
    print (e)
except api.ViesHTTPError as e:
    print (e)
except api.ViesError as e:
    print (e)
else:
    print (result)
    print (result.vatNumber)
    print(result.valid)


# You may also use clean to extract vat number and country code
# The line bellow would print ('2785503', 'RO')

print (vies.clean('RO2785503'))

```

##### From console:

	$ pyvies <vat_number>

The number should start with the country code.
For python3 you might have to set python encoding for your environment (e.g. export PYTHONIOENCODING=utf-8).


