A simple Django app to fetch and parse data from Dataporten.
Project description
Django-dataporten is a simple Django app to fetch data from dataporten and connect it to a user.
Quick start
Add “dataporten” to your INSTALLED_APPS setting like this
INSTALLED_APPS = [
...
'dataporten',
]
Run python manage.py migrate to create the dataporten proxy models.
In your settings.py file, add the variable DATAPORTEN_TOKEN_FUNCTION, which should be a dotted path to the function that will retrieve user tokens. The function should accept a
User
and return astr
. Here is a python3.6 example that will work if you use django-allauth:
def allauth_token(user: User) -> str:
return SocialToken.objects.get(
account__user=user,
account__provider='dataporten',
).token
Run tests
export DJANGO_SETTINGS_MODULE=dataporten.settings
pytest
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
django-dataporten-0.2.1.tar.gz
(12.8 kB
view hashes)
Built Distribution
Close
Hashes for django_dataporten-0.2.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 048fd358b46332416e7356ba06a366fcc4223bd3c9971c6456238f84ba5832fc |
|
MD5 | 576763176c8badf487a77366ff6c74b0 |
|
BLAKE2b-256 | eb02414c2c4e43e145daf73122b2a79a02690fcaf5f47ab5dd1ce92dc6802ee0 |