Skip to content

influenzanet/python-influenzanet-api

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

36 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Influenzanet API Library

influenzanet.api is a python library to work with influenzanet API

Installation

pip install influenzanet.api

Contents

  • ManagementAPIClient : is the main class handling connection and operations of the platform's Management API

Paginated Helpers

Some helpers class are provided to handle the pagination and iter over fetched results using for ... in

  • ParticpantStatePaginaged : call get_participant_state_paginated with pagi
from influenzanet.api import ManagementAPIClient, ParticpantStatePaginaged

client = ManagementAPIClient('https://admin.example.com', credentials)

pager = ParticpantStatePaginaged(client, page_size=5, study_key='my_study')

# By default, intial page is 1, but it's possible to change it using
# pager.page = 10 # start from page 10 (you must be sure of the page count...)

for result in pager:
    print("Fetched page %d with %d" % (result.page, len(result)))
    for item in result:
        print(item)

About

Python library for influenzanet API

Resources

License

Stars

Watchers

Forks

Packages

No packages published