New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

iati2json

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

iati2json

Iati to JSON converter

  • 0.1.3
  • PyPI
  • Socket score

Maintainers
1

Convert IATI XML to JSON

Install

pip install iati2json

Usage

Save to file (fastest option)

import iati2json
iati2json.convert("my_iati_file.xml", file="converted.json")

Convert to String

import iati2json
import json
iati_json_string = iati2json.convert("my_iati_file.xml")
iati_dict = json.loads(iati_json_string)

Pretty (indented output)

import iati2json
iati2json.convert("my_iati_file.xml", file="converted.json", pretty=True)

Custom Iati Schemas

By default will work with 2.03 version of standard. You can provide your own versions of schemas:

import iati2json

schemas = [
    "https://raw.githubusercontent.com/IATI/IATI-Schemas/version-2.04-beta/iati-activities-schema.xsd",
    "https://raw.githubusercontent.com/IATI/IATI-Schemas/version-2.04-beta/iati-organisations-schema.xsd",
]

iati2json.convert("my_iati_file.xml", schemas=schemas)

FAQs


Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc