Read and insert data using the Twinfield API.
Project description
Twinfield
Python package for reading Twinfield data using the Twinfield API.
Installation
pip install twinfield
Usage
for an extensive list of examples, please checkout the twinfield test suite.
from twinfield import TwinfieldApi
# logging in
tw = TwinfieldApi()
# sending browse request.
df = tw.query_by_year(code="030_1", 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 on the walktrough how to obtain the refresh token and set the app registration.
"TWINFIELD_ORGANISATION"
"TWINFIELD_CLIENT_ID"
"TWINFIELD_CLIENT_SECRET"
"TWINFIELD_REFRESH_TOKEN"
How to set environment variables?
Link to the Twinfield API documentation.
For business inquiries concerning this package, contact us at:
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for twinfield-2.1.0rc1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | e08fb4ddca8f31a265dbef25fd421336c7f376c7cff43d7127a90b0f77917539 |
|
MD5 | ba46a7550f02de0713f4778ebd83c316 |
|
BLAKE2b-256 | 48a723d8d811607dad0624a2fc2f25309657b84681b1d7752c6e8054b5643836 |