Skip to content

Commit

Permalink
Release v0.1.2
Browse files Browse the repository at this point in the history
  • Loading branch information
myslak71 committed Nov 13, 2019
1 parent 69b78aa commit dff01d0
Show file tree
Hide file tree
Showing 7 changed files with 62 additions and 27 deletions.
20 changes: 13 additions & 7 deletions .travis.yml
@@ -1,16 +1,22 @@
---
language: python
python:
- 3.8
- 3.7
sudo: required
dist: xenial
cache: pip
install:
- pip install .[dev]
env:
global:
- MAKEFLAGS="-j 2"
jobs:
include:
- name: "Python 3.7 Linux"
python: 3.7
- name: "Python 3.8 Linux"
python: 3.8
- name: "Python 3.7 macOS"
os: osx
osx_image: xcode11.2
language: shell
install:
- pip3 install --upgrade pip
- pip install .[dev]
script:
- make lint
- make safety
Expand Down
26 changes: 15 additions & 11 deletions README.md
@@ -1,7 +1,7 @@
# Vater
[![Build Status](https://travis-ci.org/myslak71/vater.svg?branch=master)](https://travis-ci.org/myslak71/vater)
[![Coverage Status](https://coveralls.io/repos/github/myslak71/vater/badge.svg?branch=master)](https://coveralls.io/github/myslak71/vater?branch=master)
![image](https://img.shields.io/badge/version-0.1.1-yellow)
![PyPI](https://img.shields.io/pypi/v/vater?color=blue)
[![Documentation Status](https://readthedocs.org/projects/vater/badge/?version=latest)](https://vater.readthedocs.io/en/latest/?badge=latest)

Python client providing convenient way to access polish VAT payers register API (version 1.3.0).
Expand All @@ -17,15 +17,15 @@ Python client providing convenient way to access polish VAT payers register API
```
>>> import vater
>>> client = vater.Client(base_url='https://wl-api.mf.gov.pl')
>>> client.search_nip(nip='1111111111')
>>> client.search_nip(nip='0000000000')
(
Subject(
name='Beastie Boys',
nip='1111111111',
nip='0000000000',
status_vat='Czynny',
regon='111111111',
pesel=None,
krs='1111111111',
krs='0000000000',
residence_address=None,
working_address='Brooklyn',
representatives=[],
Expand All @@ -46,7 +46,7 @@ Python client providing convenient way to access polish VAT payers register API
restoration_date=None,
removal_basis=None,
removal_date=None,
account_numbers=['11111111111111111111111111'],
account_numbers=['00000000000000000000000000'],
has_virtual_accounts=False
),
'z5x71-85a8gl5'
Expand All @@ -56,12 +56,12 @@ Python client providing convenient way to access polish VAT payers register API
If you want to get raw server json just set `raw` to True:

```
>>> client.search_nip(nip='1111111111', raw=True)
>>> client.search_nip(nip='0000000000', raw=True)
{
'result': {
'subject': {
'name': 'Eminem',
'nip': '6969696969',
'nip': '0000000000',
'statusVat': 'Active',
'regon': '777777777',
'pesel': '77777777777',
Expand All @@ -73,7 +73,7 @@ If you want to get raw server json just set `raw` to True:
'companyName': 'Moby Dick Inc',
'firstName': 'sir Richard',
'lastName': 'Lion Heart',
'nip': '6969696969',
'nip': '0000000000',
'pesel': '77777777777'
}
],
Expand All @@ -86,7 +86,7 @@ If you want to get raw server json just set `raw` to True:
'restorationDate': '2003-03-03',
'removalBasis': 'Removal Basis',
'removalDate': '2004-04-04',
'accountNumbers': ['11111111111111111111111111'],
'accountNumbers': ['00000000000000000000000000'],
'hasVirtualAccounts': False
},
'requestId': 'aa111-aa111aaa',
Expand All @@ -98,12 +98,12 @@ By default the data is fetched from today's date,
it can be changed by setting `date` argument:
```
>>> import datetime
>>> client.search_nip(nip='1111111111', date=datetime.date(2001, 1, 1))
>>> client.search_nip(nip='0000000000', date=datetime.date(2001, 1, 1))
```

String may also be passed as a `date`:
```
>>> client.search_nip(nip='1111111111', date='2001-01-01')
>>> client.search_nip(nip='0000000000', date='2001-01-01')
```

Keep in mind the API limits maximum number of requested subjects to 30.
Expand All @@ -123,3 +123,7 @@ Keep in mind the API limits maximum number of requested subjects to 30.

Each command allows to set `--date` parameter formatted as follows `YYYY-MM-DD`.
Default value is today's date.

#### Docs
Project docs may be found here:
https://vater.readthedocs.io
3 changes: 1 addition & 2 deletions docs/conf.py
Expand Up @@ -28,8 +28,6 @@
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
# ones.
extensions = ["sphinx.ext.autodoc", "sphinx_autodoc_typehints", "sphinx_rtd_theme"]
autoapi_type = "python"
autoapi_dirs = ["../src"]
autoclass_content = "both"

# Add any paths that contain templates here, relative to this directory.
Expand All @@ -51,3 +49,4 @@
# relative to this directory. They are copied after the builtin static files,
# so a file named "default.css" will overwrite the builtin "default.css".
html_static_path = ["_static"]
master_doc = "index"
11 changes: 10 additions & 1 deletion docs/index.rst
@@ -1,4 +1,4 @@
vater's documentation!
vater's docs
=================================

.. toctree::
Expand All @@ -10,3 +10,12 @@ vater's documentation!
usage
client
models

Indices and tables
==================

* :ref:`genindex`
* :ref:`modindex`
* :ref:`search`


17 changes: 17 additions & 0 deletions docs/introduction.rst
Expand Up @@ -2,6 +2,23 @@
Introduction
============

.. image:: https://travis-ci.org/myslak71/vater.svg?branch=develop
:target: https://travis-ci.org/myslak71/vater

.. image:: https://coveralls.io/repos/github/myslak71/vater/badge.svg?branch=master
:target: https://coveralls.io/github/myslak71/vater?branch=master

.. image:: https://img.shields.io/pypi/v/vater?color=yellow
:alt: PyPI
:target: https://pypi.org/project/vater/

.. image:: https://readthedocs.org/projects/vater/badge/?version=latest
:target: https://vater.readthedocs.io/en/latest/?badge=latest
:alt: Documentation Status

.. image:: https://img.shields.io/pypi/pyversions/vater
:alt: PyPI - Python Version

vater is python client providing convenient way to access polish VAT payers register API.
Currently supported API version is 1.3.0.

Expand Down
8 changes: 4 additions & 4 deletions docs/usage.rst
Expand Up @@ -5,7 +5,7 @@ Usage
Scripts
'''''''

.. code-block::
.. code-block:: Python
>>> import vater
>>> client = vater.Client(base_url='https://wl-api.mf.gov.pl')
Expand Down Expand Up @@ -46,7 +46,7 @@ Scripts
If you want to get raw server json just set ``raw`` to True:

.. code-block::
.. code-block:: Python
>>> client.search_nip(nip='1111111111', raw=True)
{
Expand Down Expand Up @@ -88,14 +88,14 @@ If you want to get raw server json just set ``raw`` to True:
By default the data is fetched from today's date,
it can be changed by setting ``date`` argument:

.. code-block::
.. code-block:: Python
>>> import datetime
>>> client.search_nip(nip='1111111111', date=datetime.date(2001, 1, 1))
String may also be passed as a ``date``\ :

.. code-block::
.. code-block:: Python
>>> client.search_nip(nip='1111111111', date='2001-01-01')
Expand Down
4 changes: 2 additions & 2 deletions src/vater/__about__.py
@@ -1,12 +1,12 @@
"""vater metadata module."""
__name__ = "vater"
__description__ = "Client for polish VAT payers register API"
__version__ = "0.1.1"
__version__ = "0.1.2"
__author__ = "myslak71"
__author_email__ = "myslak@protonmail.com"
__url__ = "https://github.com/myslak71/vater"
__license__ = "MIT"
__copyright__ = "Copyright 2019 myslak71"
__keywords__ = "vat", "client", "api"
__download_url__ = "https://github.com/myslak71/vater/archive/v0.1.1.tar.gz"
__download_url__ = "https://github.com/myslak71/vater/archive/v0.1.2.tar.gz"
__apiversion__ = "1.3.0"

0 comments on commit dff01d0

Please sign in to comment.