Security News
PyPI Introduces Digital Attestations to Strengthen Python Package Security
PyPI now supports digital attestations, enhancing security and trust by allowing package maintainers to verify the authenticity of Python packages.
json-to-python
Advanced tools
Simple utility to convert JSON to Python TypedDict or dataclass.
https://baseballyama.github.io/json-to-python/
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.
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-python <json-dir> <output-dir>
npx json-to-python <json-dir> <output-dir> --casing <camel|snake|none> --generate <typeddict|dataclass>
Please see ./packages/json-to-python/CHANGELOG.md
If you find a bug or new feature request, please feel free to open an issue. PR is also welcome.
FAQs
Simple utility to convert JSON to Python TypedDict or dataclass
The npm package json-to-python receives a total of 0 weekly downloads. As such, json-to-python popularity was classified as not popular.
We found that json-to-python demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
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.
Security News
PyPI now supports digital attestations, enhancing security and trust by allowing package maintainers to verify the authenticity of Python packages.
Security News
GitHub removed 27 malicious pull requests attempting to inject harmful code across multiple open source repositories, in another round of low-effort attacks.
Security News
RubyGems.org has added a new "maintainer" role that allows for publishing new versions of gems. This new permission type is aimed at improving security for gem owners and the service overall.