Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

json-to-typeddict

Package Overview
Dependencies
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

json-to-typeddict

Simple utility to convert JSON to Python TypedDict

  • 0.3.0
  • unpublished
  • latest
  • npm
  • Socket score

Version published
Weekly downloads
0
Maintainers
1
Weekly downloads
 
Created
Source

Code Style: Prettier Build Status Coverage Status

json-to-typeddict

Simple utility to convert JSON to Python TypedDict

Playground

https://baseballyama.github.io/json-to-typeddict/

Motivation

I am an engineer who likes types, and with the recent AI boom, I have been working with Python more and more. When developing functions using AI, there are opportunities to communicate with external APIs, such as calling the API of a vector database server. If the official SDK is not provided, we will need to execute the API yourself. I wanted to use types this request and response. In other words, I want to convert JSON to TypedDict, but I could not find an easy way to achieve this. So I decided to implement this myself.

Usage

This library supports browser execution and CLI execution. To execute in a browser, please execute from the Playground. To execute via CLI, use the following command.

npx json-to-typeddict <json-dir> <output-dir>
npx json-to-typeddict <json-dir> <output-dir> --casing <camel|snake|none>

Changlog

Please see ./packages/json-to-typeddict/CHANGELOG.md

Contributing

If you find a bug or new feature request, please feel free to open an issue. PR is also welcome.

FAQs

Package last updated on 30 Jul 2023

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