Skip to main content

Python Dawa API

Project description

dawa-sdk

===================

Python - Dawa API

dawa-sdk is a simple client for dawa api. It uses [Dawa Web API](https://dawadocs.dataforsyningen.dk/dok/api. It is mainly designed for data replication, but will at later stages include search.

Installation

pip install dawa-sdk

Using

from dawa import API
api = API()

Replication

def replicate():
    # Due to the amount of data on some endpoint, this returns a generator
def txid():
    # Returns an integer

Usage

# Get current txid and store somewhere
txid = api.txid()

# Get initial replication
vejstykke = api.replicate('vejstykke')

# Get latest txid and check if it is greater than previous
txid = api.txid()

# if yes get all the changes between last and current txid
vejstykke = api.replicate('vejstykke', txidfra='3340338', txidtil='3340338')


# It is also possible to get data from a single txid
vejstykke = api.replicate('vejstykke', txid='3340338')

Search

Not implemented yet

Contributing

https://github.com/Fredehagelund92/dawa-python

Dawa Web API

Dawa Web API Doc

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

dawa-sdk-0.2.5.tar.gz (8.0 kB view details)

Uploaded Source

File details

Details for the file dawa-sdk-0.2.5.tar.gz.

File metadata

  • Download URL: dawa-sdk-0.2.5.tar.gz
  • Upload date:
  • Size: 8.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.2 importlib_metadata/4.0.1 pkginfo/1.7.1 requests/2.23.0 requests-toolbelt/0.9.1 tqdm/4.59.0 CPython/3.7.3

File hashes

Hashes for dawa-sdk-0.2.5.tar.gz
Algorithm Hash digest
SHA256 1f4b999fd5872bfc98811584b27941df607d54389b2e68865e4cbeaed112dedd
MD5 30f1d90a3e6bbe4a77967ea73c67f605
BLAKE2b-256 0d372526ebbbfd937c71c1717b676fd9c7974169ec9e445dce1af77c43cf026a

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