Skip to content

Given an IATI (activity) identifier, find the activity (efficiently!) #3

Open
@andylolz

Description

@andylolz

Doing this efficiently means leaning on the rule that all activity IDs must be prefixed by the publisher’s org ID.

E.g.:

import iatikit


activity_id = 'GB-COH-07676886-999999'

activity = iatikit.activities().find(iati_identifier=activity_id)

if activity:
    print('success! Found activity with IATI identifier: "{}"'.format(activity_id))
else:
    print('failed! Could not find an activity with IATI identifier: "{}"'.format(activity_id))

# failed! Could not find an activity with IATI identifier: "GB-COH-07676886-999999"

Metadata

Metadata

Assignees

No one assigned

    Labels

    featureCool stuff I’d like this library to be able to do

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions