Skip to main content

Python client library for the Fakturownia API

Project description

Python client library for the Fakturownia API

https://img.shields.io/pypi/v/fakturownia-python.svg https://img.shields.io/travis/wooyek/fakturownia-python.svg Documentation Status Coveralls.io coverage CodeCov coverage Maintainability License Tweet about this project https://img.shields.io/badge/Say%20Thanks-!-1EAEDB.svg

Features

  • ☑ Invoice CRUD plus send_by_email and ‘mark_paid`

  • ☑ ApiClient CRUD

  • ☐ Products CRUD

  • ☐ Warehouse documents CRUD

  • ☐ Accounts management

Please refer to the fakturownia APIs for full API features

Quickstart

Install Fakturownia

pip install fakturownia-python python

Play with fakturownia APIs in python interpreter:

>>> import os
>>> os.environ.get('FAKTUROWNIA_API_TOKEN', 'Missing key')
'...'
>>> from fakturownia import get_api_client
>>> api = get_api_client()
>>> invoice = api.invoices.create(
...     seller_name='Kabaret Starszych Panów',
...     buyer_name='Odrażający drab',
...     positions=[{
...         'name': 'Smolna szczapa',
...         'quantity': 5,
...         'total_price_gross': 7.33,
...     }],
... )

This instance is only partially updated as create returns only subset of data properties, to get all we need to update our instance.

This shows payment_url but only if you have payments enabled:

>>> invoice.get()
<fakturownia.endpoints.Invoice object at 0x...>
>>> invoice.payment_url  # doctest: +SKIP
'...'

We can mark this invoice as paid:

>>> invoice.mark_paid()
<fakturownia.endpoints.Invoice object at 0x...>

You can chain your calls:

>>> invoice.put(buyer_email='kominek@niepodam.pl').send_by_email()
<fakturownia.endpoints.Invoice object at 0x...>

Running Tests

Does the code actually work?

pipenv install --dev
pipenv shell
tox

We recommend using pipenv but a legacy approach to creating virtualenv and installing requirements should also work. Please install requirements/base.txt and requirements/development.txt to setup virtual env for testing and development.

Help wanted

This library is not yet complete i does what was needed by up to date contributors but more can be done. You can implement new api endpoints and write test for them, it’s actually straightforward and new classes are will be simple, but test are need some effort. We are lazy test writers and because we don’t want to compromise coverage so we postponed new apis until someone would want to write test.

For more If want to help please refer to the contributing section in the docs

Credits

This package was created with Cookiecutter and the wooyek/cookiecutter-pylib project template.

History

0.1.0 (2018-01-03)

  • First release on PyPI.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

fakturownia-0.1.2.tar.gz (59.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

fakturownia-0.1.2-py2.py3-none-any.whl (13.1 kB view details)

Uploaded Python 2Python 3

File details

Details for the file fakturownia-0.1.2.tar.gz.

File metadata

  • Download URL: fakturownia-0.1.2.tar.gz
  • Upload date:
  • Size: 59.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for fakturownia-0.1.2.tar.gz
Algorithm Hash digest
SHA256 3f689952541546cb94996faec750076efb94a18868344faabd2eaac5f2535a13
MD5 2f744abe6085313c1033440f73f5c425
BLAKE2b-256 c4772210f886e61de101c8910f8278000ac82693c24f16f50a178e632470711c

See more details on using hashes here.

File details

Details for the file fakturownia-0.1.2-py2.py3-none-any.whl.

File metadata

File hashes

Hashes for fakturownia-0.1.2-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 18809087ddd2fddd065c954c4e4064688d23a274ebdd664cc8a04d5ecf73fca8
MD5 402327c57ec548506204f73800fa69ff
BLAKE2b-256 3bbd3ab8ecf26687e731bbd17697948312e36ea5249f9bc334424c3d11a23df1

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page