Giter Site home page Giter Site logo

islendingabok's Introduction

islendingabok: Library for Islendingabok API

islendingabok is a WTFPL Licensed client library for the Islendingabok API (official documentation), written in Python.

All endpoints have been implemented.

Note that when name is specified in 'find' then search can be further defined stepwise: by year, by month and year, and by day, month and year - but when name is not specified in 'find', then searching by date of birth must contain year, month and day of month.

Example

Login with your username and password:

>>> from islendingabok import IslendingabokAPI
>>> api = IslendingabokAPI(username, password)
>>> user_info = api.me()
>>> print user_info['name']
Ólafur Ragnar Grímsson

Obtain search results by name and look at the results:

>>> results = api.find(u'Vigdís Finnbogadóttir')
>>> for person_info in results:
...     print person_info['name'], person_info['dob'], person_info['id']
... 
Vigdís Finnbogadóttir 19300415 11183155
Vigdís Finnbogadóttir 19830617 10331225
Vigdís Guðrún Finnbogadóttir 19220825 2756144
Kristjana Vigdís Finnbogadóttir Arndal 19390607 10489669

Make your search more detailed:

>>> oli_stef = api.find(u'Ólafur Indriði Stefánsson', 1973, 07)
>>> oli_stef_id = oli_stef[0]["id"]
>>> siblings_of_oli_stef = api.siblings(oli_stef_id)
>>> for sibling in siblings_of_oli_stef:
...     print sibling["name"]
... 
Guðrún Lilja Tryggvadóttir
Agnar Björn Tryggvason
Hildur Jakobína Tryggvadóttir
Stefanía Stefánsdóttir
Eggert Stefánsson
Jón Arnór Stefánsson

Installation

To install the required packages to use this library:

pip install -r requirements.txt

Authors

Stefanía Bjarney Ólafsdóttir and Jóhann Þorvaldur Bergþórsson.

islendingabok's People

Contributors

stefaniabje avatar

Stargazers

Ingibergur Ingibergsson Edduson avatar Donna avatar Skúli Arnlaugsson avatar Jóhann Þorvaldur Bergþórsson avatar

Watchers

Jóhann Þorvaldur Bergþórsson avatar

islendingabok's Issues

Búið að loka á endapunktana?

Er búið að loka á endapunktana? Ætlaði að nýta mér apann í appi sem ég er að smíða, en fæ ekkert response frá requests.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.