twinfield


Nametwinfield JSON
Version 2.1.2 PyPI version JSON
download
home_pagehttps://github.com/zypp-io/twinfield
SummaryRead and insert data using the Twinfield API.
upload_time2023-09-28 09:48:35
maintainer
docs_urlNone
authorZypp
requires_python>=3.7
license
keywords python twinfield api
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            <p align="center"><img alt="logo" src="https://www.zypp.io/static/assets/img/logos/zypp/white/500px.png" width="200"></p>

[![Downloads](https://pepy.tech/badge/twinfield)](https://pepy.tech/project/twinfield)
[![Open Source](https://badges.frapsoft.com/os/v1/open-source.svg?v=103)](https://opensource.org/)
[![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black)
[![PyPI](https://img.shields.io/pypi/v/twinfield)](https://pypi.org/project/twinfield/)
[![Latest release](https://badgen.net/github/release/zypp-io/twinfield)](https://github.com/zypp-io/twinfield/releases)

Twinfield
====

---
> Python package for reading Twinfield data using the Twinfield API.

## Installation

---
```commandline
pip install twinfield
```

## Usage
for an extensive list of examples, please checkout the [twinfield test suite](twinfield/tests/test_twinfield.py).

```python
from twinfield import TwinfieldApi

# logging in
tw = TwinfieldApi()

# sending browse request.
df = tw.query_by_year(code="030_3", year=2021)

# sending dimensions request
df = tw.dimensions(dim_type="CRD")
```
## required environment variables
Twinfield works with OpenID Connect. OpenID Connect is a simple identity layer on top of the OAuth 2.0 protocol.
In order to authenticate with the twinfield server, the following environment variables must be set. Please see the
[Twinfield webservice documentation](https://accounting.twinfield.com/webservices/documentation/#/ApiReference/Authentication/OpenIdConnect)
on the walktrough how to obtain the refresh token and set the app registration.

```shell
"TWINFIELD_ORGANISATION"
"TWINFIELD_CLIENT_ID"
"TWINFIELD_CLIENT_SECRET"
"TWINFIELD_REFRESH_TOKEN"
```

How to set environment variables?
- [Windows](https://stackoverflow.com/questions/5898131/set-a-persistent-environment-variable-from-cmd-exe)
- [macOS](https://apple.stackexchange.com/questions/106778/how-do-i-set-environment-variables-on-os-x)
- [Linux](https://unix.stackexchange.com/questions/117467/how-to-permanently-set-environmental-variables)

---

## api scoping (security) advice
Please note that there are different levels of API access in Twinfield app's. It is recommended to use level 3 access over level 1 access.
Level 3 is sufficient for working with the dataservices.

### Twinfield deprecation notices
- The module salesinvoice is only to be used if invoices need to be generated. If only the transaction registration is necessary, use the transactions endpoint.
- modules have versions, for instance the 030 module can be pulled with suffix _1 or _3. It is advised to use the latest version because the speed of the requests is greater.


---

[Link](https://www.twinfield.nl/api) to the Twinfield API documentation.

---

For business inquiries concerning this package, contact us at:
- melvin@zypp.io
- erfan@zypp.io

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/zypp-io/twinfield",
    "name": "twinfield",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.7",
    "maintainer_email": "",
    "keywords": "python,twinfield,API",
    "author": "Zypp",
    "author_email": "hello@zypp.io",
    "download_url": "https://files.pythonhosted.org/packages/37/b9/31cdf1febc5fb3cbc112b3600c073da0f779e0c8adf3e14c7026d559a8c5/twinfield-2.1.2.tar.gz",
    "platform": null,
    "description": "<p align=\"center\"><img alt=\"logo\" src=\"https://www.zypp.io/static/assets/img/logos/zypp/white/500px.png\" width=\"200\"></p>\n\n[![Downloads](https://pepy.tech/badge/twinfield)](https://pepy.tech/project/twinfield)\n[![Open Source](https://badges.frapsoft.com/os/v1/open-source.svg?v=103)](https://opensource.org/)\n[![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black)\n[![PyPI](https://img.shields.io/pypi/v/twinfield)](https://pypi.org/project/twinfield/)\n[![Latest release](https://badgen.net/github/release/zypp-io/twinfield)](https://github.com/zypp-io/twinfield/releases)\n\nTwinfield\n====\n\n---\n> Python package for reading Twinfield data using the Twinfield API.\n\n## Installation\n\n---\n```commandline\npip install twinfield\n```\n\n## Usage\nfor an extensive list of examples, please checkout the [twinfield test suite](twinfield/tests/test_twinfield.py).\n\n```python\nfrom twinfield import TwinfieldApi\n\n# logging in\ntw = TwinfieldApi()\n\n# sending browse request.\ndf = tw.query_by_year(code=\"030_3\", year=2021)\n\n# sending dimensions request\ndf = tw.dimensions(dim_type=\"CRD\")\n```\n## required environment variables\nTwinfield works with OpenID Connect. OpenID Connect is a simple identity layer on top of the OAuth 2.0 protocol.\nIn order to authenticate with the twinfield server, the following environment variables must be set. Please see the\n[Twinfield webservice documentation](https://accounting.twinfield.com/webservices/documentation/#/ApiReference/Authentication/OpenIdConnect)\non the walktrough how to obtain the refresh token and set the app registration.\n\n```shell\n\"TWINFIELD_ORGANISATION\"\n\"TWINFIELD_CLIENT_ID\"\n\"TWINFIELD_CLIENT_SECRET\"\n\"TWINFIELD_REFRESH_TOKEN\"\n```\n\nHow to set environment variables?\n- [Windows](https://stackoverflow.com/questions/5898131/set-a-persistent-environment-variable-from-cmd-exe)\n- [macOS](https://apple.stackexchange.com/questions/106778/how-do-i-set-environment-variables-on-os-x)\n- [Linux](https://unix.stackexchange.com/questions/117467/how-to-permanently-set-environmental-variables)\n\n---\n\n## api scoping (security) advice\nPlease note that there are different levels of API access in Twinfield app's. It is recommended to use level 3 access over level 1 access.\nLevel 3 is sufficient for working with the dataservices.\n\n### Twinfield deprecation notices\n- The module salesinvoice is only to be used if invoices need to be generated. If only the transaction registration is necessary, use the transactions endpoint.\n- modules have versions, for instance the 030 module can be pulled with suffix _1 or _3. It is advised to use the latest version because the speed of the requests is greater.\n\n\n---\n\n[Link](https://www.twinfield.nl/api) to the Twinfield API documentation.\n\n---\n\nFor business inquiries concerning this package, contact us at:\n- melvin@zypp.io\n- erfan@zypp.io\n",
    "bugtrack_url": null,
    "license": "",
    "summary": "Read and insert data using the Twinfield API.",
    "version": "2.1.2",
    "project_urls": {
        "Bug Reports": "https://github.com/zypp-io/twinfield/issues",
        "Homepage": "https://github.com/zypp-io/twinfield",
        "Source": "https://github.com/zypp-io/twinfield"
    },
    "split_keywords": [
        "python",
        "twinfield",
        "api"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "4465e3e67e8cf78a70e9ef72a8ad2727d6167e9ddff7b75861fb2fd521caf95f",
                "md5": "382fc9ec0a735a3d6e2af0beae2ac3f6",
                "sha256": "a753d75e7e6ee2611d4549a3380e0168656e3022da4b2c9f3f5f2f788f175223"
            },
            "downloads": -1,
            "filename": "twinfield-2.1.2-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "382fc9ec0a735a3d6e2af0beae2ac3f6",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.7",
            "size": 21391,
            "upload_time": "2023-09-28T09:48:34",
            "upload_time_iso_8601": "2023-09-28T09:48:34.440511Z",
            "url": "https://files.pythonhosted.org/packages/44/65/e3e67e8cf78a70e9ef72a8ad2727d6167e9ddff7b75861fb2fd521caf95f/twinfield-2.1.2-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "37b931cdf1febc5fb3cbc112b3600c073da0f779e0c8adf3e14c7026d559a8c5",
                "md5": "5af0c61c7533c345f026c4227064a24c",
                "sha256": "4aa4214376fa95b458eb5a7d06bce6c265b5a9f6d81b42a86301b9efd14cef5a"
            },
            "downloads": -1,
            "filename": "twinfield-2.1.2.tar.gz",
            "has_sig": false,
            "md5_digest": "5af0c61c7533c345f026c4227064a24c",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.7",
            "size": 17905,
            "upload_time": "2023-09-28T09:48:35",
            "upload_time_iso_8601": "2023-09-28T09:48:35.768008Z",
            "url": "https://files.pythonhosted.org/packages/37/b9/31cdf1febc5fb3cbc112b3600c073da0f779e0c8adf3e14c7026d559a8c5/twinfield-2.1.2.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-09-28 09:48:35",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "zypp-io",
    "github_project": "twinfield",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "requirements": [],
    "lcname": "twinfield"
}
        
Elapsed time: 0.12213s